@Override public <RET extends ORecord> RET load(ORecord iObject) { checkOpenness(); return internal.load(iObject); }
@Override public <RET extends ORecord> RET load(ORID iRecordId, String iFetchPlan, boolean iIgnoreCache) { checkOpenness(); return internal.load(iRecordId, iFetchPlan, iIgnoreCache); }
@Override public <RET extends ORecord> RET load(ORID recordId) { checkOpenness(); return internal.load(recordId); }
@Override public <RET extends ORecord> RET load(ORID iRecordId, String iFetchPlan) { checkOpenness(); return internal.load(iRecordId, iFetchPlan); }
@Override public <RET extends ORecord> RET load(ORecord iObject, String iFetchPlan, boolean iIgnoreCache, boolean iUpdateCache, boolean loadTombstone, OStorage.LOCKING_STRATEGY iLockingStrategy) { checkOpenness(); return internal.load(iObject, iFetchPlan, iIgnoreCache, iUpdateCache, loadTombstone, iLockingStrategy); }
@Override public <RET extends ORecord> RET load(ORID iRecordId, String iFetchPlan, boolean iIgnoreCache, boolean loadTombstone, OStorage.LOCKING_STRATEGY iLockingStrategy) { checkOpenness(); return internal.load(iRecordId, iFetchPlan, iIgnoreCache, loadTombstone, iLockingStrategy); }
@Override public <RET extends ORecord> RET load(ORecord iObject, String iFetchPlan, boolean iIgnoreCache) { checkOpenness(); return internal.load(iObject, iFetchPlan, iIgnoreCache); }
@Override public <RET extends ORecord> RET load(ORecord iObject, String iFetchPlan) { checkOpenness(); return internal.load(iObject, iFetchPlan); }
@Override public <RET extends ORecord> RET load(ORecord iObject, String iFetchPlan, boolean iIgnoreCache, boolean loadTombstone, OStorage.LOCKING_STRATEGY iLockingStrategy) { checkOpenness(); return internal.load(iObject, iFetchPlan, iIgnoreCache, loadTombstone, iLockingStrategy); }
@Override public <RET extends ORecord> RET load(ORID iRecordId, String iFetchPlan, boolean iIgnoreCache, boolean iUpdateCache, boolean loadTombstone, OStorage.LOCKING_STRATEGY iLockingStrategy) { checkOpenness(); return internal.load(iRecordId, iFetchPlan, iIgnoreCache, iUpdateCache, loadTombstone, iLockingStrategy); }
public OUser getUser(final ORID iRecordId) { if (iRecordId == null) return null; ODocument result; result = getDatabase().load(iRecordId, "roles:1"); if (!result.getClassName().equals(OUser.CLASS_NAME)) { result = null; } return new OUser(result); }
private OEdge toEdge(OIdentifiable item) { if (item != null && item instanceof OElement) { return ((OElement) item).asEdge().orElse(null); } else { item = getDatabase().load(item.getIdentity()); if (item != null && item instanceof OElement) { return ((OElement) item).asEdge().orElse(null); } } return null; }
private OVertex toVertex(OIdentifiable item) { if (item != null && item instanceof OElement) { return ((OElement) item).asVertex().orElse(null); } else { item = getDatabase().load(item.getIdentity()); if (item != null && item instanceof OElement) { return ((OElement) item).asVertex().orElse(null); } } return null; }
private OVertex toVertex(OIdentifiable item) { if (item != null && item instanceof OElement) { return ((OElement) item).asVertex().orElse(null); } else { item = getDatabase().load(item.getIdentity()); if (item != null && item instanceof OElement) { return ((OElement) item).asVertex().orElse(null); } } return null; }
private OVertex toVertex(OIdentifiable item) { if (item != null && item instanceof OElement) { return ((OElement) item).asVertex().orElse(null); } else { item = getDatabase().load(item.getIdentity()); if (item != null && item instanceof OElement) { return ((OElement) item).asVertex().orElse(null); } } return null; }
/** * Should be used only by console commands */ public void loadRecordInternal(String iRecordId, String iFetchPlan) { checkForDatabase(); currentRecord = currentDatabase.load(new ORecordId(iRecordId), iFetchPlan); displayRecord(null); message("\nOK"); }
public <RET extends T> RET get(final String iKey, final String iFetchPlan) { final OIdentifiable value = index.get(iKey); if (value == null) return null; if (value instanceof ORID) return (RET) ODatabaseRecordThreadLocal.instance().get().load(((ORID) value), iFetchPlan); return (RET) ((ODocument) value).load(iFetchPlan); }
@Deprecated public ODocument load(final String iFetchPlan, boolean iIgnoreCache, boolean loadTombstone) { Object result; try { result = getDatabase().load(this, iFetchPlan, iIgnoreCache, loadTombstone, OStorage.LOCKING_STRATEGY.DEFAULT); } catch (Exception e) { throw OException.wrapException(new ORecordNotFoundException(getIdentity()), e); } if (result == null) throw new ORecordNotFoundException(getIdentity()); return (ODocument) result; }
public ORecord load() { if (!getIdentity().isValid()) throw new ORecordNotFoundException(getIdentity(), "The record has no id, probably it's new or transient yet "); final ORecord result = getDatabase().load(this); if (result == null) throw new ORecordNotFoundException(getIdentity()); return result; }
@ConsoleCommand(description = "Insert or modify an entry in the database dictionary. The entry is comprised of key=String, value=record-id", onlineHelp = "Console-Command-Dictionary-Put") public void dictionaryPut(@ConsoleParameter(name = "key", description = "The key to bind") final String iKey, @ConsoleParameter(name = "record-id", description = "The record-id of the record to bind to the key") final String iRecordId) { checkForDatabase(); currentRecord = currentDatabase.load(new ORecordId(iRecordId)); if (currentRecord == null) message("\nError: record with id '" + iRecordId + "' was not found in database"); else { currentDatabase.getDictionary().put(iKey, currentRecord); displayRecord(null); message("\nThe entry " + iKey + "=" + iRecordId + " has been inserted in the database dictionary"); } }