Collection addCollection(String name, String docType, String uriPattern, String description) { Schema schema = getEntity(); int id = 0; for (Collection collect: schema.getCollections()) { if (collect.getId() > id) { id = collect.getId(); } } id++; Collection collection = new Collection(1, new Date(), getCurrentUser(), id, name, docType, uriPattern, description, true); if (schema.addCollection(collection)) { // store schema! flushEntity(schema); return collection; } return null; }
for (int i=0; i < size; i++) { Collection cln = in.readObject(); xSchema.addCollection(cln);