Resource addResource(String name, String path, String module, String description) { Resource resource = new Resource(1, new Date(), getCurrentUser(), name, path, description, module, true); Schema schema = getEntity(); if (schema.addResource(resource)) { // store schema! flushEntity(schema); return resource; } return null; }
for (int i=0; i < size; i++) { Resource res = in.readObject(); xSchema.addResource(res);