public void save(ODatabaseDocument database) { database.save(tlDocument.get()); }
@Override public ODocument save(final ODocument entity) { return dbProvider.get().save(entity); }
@Override protected Boolean execute(ODatabaseDocument db) { db.begin(); for (ODocument doc : docs) { db.save(doc); } db.commit(); return true; } }.execute();
@Override protected Boolean execute(ODatabaseDocument db) { db.begin(); for (ODocument doc : docs) { db.save(doc); } db.commit(); return true; } }.execute();
@Override public boolean result(Object iRecord) { final ODocument record = ((OIdentifiable) iRecord).getRecord(); record.field(propertyName, record.field(propertyName), type); database.save(record); return true; }
@Override public void save(TransientObject... objects) throws DAOException { System.out.println("save: " + Arrays.asList(objects)); checkDb(); OTransaction transaction = db.getTransaction(); transaction.begin(); for(TransientObject t : objects){ db.save(new ODocumentWrapper(t)); } transaction.commit(); transaction.close(); }
@Override public boolean result(Object iRecord) { final ODocument record = ((OIdentifiable) iRecord).getRecord(); record.setFieldType(propertyName, type); record.field(newPropertyName, record.field(propertyName), type); database.save(record); return true; }
public void setVertexProperties(Long id, Map<String, Object> properties) { if (properties == null || properties.size() == 0) { return; } settingProperties = true; final int cluster = (int) (id % parallel); if (nextVerticesToCreate[cluster] <= id) { if (oVertexClass == null) { oVertexClass = db.getMetadata().getSchema().getClass(vertexClass); } if (nextVerticesToCreate[cluster] < id) { new BatchImporterJob(cluster, oVertexClass, id - 1).run(db); } new BatchImporterJob(cluster, oVertexClass, id).createVertex(db, id, properties); } else { final ODocument doc = db.load(new ORecordId(getClusterId(id), getClusterPosition(id))); if (doc == null) { throw new RuntimeException("trying to insert properties on non existing document"); } doc.fromMap(properties); db.save(doc); } }
@Override public void onClick(Optional<AjaxRequestTarget> targetOptional) { ODocument newLocalization = new ODocument(OrienteerLocalizationModule.OCLASS_LOCALIZATION); T schemaObject = AbstractSchemaLocalizationWidget.this.getModelObject(); newLocalization.field(OrienteerLocalizationModule.OPROPERTY_KEY, getLocalizationKey(schemaObject)); newLocalization.field(OrienteerLocalizationModule.OPROPERTY_LANG, ""); newLocalization.field(OrienteerLocalizationModule.OPROPERTY_STYLE, ""); newLocalization.field(OrienteerLocalizationModule.OPROPERTY_VARIATION, ""); newLocalization.field(OrienteerLocalizationModule.OPROPERTY_VALUE, ""); newLocalization.field(OrienteerLocalizationModule.OPROPERTY_ACTIVE, false); getDatabase().save(newLocalization); targetOptional.ifPresent(target -> target.add(table)); }
edgeDoc.field("out", new ORecordId(getClusterId(from), getClusterPosition(from))); edgeDoc.field("in", new ORecordId(getClusterId(to), getClusterPosition(to))); db.save(edgeDoc); ORecordId rid = (ORecordId) edgeDoc.getIdentity(); putInList(from, out, rid);
db.save(doc); log(Level.FINE, "saved record %s", doc.toJSON());
edges.stream().forEach(e -> db.save(e));