use of org.simpleflatmapper.map.mapper.MapperKey in project SimpleFlatMapper by arnaudroger.
the class Utils method generateKeys.
public static List<MapperKey<JdbcColumnKey>> generateKeys(int size, int maxColumns) {
Random random = new Random(13265656556l);
ArrayList<MapperKey<JdbcColumnKey>> list = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
int nbColumn = random.nextInt(maxColumns) + 2;
JdbcColumnKey[] columnKeys = new JdbcColumnKey[nbColumn];
for (int j = 0; j < columnKeys.length; j++) {
JdbcColumnKey key = new JdbcColumnKey(newName(random), j + 1);
columnKeys[j] = key;
}
list.add(new MapperKey<>(columnKeys));
}
return list;
}
Aggregations