public RWRelation rel10x10(String name, int fromBase, int toBase, Db db, Table<?> tbl1, Table<?> tbl2) { RWRelation rel = relation(db, tbl1, name, tbl2); for (int i = 0; i < 10; i++) { for (int j = 0; j <= 10; j++) { UTILS.link(rel, i + fromBase, nums(j + toBase)); } } return rel; }
public ReadOnlyRelation randomRel(Db db, String name, Table<?> tbl1, Table<?> tbl2, int max) { RWRelation rel = relation(db, tbl1, name, tbl2); rel.clear(); int count = Nums.rnd(1, max); for (int i = 0; i < count; i++) { UTILS.link(rel, Nums.rnd(10), Nums.random(1, max, 0, max * 2)); } return rel; }