
public class ODatabaseDocumentRemote extends ODatabaseDocumentAbstract
ODatabase.ATTRIBUTES, ODatabase.OPERATION_MODE, ODatabase.STATUS| Modifier and Type | Field and Description |
|---|---|
protected OStorageRemoteSession |
sessionMetadata |
activeQueries, componentsFactory, currentIntent, currentTx, databaseOwner, hooks, hooksByScope, inHook, initialized, loadedRecordsCount, localCache, maxRecordLoadMs, maxRidbagPrefetchMs, metadata, microTransaction, minRecordLoadMs, minRidbagPrefetchMs, properties, recordType, retainRecords, ridbagPrefetchCount, serializer, sharedContext, status, totalRecordLoadMs, totalRidbagPrefetchMs, unmodifiableHooks, url, userTYPE| Constructor and Description |
|---|
ODatabaseDocumentRemote(OStorageRemote storage) |
| Modifier and Type | Method and Description |
|---|---|
int |
addBlobCluster(String iClusterName,
Object... iParameters)
Adds a new cluster for store blobs.
|
void |
afterCreateOperations(OIdentifiable id) |
void |
afterDeleteOperations(OIdentifiable id) |
void |
afterReadOperations(OIdentifiable identifiable) |
void |
afterUpdateOperations(OIdentifiable id) |
OIdentifiable |
beforeCreateOperations(OIdentifiable id,
String iClusterName) |
void |
beforeDeleteOperations(OIdentifiable id,
String iClusterName) |
boolean |
beforeReadOperations(OIdentifiable identifiable) |
OIdentifiable |
beforeUpdateOperations(OIdentifiable id,
String iClusterName) |
ODatabaseDocumentAbstract |
begin(OTransaction.TXTYPE iType)
Begins a new transaction specifying the transaction type.
|
protected OMicroTransaction |
beginMicroTransaction() |
void |
closeQuery(String queryId) |
OResultSet |
command(String query,
Map args)
Executes a generic (idempotent or non idempotent) command.
|
OResultSet |
command(String query,
Object... args)
Executes a generic (idempotent or non idempotent) command.
|
ODatabaseDocumentInternal |
copy() |
<DB extends ODatabase> |
create()
Creates a new database.
|
<DB extends ODatabase> |
create(Map<OGlobalConfiguration,Object> iInitialSettings)
Creates a new database passing initial settings.
|
<DB extends ODatabase> |
create(String incrementalBackupPath)
Creates new database from database backup.
|
static void |
deInit(OStorageRemote storage) |
ODatabaseDocumentAbstract |
delete(ORecord record)
Deletes an entity from the database in synchronous mode.
|
void |
drop()
Drops a database.
|
OResultSet |
execute(String language,
String script,
Map<String,?> args)
Execute a script of a specified query language The result set has to be closed after usage
Sample usage: |
OResultSet |
execute(String language,
String script,
Object... args)
Execute a script in a specified query language.
|
void |
executeDeleteRecord(OIdentifiable record,
int iVersion,
boolean iRequired,
ODatabase.OPERATION_MODE iMode,
boolean prohibitTombstones) |
<RET extends ORecord> |
executeSaveRecord(ORecord record,
String clusterName,
int ver,
ODatabase.OPERATION_MODE mode,
boolean forceCreate,
ORecordCallback<? extends Number> recordCreatedCallback,
ORecordCallback<Integer> recordUpdatedCallback) |
boolean |
exists()
Checks if the database exists.
|
void |
fetchNextPage(ORemoteResultSet rs) |
OStorageRemoteSession |
getSessionMetadata() |
OStorageRemote |
getStorage()
Returns the underlying storage implementation.
|
OResultSet |
indexQuery(String indexName,
String query,
Object... args) |
void |
internalOpen(String user,
String password,
OrientDBConfig config) |
OLiveQueryMonitor |
live(String query,
OLiveQueryResultListener listener,
Map<String,?> args)
Subscribe a query as a live query for future create/update event with the referred conditions
|
OLiveQueryMonitor |
live(String query,
OLiveQueryResultListener listener,
Object... args)
Subscribe a query as a live query for future create/update event with the referred conditions
|
protected void |
loadMetadata() |
<DB extends ODatabase> |
open(OToken iToken)
Deprecated.
|
<DB extends ODatabase> |
open(String iUserName,
String iUserPassword)
Opens a database using the user and password received as arguments.
|
OResultSet |
query(String query,
Map args)
Executes an SQL query (idempotent).
|
OResultSet |
query(String query,
Object[] args)
Executes an SQL query.
|
void |
recycle(ORecord record) |
void |
replaceStorage(OStorage iNewStorage)
Internal only: replace the storage with a new one.
|
<DB extends ODatabase> |
set(ODatabase.ATTRIBUTES iAttribute,
Object iValue)
Sets a database attribute value
|
<DB extends ODatabase> |
setCustom(String name,
Object iValue) |
void |
setSessionMetadata(OStorageRemoteSession sessionMetadata) |
static void |
updateFunction(OStorageRemote storage) |
static void |
updateIndexManager(OStorageRemote storage,
ODocument indexManager) |
static void |
updateSchema(OStorageRemote storage,
ODocument schema) |
static void |
updateSequences(OStorageRemote storage) |
protected byte[] |
updateStream(ORecord record) |
activateOnCurrentThread, addCluster, addCluster, addRidbagPrefetchStats, afterCommitOperations, afterRollbackOperations, assignAndCheckCluster, backup, beforeCommitOperations, beforeRollbackOperations, begin, begin, browseClass, browseClass, browseCluster, browseCluster, browseCluster, browseCluster, browseCluster, callbackHookFailure, callbackHookFinalize, callbackHooks, callbackHookSuccess, callOnCloseListeners, callOnDropListeners, callOnOpenListeners, checkForClusterPermissions, checkIfActive, checkOpenness, checkRecordClass, checkSecurity, checkSecurity, checkSecurity, checkSecurity, checkSecurity, checkSecurity, checkSecurity, cleanOutRecord, clearDocumentTracking, close, closeActiveQueries, command, commit, commit, countClass, countClass, countClusterElements, countClusterElements, countClusterElements, countClusterElements, countClusterElements, declareIntent, delete, delete, delete, delete, dropCluster, dropCluster, executeHideRecord, executeReadRecord, executeSaveEmptyRecord, executeWithRetries, executeWithRetries, executeWithRetries, existsCluster, freeze, freeze, get, getActiveIntent, getActiveQueries, getActiveQuery, getBlobClusterIds, getClusterIdByName, getClusterNameById, getClusterNames, getClusterRecordSizeById, getClusterRecordSizeByName, getClusters, getCollectionsChanges, getConfiguration, getConflictStrategy, getDatabaseOwner, getDefaultClusterId, getDefaultSerializer, getDictionary, getHooks, getListeners, getLocalCache, getMetadata, getMicroOrRegularTransaction, getName, getProperties, getProperty, getRecord, getRecordMetadata, getRecordType, getSbTreeCollectionManager, getSerializer, getSerializerFactory, getSharedContext, getSize, getStats, getStatus, getStorageVersions, getTransaction, getType, getUnderlying, getURL, getUser, hide, incrementalBackup, init, internalClose, internalCommit, isActiveOnCurrentThread, isClosed, isClusterEdge, isClusterVertex, isMVCC, isPooled, isPrefetchRecords, isRetainRecords, isUseLightweightEdges, isValidationEnabled, load, load, load, load, load, load, load, load, load, load, loadIfVersionIsNotLatest, newBlob, newBlob, newEdge, newEdge, newElement, newElement, newElement, newInstance, newInstance, newLightweightEdge, newRegularEdge, newVertex, newVertex, query, queryClosed, queryStarted, rawBegin, registerHook, registerHook, release, reload, reload, reload, reload, reload, reloadUser, resetInitialization, resetRecordLoadStats, restore, rollback, rollback, save, save, save, save, setConflictStrategy, setConflictStrategy, setCurrentDatabaseInThreadLocal, setDatabaseOwner, setDefaultClusterIdInternal, setDefaultSerializer, setDefaultTransactionMode, setInternal, setMVCC, setPrefetchRecords, setProperty, setRetainRecords, setSerializer, setStatus, setStatusInternal, setUseLightweightEdges, setUser, setValidationEnabled, swapTx, truncateCluster, unregisterHookbrowseListeners, getListenersCopy, registerListener, resetListeners, unregisterListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCommandInterruptionDepth, getHaStatus, isCommandInterrupted, isStorageCommitHappening, queryOnNode, realClose, removeHaServer, reuse, setCommandInterrupted, setCommandInterruptionDepth, setStorageCommitHappeningcreateClassIfNotExist, createEdgeClass, createVertexClass, newEdge, newVertexcreateClass, executeWithRetry, getClass, registerListener, unregisterListenercreateInterruptTimerTask, getActiveClusterMap, getActiveDataCenterMap, getEnterpriseEndpoint, getLocalNodeName, interruptExecution, isShardedprotected OStorageRemoteSession sessionMetadata
public ODatabaseDocumentRemote(OStorageRemote storage)
public <DB extends ODatabase> DB open(String iUserName, String iUserPassword)
ODatabaseiUserName - Username to loginiUserPassword - Password associated to the user@Deprecated public <DB extends ODatabase> DB open(OToken iToken)
ODatabaseInternaliToken - Authentication tokenpublic <DB extends ODatabase> DB create()
ODatabasepublic <DB extends ODatabase> DB create(String incrementalBackupPath)
ODatabaseDB - Concrete database instance type.incrementalBackupPath - Path to incremental backuppublic <DB extends ODatabase> DB create(Map<OGlobalConfiguration,Object> iInitialSettings)
ODatabasepublic void drop()
ODatabasepublic <DB extends ODatabase> DB set(ODatabase.ATTRIBUTES iAttribute, Object iValue)
ODatabaseiAttribute - Attributes between #ATTRIBUTES enumiValue - Value to setpublic ODatabaseDocumentInternal copy()
public boolean exists()
ODatabasepublic void internalOpen(String user, String password, OrientDBConfig config)
protected void loadMetadata()
loadMetadata in class ODatabaseDocumentAbstractpublic ODatabaseDocumentAbstract begin(OTransaction.TXTYPE iType)
ODatabaseODatabase.commit() or ODatabase.rollback().begin in interface ODatabase<ORecord>begin in class ODatabaseDocumentAbstractpublic OStorageRemoteSession getSessionMetadata()
public void setSessionMetadata(OStorageRemoteSession sessionMetadata)
public OStorageRemote getStorage()
ODatabaseInternalOStoragepublic void replaceStorage(OStorage iNewStorage)
ODatabaseInternaliNewStorage - The new storage to use. Usually it's a wrapped instance of the current cluster.public OResultSet query(String query, Object[] args)
ODatabase
OResultSet rs = db.query("SELECT FROM V where name = ?", "John"); while(rs.hasNext()){ OResult item = rs.next(); ... }
rs.close();
query - the query stringargs - query parameters (positional)public OResultSet query(String query, Map args)
ODatabase
Map<String, Object> params = new HashMapMap<>(); params.put("name", "John"); OResultSet rs = db.query("SELECT FROM V
where name = :name", params); while(rs.hasNext()){ OResult item = rs.next(); ... } rs.close();
query - the query stringargs - query parameters (named)public OResultSet indexQuery(String indexName, String query, Object... args)
public OResultSet command(String query, Object... args)
ODatabase
OResultSet rs = db.command("INSERT INTO Person SET name = ?", "John"); ... rs.close();
args - query argumentspublic OResultSet command(String query, Map args)
ODatabase
Map<String, Object> params = new HashMapMap<>(); params.put("name", "John"); OResultSet rs = db.query("INSERT INTO
Person SET name = :name", params); ... rs.close();
public OResultSet execute(String language, String script, Object... args) throws OCommandExecutionException, OCommandScriptException
ODatabase
OResultSet rs = db.execute("sql", script, "Surname1", "Surname2", "Surname3"); ... rs.close();
String script = "INSERT INTO Person SET name = 'foo', surname = ?;"+ "INSERT INTO Person SET name = 'bar', surname = ?;"+
"INSERT INTO Person SET name = 'baz', surname = ?;";
OCommandExecutionExceptionOCommandScriptExceptionpublic OResultSet execute(String language, String script, Map<String,?> args) throws OCommandExecutionException, OCommandScriptException
ODatabase
String script = "INSERT INTO Person SET name = 'foo', surname = :surname1;"+ "INSERT INTO Person SET name = 'bar', surname =
:surname2;"+ "INSERT INTO Person SET name = 'baz', surname = :surname3;";
OResultSet rs = db.execute("sql", script, params); ... rs.close();
Map<String, Object> params = new HashMapMap<>(); params.put("surname1", "Jones"); params.put("surname2", "May");
params.put("surname3", "Ali");
OCommandExecutionExceptionOCommandScriptExceptionpublic void closeQuery(String queryId)
public void fetchNextPage(ORemoteResultSet rs)
public OLiveQueryMonitor live(String query, OLiveQueryResultListener listener, Object... args)
ODatabasequery - live querylistener - the listener that receive the query resultsargs - the live query argspublic OLiveQueryMonitor live(String query, OLiveQueryResultListener listener, Map<String,?> args)
ODatabasequery - live querylistener - the listener that receive the query resultsargs - the live query argspublic void recycle(ORecord record)
protected OMicroTransaction beginMicroTransaction()
public static void deInit(OStorageRemote storage)
public static void updateSchema(OStorageRemote storage, ODocument schema)
public static void updateIndexManager(OStorageRemote storage, ODocument indexManager)
public static void updateFunction(OStorageRemote storage)
public static void updateSequences(OStorageRemote storage)
public int addBlobCluster(String iClusterName, Object... iParameters)
ODatabaseiClusterName - Cluster nameiParameters - Additional parameters to pass to the factoriespublic <RET extends ORecord> RET executeSaveRecord(ORecord record, String clusterName, int ver, ODatabase.OPERATION_MODE mode, boolean forceCreate, ORecordCallback<? extends Number> recordCreatedCallback, ORecordCallback<Integer> recordUpdatedCallback)
executeSaveRecord in interface ODatabaseDocumentInternalexecuteSaveRecord in class ODatabaseDocumentAbstractpublic void executeDeleteRecord(OIdentifiable record, int iVersion, boolean iRequired, ODatabase.OPERATION_MODE iMode, boolean prohibitTombstones)
executeDeleteRecord in interface ODatabaseDocumentInternalexecuteDeleteRecord in class ODatabaseDocumentAbstractprotected byte[] updateStream(ORecord record)
public OIdentifiable beforeCreateOperations(OIdentifiable id, String iClusterName)
public OIdentifiable beforeUpdateOperations(OIdentifiable id, String iClusterName)
public void beforeDeleteOperations(OIdentifiable id, String iClusterName)
public void afterUpdateOperations(OIdentifiable id)
public void afterCreateOperations(OIdentifiable id)
public void afterDeleteOperations(OIdentifiable id)
public boolean beforeReadOperations(OIdentifiable identifiable)
public void afterReadOperations(OIdentifiable identifiable)
public ODatabaseDocumentAbstract delete(ORecord record)
ODatabaserecord - The entity to delete.Copyright © 2009–2025 OrientDB. All rights reserved.