}
private DboTableMeta setupMetaData(int numColumns, NoSqlEntityManagerFactory factory) {
NoSqlEntityManager mgr = factory.createEntityManager();
DboDatabaseMeta meta = mgr.find(DboDatabaseMeta.class, DboDatabaseMeta.META_DB_ROWKEY);
if(meta != null) {
meta = new DboDatabaseMeta();
}
DboTableMeta table = new DboTableMeta();
table.setup(null, "testWrites", false);
DboColumnIdMeta idMeta = new DboColumnIdMeta();
idMeta.setup(table, "id", String.class, false);
for(int i = 0; i < numColumns; i++) {
DboColumnCommonMeta col = new DboColumnCommonMeta();
col.setup(table, "col"+i, long.class, false, false);
mgr.put(col);
}
meta.addMetaClassDbo(table);
mgr.put(idMeta);
mgr.put(table);
mgr.put(meta);
mgr.flush();