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<>()); }
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); }
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); }