Search in sources :

Example 1 with IdGenerator

use of com.dangdang.ddframe.rdb.sharding.id.generator.IdGenerator in project sharding-jdbc by dangdangdotcom.

the class TableRule method fillIdGenerator.

void fillIdGenerator(final Class<? extends IdGenerator> idGeneratorClass) {
    for (Map.Entry<String, IdGenerator> each : autoIncrementColumnMap.entrySet()) {
        if (null == each.getValue()) {
            IdGenerator idGenerator = TableRuleBuilder.instanceIdGenerator(idGeneratorClass);
            each.setValue(idGenerator);
        }
    }
}
Also used : ToString(lombok.ToString) IdGenerator(com.dangdang.ddframe.rdb.sharding.id.generator.IdGenerator) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map)

Aggregations

IdGenerator (com.dangdang.ddframe.rdb.sharding.id.generator.IdGenerator)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 ToString (lombok.ToString)1