本文整理汇总了Java中org.skife.jdbi.v2.sqlobject.customizers.Mapper类的典型用法代码示例。如果您正苦于以下问题:Java Mapper类的具体用法?Java Mapper怎么用?Java Mapper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Mapper类属于org.skife.jdbi.v2.sqlobject.customizers包,在下文中一共展示了Mapper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getQueriesBySuite
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery("" +
"SELECT\n" +
" suite\n" +
", name\n" +
", test_catalog\n" +
", test_schema\n" +
", test_prequeries\n" +
", test_query\n" +
", test_postqueries\n" +
", test_username\n" +
", test_password\n" +
", control_catalog\n" +
", control_schema\n" +
", control_prequeries\n" +
", control_query\n" +
", control_postqueries\n" +
", control_username\n" +
", control_password\n" +
", session_properties_json\n" +
"FROM verifier_queries\n" +
"WHERE suite = :suite\n" +
"ORDER BY id\n" +
"LIMIT :limit")
@Mapper(QueryPairMapper.class)
List<QueryPair> getQueriesBySuite(@Bind("suite") String suite, @Bind("limit") int limit);
示例2: getRepairUnitByClusterAndTables
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery(SQL_GET_REPAIR_UNIT_BY_CLUSTER_AND_TABLES)
@Mapper(RepairUnitMapper.class)
RepairUnit getRepairUnitByClusterAndTables(
@Bind("clusterName") String clusterName,
@Bind("keyspaceName") String keyspaceName,
@Bind("columnFamilies") Collection<String> columnFamilies,
@Bind("nodes") Collection<String> nodes,
@Bind("datacenters") Collection<String> datacenters,
@Bind("blacklisted_tables") Collection<String> blacklistedTables);
示例3: ON
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery("SELECT s.table_id, s.shard_id, s.shard_uuid, s.row_count, s.compressed_size, s.uncompressed_size\n" +
"FROM shards s\n" +
"JOIN shard_nodes sn ON (s.shard_id = sn.shard_id)\n" +
"JOIN nodes n ON (sn.node_id = n.node_id)\n" +
"WHERE n.node_identifier = :nodeIdentifier")
@Mapper(ShardMetadata.Mapper.class)
Set<ShardMetadata> getNodeShards(@Bind("nodeIdentifier") String nodeIdentifier);
示例4: getTableInformation
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery("SELECT table_id FROM tables\n" +
"WHERE schema_name = :schemaName\n" +
" AND table_name = :tableName")
@Mapper(TableMapper.class)
Table getTableInformation(
@Bind("schemaName") String schemaName,
@Bind("tableName") String tableName);
示例5: AND
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery("SELECT schema_name, table_name, data\n" +
"FROM views\n" +
"WHERE (schema_name = :schemaName OR :schemaName IS NULL)\n" +
" AND (table_name = :tableName OR :tableName IS NULL)\n" +
"ORDER BY schema_name, table_name\n")
@Mapper(ViewResult.Mapper.class)
List<ViewResult> getViews(
@Bind("schemaName") String schemaName,
@Bind("tableName") String tableName);
示例6: findById
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery("SELECT COMMUNICATIONNUMBER, COMMUNICATIONSYMBOL, "
+ "TRAFFICDIRECTION, REMOTECLOUDNAME, REMOTEASNUMBER, "
+ "LOCALCLOUDNAME, LOCALASNUMBER "
+ "FROM DC2DCCOMMUNICATION "
+ "WHERE COMMUNICATIONNUMBER = :d.communicationNumber AND "
+ "COMMUNICATIONSYMBOL = :d.communicationSymbol AND "
+ "LOCALCLOUDNAME = :d.localCloudDCName AND "
+ "LOCALASNUMBER = :d.localAsNumber AND "
+ "REMOTECLOUDNAME = :d.remoteCloudDCName AND "
+ "REMOTEASNUMBER = :d.remoteAsNumber")
@Mapper(DC2DCCommunicationMapper.class)
public abstract DC2DCCommunication findById(@BindBean("d") DC2DCCommunicationID dcID);
示例7: findById
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery("SELECT TUNNELNAME, LOCALTUNNELENDADDRESS, REMOTETUNNELENDADDRESS, "
+ "PHYSICALLOCALINTERFACENAME, INBOUNDINTERFACECOUNTEROID, "
+ "OUTBOUNDINTERFACECOUNTEROID, LOCALLINKID, LOCALISPNAME, OFSWITCHPORTNUMBER, "
+ "LOCALROUTERADDRESS "
+ "FROM TUNNEL WHERE TUNNELNAME = :t.tunnelName "
+ "AND LOCALTUNNELENDADDRESS = :t.localTunnelEndAddress "
+ "AND REMOTETUNNELENDADDRESS = :t.remoteTunnelEndAddress")
@Mapper(TunnelMapper.class)
public abstract Tunnel findById(@BindEndAddressPairTunnelID("t") EndAddressPairTunnelID tunnelID);
示例8: findAll
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery("SELECT TUNNELNAME, LOCALTUNNELENDADDRESS, REMOTETUNNELENDADDRESS, "
+ "PHYSICALLOCALINTERFACENAME, INBOUNDINTERFACECOUNTEROID, "
+ "OUTBOUNDINTERFACECOUNTEROID, LOCALLINKID, LOCALISPNAME, OFSWITCHPORTNUMBER, "
+ "LOCALROUTERADDRESS "
+ "FROM TUNNEL")
@Mapper(TunnelMapper.class)
public abstract List<Tunnel> findAll();
示例9: findAllByLinkID
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery("SELECT TUNNELNAME, LOCALTUNNELENDADDRESS, REMOTETUNNELENDADDRESS, "
+ "PHYSICALLOCALINTERFACENAME, INBOUNDINTERFACECOUNTEROID, "
+ "OUTBOUNDINTERFACECOUNTEROID, LOCALLINKID, LOCALISPNAME, OFSWITCHPORTNUMBER, "
+ "LOCALROUTERADDRESS "
+ "FROM TUNNEL WHERE LOCALLINKID = :localLinkID AND LOCALISPNAME = :localIspName")
@Mapper(TunnelMapper.class)
public abstract List<Tunnel> findAllByLinkID(@BindBean SimpleLinkID linkID);
示例10:
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery("SELECT TUNNELNAME, LOCALTUNNELENDADDRESS, REMOTETUNNELENDADDRESS, "
+ "PHYSICALLOCALINTERFACENAME, INBOUNDINTERFACECOUNTEROID, "
+ "OUTBOUNDINTERFACECOUNTEROID, LOCALLINKID, LOCALISPNAME, OFSWITCHPORTNUMBER, LOCALROUTERADDRESS "
+ "FROM TUNNEL WHERE COMMUNICATIONNUMBER = :d.communicationNumber AND "
+ "COMMUNICATIONSYMBOL = :d.communicationSymbol AND "
+ "LOCALCLOUDNAME = :d.localCloudDCName AND "
+ "LOCALASNUMBER = :d.localAsNumber AND "
+ "REMOTECLOUDNAME = :d.remoteCloudDCName AND "
+ "REMOTEASNUMBER = :d.remoteAsNumber")
@Mapper(TunnelMapper.class)
public abstract List<Tunnel> findAllByDC2DCCommunicationID(@BindBean("d") DC2DCCommunicationID dcID);
示例11: findAll
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery("SELECT "
+ "RESTPORT, "
+ "OPENFLOWPORT, "
+ "ADDRESS, "
+ "RESTHOSTADDRESS, "
+ "OPENFLOWHOSTADDRESS "
+ "FROM SDNCONTROLLER")
@Mapper(SDNControllerMapper.class)
public abstract List<SDNController> findAll();
示例12: findById
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery("SELECT "
+ "RESTPORT, "
+ "OPENFLOWPORT, "
+ "ADDRESS, "
+ "RESTHOSTADDRESS, "
+ "OPENFLOWHOSTADDRESS "
+ "FROM SDNCONTROLLER WHERE ADDRESS = :address")
@Mapper(SDNControllerMapper.class)
public abstract SDNController findById(@Bind("address") String address);
示例13: findAll
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery("SELECT LOCALLINKID, LOCALISPNAME, ADDRESSPREFIX, "
+ "PHYSICALINTERFACENAME, VLAN, INBOUNDINTERFACECOUNTEROID, "
+ "OUTBOUNDINTERFACECOUNTEROID, BGROUTERADDRESS, "
+ "TUNNELENDPREFIX, TUNNELENDPREFIXLENGTH, POLICERBANDWIDTHLIMITFACTOR, "
+ "FILTERINTERFACENAME, AGGREGATELEAKAGEFACTOR "
+ "FROM LINK")
@Mapper(LinkMapper.class)
public abstract List<Link> findAll();
示例14: findById
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery("SELECT LOCALLINKID, LOCALISPNAME, ADDRESSPREFIX, "
+ "PHYSICALINTERFACENAME, VLAN, INBOUNDINTERFACECOUNTEROID, "
+ "OUTBOUNDINTERFACECOUNTEROID, BGROUTERADDRESS, "
+ "TUNNELENDPREFIX, TUNNELENDPREFIXLENGTH, POLICERBANDWIDTHLIMITFACTOR, "
+ "FILTERINTERFACENAME, AGGREGATELEAKAGEFACTOR "
+ "FROM LINK "
+ "WHERE LOCALLINKID = :localLinkID AND LOCALISPNAME = :localIspName")
@Mapper(LinkMapper.class)
public abstract Link findById(@BindBean SimpleLinkID linkID);
示例15: findByBGRouterAddress
import org.skife.jdbi.v2.sqlobject.customizers.Mapper; //导入依赖的package包/类
@SqlQuery("SELECT LOCALLINKID, LOCALISPNAME, ADDRESSPREFIX, "
+ "PHYSICALINTERFACENAME, VLAN, INBOUNDINTERFACECOUNTEROID, "
+ "OUTBOUNDINTERFACECOUNTEROID, BGROUTERADDRESS, "
+ "TUNNELENDPREFIX, TUNNELENDPREFIXLENGTH, POLICERBANDWIDTHLIMITFACTOR, "
+ "FILTERINTERFACENAME, AGGREGATELEAKAGEFACTOR "
+ "FROM LINK "
+ "WHERE BGROUTERADDRESS = :bgAddress")
@Mapper(LinkMapper.class)
public abstract List<Link> findByBGRouterAddress(@Bind("bgAddress") String bgAddress);