Java 类io.dropwizard.hibernate.AbstractDAO 实例源码

项目:dropwizard-db-sharding-bundle    文件:DBShardingBundle.java   
public static <EntityType, DaoType extends AbstractDAO<EntityType>, T extends Configuration>
WrapperDao<EntityType, DaoType> createWrapperDao(DBShardingBundle<T> bundle, Class<DaoType> daoTypeClass) {
    return new WrapperDao<>(bundle.sessionFactories, daoTypeClass, bundle.shardManager, new ConsistentHashBucketIdExtractor<>());
}
项目:dropwizard-db-sharding-bundle    文件:DBShardingBundle.java   
public static <EntityType, DaoType extends AbstractDAO<EntityType>, T extends Configuration>
WrapperDao<EntityType, DaoType> createWrapperDao(DBShardingBundle<T> bundle,
                                                 Class<DaoType> daoTypeClass,
                                                 BucketIdExtractor<String> bucketIdExtractor) {
    return new WrapperDao<>(bundle.sessionFactories, daoTypeClass, bundle.shardManager, bucketIdExtractor);
}
项目:dropwizard-db-sharding-bundle    文件:DBShardingBundle.java   
public static <EntityType, DaoType extends AbstractDAO<EntityType>, T extends Configuration>
WrapperDao<EntityType, DaoType> createWrapperDao(DBShardingBundle<T> bundle, Class<DaoType> daoTypeClass,
                                                 Class[] extraConstructorParamClasses, Class[] extraConstructorParamObjects) {
    return new WrapperDao<>(bundle.sessionFactories, daoTypeClass, bundle.shardManager, new ConsistentHashBucketIdExtractor<>(),
            extraConstructorParamClasses, extraConstructorParamObjects);
}