Tabnine Logo
Mapper
Code IndexAdd Tabnine to your IDE (free)

How to use
Mapper
in
org.skife.jdbi.v2.sqlobject.customizers

Best Java code snippets using org.skife.jdbi.v2.sqlobject.customizers.Mapper (Showing top 20 results out of 315)

Refine searchRefine arrow

  • SqlQuery
  • Bind
origin: signalapp/Signal-Server

@Mapper(AccountMapper.class)
@SqlQuery("SELECT * FROM accounts ORDER BY " + NUMBER + " LIMIT :limit")
public abstract List<Account> getAllFrom(@Bind("limit") int length);
origin: signalapp/Signal-Server

@Mapper(AccountMapper.class)
@SqlQuery("SELECT * FROM accounts")
public abstract Iterator<Account> getAll();
origin: signalapp/Signal-Server

@Mapper(MessageMapper.class)
@SqlUpdate("DELETE FROM messages WHERE " + ID + " = :id AND " + DESTINATION + " = :destination")
abstract void remove(@Bind("destination") String destination, @Bind("id") long id);
origin: com.ning.billing/killbill-osgi-bundles-analytics

public Object map(ResolvedMethod method, Query q, HandleDing h)
{
  if (method.getRawMember().isAnnotationPresent(Mapper.class)) {
    final ResultSetMapper mapper;
    try {
      mapper = method.getRawMember().getAnnotation(Mapper.class).value().newInstance();
    }
    catch (Exception e) {
      throw new UnableToCreateStatementException("unable to access mapper", e);
    }
    return result(q.map(mapper), h);
  }
  else {
    return result(q.mapTo(mapTo(method)), h);
  }
}
origin: k0kubun/gitstar-ranking

@SqlQuery("select token from access_tokens where enabled = true limit 1000")
@Mapper(AccessTokenMapper.class)
List<AccessToken> allEnabledTokens();
origin: org.kill-bill.commons/killbill-jdbi

public Object map(ResolvedMethod method, Query q, HandleDing h)
{
  if (method.getRawMember().isAnnotationPresent(Mapper.class)) {
    final ResultSetMapper mapper;
    try {
      mapper = method.getRawMember().getAnnotation(Mapper.class).value().newInstance();
    }
    catch (Exception e) {
      throw new UnableToCreateStatementException("unable to access mapper", e);
    }
    return result(q.map(mapper), h);
  }
  else {
    return result(q.mapTo(mapTo(method)), h);
  }
}
origin: signalapp/Signal-Server

@Mapper(StoredVerificationCodeMapper.class)
@SqlQuery("SELECT verification_code, timestamp FROM pending_accounts WHERE number = :number")
StoredVerificationCode getCodeForNumber(@Bind("number") String number);
origin: com.facebook.presto/presto-raptor

@SqlQuery("SELECT node_id, node_identifier FROM nodes")
@Mapper(RaptorNode.Mapper.class)
List<RaptorNode> getNodes();
origin: signalapp/Signal-Server

@Mapper(AccountMapper.class)
@SqlQuery("SELECT * FROM accounts WHERE " + NUMBER + " = :number")
public abstract Account get(@Bind("number") String number);
origin: prestosql/presto

@SqlQuery("SELECT node_id, node_identifier FROM nodes")
@Mapper(RaptorNode.Mapper.class)
List<RaptorNode> getNodes();
origin: signalapp/Signal-Server

@Mapper(StoredVerificationCodeMapper.class)
@SqlQuery("SELECT verification_code, timestamp FROM pending_devices WHERE number = :number")
StoredVerificationCode getCodeForNumber(@Bind("number") String number);
origin: making/spring-boot-db-samples

@SqlQuery("SELECT p.id, p.name, p.price, b.id AS baseId, b.name AS baseName, t.id AS toppingId, t.name AS toppingName FROM pizza p INNER JOIN base b ON (b.id = p.base_id) INNER JOIN pizza_toppings pt ON (pt.pizza_id = p.id) INNER JOIN topping t ON (t.id = pt.toppings_id) ORDER BY p.id ASC")
@Mapper(PizzaMapper.class)
List<Pizza> findOrderByIdAsc();
origin: signalapp/Signal-Server

@SqlQuery("SELECT DISTINCT ON (number, device_id) * FROM keys WHERE number = :number ORDER BY number, device_id, key_id ASC")
@Mapper(PreKeyMapper.class)
abstract List<KeyRecord> retrieveFirst(@Bind("number") String number);
origin: lievendoclo/cleanarch

@SqlQuery("SELECT id, name FROM building")
@Mapper(BuildingMapper.class)
List<Building> findAll();
origin: signalapp/Signal-Server

@Mapper(AbusiveHostRuleMapper.class)
@SqlQuery("SELECT * FROM abusive_host_rules WHERE :host::inet <<= " + HOST)
public abstract List<AbusiveHostRule> getAbusiveHostRulesFor(@Bind("host") String host);
origin: soabase/soabase

@SqlQuery("SELECT * FROM SoaAttributes")
@Mapper(AttributeEntityMapper.class)
public List<AttributeEntity> selectAll();
origin: signalapp/Signal-Server

@Mapper(MessageMapper.class)
@SqlQuery("SELECT * FROM messages WHERE " + DESTINATION + " = :destination AND " + DESTINATION_DEVICE + " = :destination_device ORDER BY " + TIMESTAMP + " ASC LIMIT " + RESULT_SET_CHUNK_SIZE)
abstract List<OutgoingMessageEntity> load(@Bind("destination")        String destination,
                     @Bind("destination_device") long destinationDevice);
origin: prestosql/presto

@SqlQuery("SELECT n.node_identifier, x.bytes\n" +
    "FROM (\n" +
    "  SELECT node_id, sum(compressed_size) bytes\n" +
    "  FROM (\n" +
    "      SELECT sn.node_id, s.compressed_size\n" +
    "      FROM shards s\n" +
    "      JOIN shard_nodes sn ON (s.shard_id = sn.shard_id)\n" +
    "      WHERE s.bucket_number IS NULL\n" +
    "    UNION ALL\n" +
    "      SELECT b.node_id, s.compressed_size\n" +
    "      FROM shards s\n" +
    "      JOIN tables t ON (s.table_id = t.table_id)\n" +
    "      JOIN distributions d ON (t.distribution_id = d.distribution_id)\n" +
    "      JOIN buckets b ON (\n" +
    "        d.distribution_id = b.distribution_id AND\n" +
    "        s.bucket_number = b.bucket_number)\n" +
    "  ) x\n" +
    "  GROUP BY node_id\n" +
    ") x\n" +
    "JOIN nodes n ON (x.node_id = n.node_id)")
@Mapper(NodeSize.Mapper.class)
Set<NodeSize> getNodeSizes();
origin: signalapp/Signal-Server

@SqlQuery("SELECT * FROM keys WHERE number = :number AND device_id = :device_id ORDER BY key_id ASC FOR UPDATE")
@Mapper(PreKeyMapper.class)
abstract KeyRecord retrieveFirst(@Bind("number") String number, @Bind("device_id") long deviceId);
origin: com.facebook.presto/presto-raptor

@SqlQuery("SELECT n.node_identifier, x.bytes\n" +
    "FROM (\n" +
    "  SELECT node_id, sum(compressed_size) bytes\n" +
    "  FROM (\n" +
    "      SELECT sn.node_id, s.compressed_size\n" +
    "      FROM shards s\n" +
    "      JOIN shard_nodes sn ON (s.shard_id = sn.shard_id)\n" +
    "      WHERE s.bucket_number IS NULL\n" +
    "    UNION ALL\n" +
    "      SELECT b.node_id, s.compressed_size\n" +
    "      FROM shards s\n" +
    "      JOIN tables t ON (s.table_id = t.table_id)\n" +
    "      JOIN distributions d ON (t.distribution_id = d.distribution_id)\n" +
    "      JOIN buckets b ON (\n" +
    "        d.distribution_id = b.distribution_id AND\n" +
    "        s.bucket_number = b.bucket_number)\n" +
    "  ) x\n" +
    "  GROUP BY node_id\n" +
    ") x\n" +
    "JOIN nodes n ON (x.node_id = n.node_id)")
@Mapper(NodeSize.Mapper.class)
Set<NodeSize> getNodeSizes();
org.skife.jdbi.v2.sqlobject.customizersMapper

Most used methods

  • <init>
  • value

Popular in Java

  • Making http post requests using okhttp
  • getSystemService (Context)
  • getExternalFilesDir (Context)
  • getSharedPreferences (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now