
@Deprecated public class ODatabaseDocumentTx extends Object implements ODatabaseDocumentInternal
OrientDB instead.ODatabase.ATTRIBUTES, ODatabase.OPERATION_MODE, ODatabase.STATUS| Modifier and Type | Field and Description |
|---|---|
protected static ConcurrentMap<String,OrientDBInternal> |
embedded
Deprecated.
|
protected ODatabaseDocumentInternal |
internal
Deprecated.
|
protected AtomicReference<Thread> |
owner
Deprecated.
|
protected static ConcurrentMap<String,OrientDBInternal> |
remote
Deprecated.
|
TYPE| Modifier | Constructor and Description |
|---|---|
protected |
ODatabaseDocumentTx(ODatabaseDocumentInternal ref,
String baseUrl)
Deprecated.
|
|
ODatabaseDocumentTx(String url)
Deprecated.
|
protected |
ODatabaseDocumentTx(String url,
boolean ownerProtection)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
ODatabase |
activateOnCurrentThread()
Deprecated.
Activate current database instance on current thread.
|
int |
addBlobCluster(String iClusterName,
Object... iParameters)
Deprecated.
Add a cluster for blob records.
|
int |
addCluster(String iClusterName,
int iRequestedId)
Deprecated.
Adds a new cluster.
|
int |
addCluster(String iClusterName,
Object... iParameters)
Deprecated.
Adds a new cluster.
|
void |
afterCreateOperations(OIdentifiable id)
Deprecated.
|
void |
afterDeleteOperations(OIdentifiable id)
Deprecated.
|
void |
afterReadOperations(OIdentifiable identifiable)
Deprecated.
|
void |
afterUpdateOperations(OIdentifiable id)
Deprecated.
|
int |
assignAndCheckCluster(ORecord record,
String iClusterName)
Deprecated.
|
List<String> |
backup(OutputStream out,
Map<String,Object> options,
Callable<Object> callable,
OCommandOutputListener iListener,
int compressionLevel,
int bufferSize)
Deprecated.
Executes a backup of the database.
|
OIdentifiable |
beforeCreateOperations(OIdentifiable id,
String iClusterName)
Deprecated.
|
void |
beforeDeleteOperations(OIdentifiable id,
String iClusterName)
Deprecated.
|
boolean |
beforeReadOperations(OIdentifiable identifiable)
Deprecated.
|
OIdentifiable |
beforeUpdateOperations(OIdentifiable id,
String iClusterName)
Deprecated.
|
ODatabase<ORecord> |
begin()
Deprecated.
Begins a new transaction.
|
ODatabase<ORecord> |
begin(OTransaction.TXTYPE iStatus)
Deprecated.
Begins a new transaction specifying the transaction type.
|
ODatabase<ORecord> |
begin(OTransaction iTx)
Deprecated.
Attaches a transaction as current.
|
ORecordIteratorClass<ODocument> |
browseClass(String iClassName)
Deprecated.
Browses all the records of the specified class and also all the subclasses.
|
ORecordIteratorClass<ODocument> |
browseClass(String iClassName,
boolean iPolymorphic)
Deprecated.
Browses all the records of the specified class and if iPolymorphic is true also all the
subclasses.
|
ORecordIteratorCluster<ODocument> |
browseCluster(String iClusterName)
Deprecated.
Browses all the records of the specified cluster.
|
<REC extends ORecord> |
browseCluster(String iClusterName,
Class<REC> iRecordClass)
Deprecated.
Browses all the records of the specified cluster of the passed record type.
|
<REC extends ORecord> |
browseCluster(String iClusterName,
Class<REC> iRecordClass,
long startClusterPosition,
long endClusterPosition)
Deprecated.
|
<REC extends ORecord> |
browseCluster(String iClusterName,
Class<REC> iRecordClass,
long startClusterPosition,
long endClusterPosition,
boolean loadTombstones)
Deprecated.
|
ORecordIteratorCluster<ODocument> |
browseCluster(String iClusterName,
long startClusterPosition,
long endClusterPosition,
boolean loadTombstones)
Deprecated.
|
ORecordHook.RESULT |
callbackHooks(ORecordHook.TYPE type,
OIdentifiable id)
Deprecated.
|
void |
callOnCloseListeners()
Deprecated.
|
void |
callOnDropListeners()
Deprecated.
|
void |
callOnOpenListeners()
Deprecated.
|
void |
checkForClusterPermissions(String name)
Deprecated.
|
void |
checkIfActive()
Deprecated.
|
protected void |
checkOpenness()
Deprecated.
|
<DB extends ODatabaseDocument> |
checkSecurity(ORule.ResourceGeneric iResourceGeneric,
int iOperation,
Object... iResourcesSpecific)
Deprecated.
Checks if the operation against multiple resources is allowed for the current user.
|
<DB extends ODatabaseDocument> |
checkSecurity(ORule.ResourceGeneric iResourceGeneric,
int iOperation,
Object iResourceSpecific)
Deprecated.
Checks if the operation on a resource is allowed for the current user.
|
<DB extends ODatabaseDocument> |
checkSecurity(ORule.ResourceGeneric resourceGeneric,
String resourceSpecific,
int iOperation)
Deprecated.
Checks if the operation on a resource is allowed for the current user.
|
<DB extends ODatabaseDocument> |
checkSecurity(String iResource,
int iOperation)
Deprecated.
Checks if the operation on a resource is allowed for the current user.
|
<DB extends ODatabaseDocument> |
checkSecurity(String iResourceGeneric,
int iOperation,
Object... iResourcesSpecific)
Deprecated.
Checks if the operation against multiple resources is allowed for the current user.
|
<DB extends ODatabaseDocument> |
checkSecurity(String iResourceGeneric,
int iOperation,
Object iResourceSpecific)
Deprecated.
Checks if the operation on a resource is allowed for the current user.
|
ODatabaseDocumentInternal |
cleanOutRecord(ORID rid,
int version)
Deprecated.
|
protected void |
clearOwner()
Deprecated.
|
void |
close()
Deprecated.
Closes an opened database, if the database is already closed does nothing, if a transaction is
active will be rollback.
|
static void |
closeAll()
Deprecated.
|
<RET extends OCommandRequest> |
command(OCommandRequest iCommand)
Deprecated.
Creates a command request to run a command against the database (you have to invoke
.execute(parameters) to actually execute it).
|
OResultSet |
command(String query,
Map args)
Deprecated.
Executes a generic (idempotent or non idempotent) command.
|
OResultSet |
command(String query,
Object... args)
Deprecated.
Executes a generic (idempotent or non idempotent) command.
|
ODatabase<ORecord> |
commit()
Deprecated.
Commits the current transaction.
|
ODatabase<ORecord> |
commit(boolean force)
Deprecated.
|
ODatabaseDocumentTx |
copy()
Deprecated.
|
long |
countClass(String iClassName)
Deprecated.
Counts the entities contained in the specified class and sub classes (polymorphic).
|
long |
countClass(String iClassName,
boolean iPolymorphic)
Deprecated.
Counts the entities contained in the specified class.
|
long |
countClusterElements(int iCurrentClusterId)
Deprecated.
Counts all the entities in the specified cluster id.
|
long |
countClusterElements(int[] iClusterIds)
Deprecated.
Counts all the entities in the specified cluster ids.
|
long |
countClusterElements(int[] iClusterIds,
boolean countTombstones)
Deprecated.
|
long |
countClusterElements(int iCurrentClusterId,
boolean countTombstones)
Deprecated.
|
long |
countClusterElements(String iClusterName)
Deprecated.
Counts all the entities in the specified cluster name.
|
long |
countView(String viewName)
Deprecated.
|
<DB extends ODatabase> |
create()
Deprecated.
Creates a new database.
|
<DB extends ODatabase> |
create(Map<OGlobalConfiguration,Object> iInitialSettings)
Deprecated.
Creates a new database passing initial settings.
|
<DB extends ODatabase> |
create(String incrementalBackupPath)
Deprecated.
|
boolean |
declareIntent(OIntent iIntent)
Deprecated.
Declares an intent to the database.
|
ODatabase<ORecord> |
delete(ORecord iObject)
Deprecated.
Deletes an entity from the database in synchronous mode.
|
ODatabase<ORecord> |
delete(ORID iRID)
Deprecated.
Deletes the entity with the received RID from the database.
|
ODatabase<ORecord> |
delete(ORID iRID,
int iVersion)
Deprecated.
Deletes the entity with the received RID from the database.
|
void |
drop()
Deprecated.
Drops a database.
|
boolean |
dropCluster(int iClusterId)
Deprecated.
Drops a cluster by its id.
|
boolean |
dropCluster(String iClusterName)
Deprecated.
Drops a cluster by its name.
|
OResultSet |
execute(String language,
String script,
Map<String,?> args)
Deprecated.
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)
Deprecated.
Execute a script in a specified query language.
|
void |
executeDeleteRecord(OIdentifiable record,
int iVersion,
boolean iRequired,
ODatabase.OPERATION_MODE iMode,
boolean prohibitTombstones)
Deprecated.
|
<RET extends ORecord> |
executeReadRecord(ORecordId rid,
ORecord iRecord,
int recordVersion,
String fetchPlan,
boolean ignoreCache,
boolean iUpdateCache,
boolean loadTombstones,
OStorage.LOCKING_STRATEGY lockingStrategy,
RecordReader recordReader)
Deprecated.
|
boolean |
exists()
Deprecated.
Checks if the database exists.
|
boolean |
existsCluster(String iClusterName)
Deprecated.
Returns true if the cluster exists, otherwise false.
|
void |
freeze()
Deprecated.
Flush all indexes and cached storage content to the disk.
|
void |
freeze(boolean throwException)
Deprecated.
Flush all indexes and cached storage content to the disk.
|
Object |
get(ODatabase.ATTRIBUTES iAttribute)
Deprecated.
Returns a database attribute value
|
OIntent |
getActiveIntent()
Deprecated.
Get the active intent in the current session.
|
Set<Integer> |
getBlobClusterIds()
Deprecated.
Retrieve the set of defined blob cluster.
|
int |
getClusterIdByName(String iClusterName)
Deprecated.
Returns the cluster id by name.
|
String |
getClusterName(ORecord record)
Deprecated.
|
String |
getClusterNameById(int iClusterId)
Deprecated.
Returns the cluster name by id.
|
Collection<String> |
getClusterNames()
Deprecated.
Returns all the names of the clusters.
|
long |
getClusterRecordSizeById(int iClusterId)
Deprecated.
Returns the total size of records contained in the cluster defined by its id.
|
long |
getClusterRecordSizeByName(String iClusterName)
Deprecated.
Returns the total size of records contained in the cluster defined by its name.
|
int |
getClusters()
Deprecated.
Returns the number of clusters.
|
Map<UUID,OBonsaiCollectionPointer> |
getCollectionsChanges()
Deprecated.
|
OContextConfiguration |
getConfiguration()
Deprecated.
Returns the database configuration settings.
|
ORecordConflictStrategy |
getConflictStrategy()
Deprecated.
Returns the current record conflict strategy.
|
ODatabaseInternal<?> |
getDatabaseOwner()
Deprecated.
Returns the database owner.
|
int |
getDefaultClusterId()
Deprecated.
Returns the default cluster id.
|
static ORecordSerializer |
getDefaultSerializer()
Deprecated.
|
ODictionary<ORecord> |
getDictionary()
Deprecated.
|
Map<ORecordHook,ORecordHook.HOOK_POSITION> |
getHooks()
Deprecated.
Retrieves all the registered hooks.
|
Iterable<ODatabaseListener> |
getListeners()
Deprecated.
Retrieves all the registered listeners.
|
OLocalRecordCache |
getLocalCache()
Deprecated.
Returns the level1 cache.
|
OMetadataInternal |
getMetadata()
Deprecated.
Return the OMetadata instance.
|
OBasicTransaction |
getMicroOrRegularTransaction()
Deprecated.
The active implicit micro-transaction or active/inactive regular transaction.
|
String |
getName()
Deprecated.
Returns the database name.
|
protected static OrientDBInternal |
getOrCreateEmbeddedFactory(String baseUrl,
OrientDBConfig config)
Deprecated.
|
protected static OrientDBInternal |
getOrCreateRemoteFactory(String baseUrl)
Deprecated.
|
Iterator<Map.Entry<String,Object>> |
getProperties()
Deprecated.
Returns an iterator of the property entries
|
Object |
getProperty(String iName)
Deprecated.
Gets the property value.
|
<RET extends ORecord> |
getRecord(OIdentifiable iIdentifiable)
Deprecated.
Returns the record for a OIdentifiable instance.
|
ORecordMetadata |
getRecordMetadata(ORID rid)
Deprecated.
|
byte |
getRecordType()
Deprecated.
Returns the default record type for this kind of database.
|
OSBTreeCollectionManager |
getSbTreeCollectionManager()
Deprecated.
Internal.
|
ORecordSerializer |
getSerializer()
Deprecated.
|
OBinarySerializerFactory |
getSerializerFactory()
Deprecated.
|
OSharedContext |
getSharedContext()
Deprecated.
|
long |
getSize()
Deprecated.
Returns the total size of database as used space.
|
ODatabase.STATUS |
getStatus()
Deprecated.
Returns the current status of database.
|
OStorage |
getStorage()
Deprecated.
|
OStorageInfo |
getStorageInfo()
Deprecated.
|
OCurrentStorageComponentsFactory |
getStorageVersions()
Deprecated.
Internal.
|
OTransaction |
getTransaction()
Deprecated.
Return active transaction.
|
String |
getType()
Deprecated.
|
<DB extends ODatabase> |
getUnderlying()
Deprecated.
Return the underlying database.
|
String |
getURL()
Deprecated.
Returns the database URL.
|
OSecurityUser |
getUser()
Deprecated.
Returns the current user logged into the database.
|
OView |
getViewFromCluster(int cluster)
Deprecated.
|
String |
incrementalBackup(String path)
Deprecated.
Performs incremental backup of database content to the selected folder.
|
void |
internalClose(boolean recycle)
Deprecated.
|
void |
internalCommit(OTransactionInternal transaction)
Deprecated.
Executed the commit on the storage hiding away storage concepts from the transaction
|
void |
internalLockRecord(OIdentifiable iRecord,
OStorage.LOCKING_STRATEGY lockingStrategy)
Deprecated.
|
void |
internalUnlockRecord(OIdentifiable iRecord)
Deprecated.
|
boolean |
isActiveOnCurrentThread()
Deprecated.
Returns true if the current database instance is active on current thread, otherwise false.
|
boolean |
isClosed()
Deprecated.
Checks if the database is closed.
|
boolean |
isClusterEdge(int cluster)
Deprecated.
|
boolean |
isClusterVertex(int cluster)
Deprecated.
|
boolean |
isClusterView(int cluster)
Deprecated.
|
boolean |
isMVCC()
Deprecated.
Returns if the Multi Version Concurrency Control is enabled or not.
|
boolean |
isPooled()
Deprecated.
|
boolean |
isPrefetchRecords()
Deprecated.
|
boolean |
isRemote()
Deprecated.
|
boolean |
isRetainRecords()
Deprecated.
Returns true if current configuration retains objects, otherwise false
|
boolean |
isUseLightweightEdges()
Deprecated.
|
boolean |
isValidationEnabled()
Deprecated.
Tells if validation of record is active.
|
OLiveQueryMonitor |
live(String query,
OLiveQueryResultListener listener,
Map<String,?> args)
Deprecated.
Subscribe a query as a live query for future create/update event with the referred conditions
|
OLiveQueryMonitor |
live(String query,
OLiveQueryResultListener listener,
Object... args)
Deprecated.
Subscribe a query as a live query for future create/update event with the referred conditions
|
<RET extends ORecord> |
load(ORecord iObject)
Deprecated.
Loads the entity and return it.
|
<RET extends ORecord> |
load(ORecord iObject,
String iFetchPlan)
Deprecated.
Loads a record using a fetch plan.
|
<RET extends ORecord> |
load(ORecord iObject,
String iFetchPlan,
boolean iIgnoreCache)
Deprecated.
Loads a record using a fetch plan.
|
<RET extends ORecord> |
load(ORID recordId)
Deprecated.
Loads the entity by the Record ID.
|
<RET extends ORecord> |
load(ORID iRecordId,
String iFetchPlan)
Deprecated.
Loads the entity by the Record ID using a fetch plan.
|
<RET extends ORecord> |
load(ORID iRecordId,
String iFetchPlan,
boolean iIgnoreCache)
Deprecated.
Loads the entity by the Record ID using a fetch plan and specifying if the cache must be
ignored.
|
<RET extends ORecord> |
loadIfVersionIsNotLatest(ORID rid,
int recordVersion,
String fetchPlan,
boolean ignoreCache)
Deprecated.
|
<RET extends ORecord> |
lock(ORID recordId)
Deprecated.
Pessimistic lock a record.
|
<RET extends ORecord> |
lock(ORID recordId,
long timeout,
TimeUnit timeoutUnit)
Deprecated.
Pessimistic lock a record.
|
OBlob |
newBlob()
Deprecated.
Create a new empty instance of a blob.
|
OBlob |
newBlob(byte[] bytes)
Deprecated.
Create a new instance of a blob containing the given bytes.
|
OEdge |
newEdge(OVertex from,
OVertex to,
OClass type)
Deprecated.
Creates a new Edge
|
OEdge |
newEdge(OVertex from,
OVertex to,
String type)
Deprecated.
Creates a new Edge
|
OElement |
newElement()
Deprecated.
|
OElement |
newElement(String className)
Deprecated.
|
OElement |
newEmbeddedElement()
Deprecated.
|
OElement |
newEmbeddedElement(String className)
Deprecated.
|
ODocument |
newInstance()
Deprecated.
Creates a new entity instance.
|
ODocument |
newInstance(String iClassName)
Deprecated.
Creates a new entity instance.
|
OEdge |
newLightweightEdge(String iClassName,
OVertex from,
OVertex to)
Deprecated.
|
OEdge |
newRegularEdge(String iClassName,
OVertex from,
OVertex to)
Deprecated.
|
OVertex |
newVertex(OClass type)
Deprecated.
Creates a new Vertex
|
OVertex |
newVertex(String iClassName)
Deprecated.
Creates a new Vertex
|
<DB extends ODatabase> |
open(OToken iToken)
Deprecated.
Opens a database using an authentication token received as an argument.
|
<DB extends ODatabase> |
open(String iUserName,
String iUserPassword)
Deprecated.
Opens a database using the user and password received as arguments.
|
<RET extends List<?>> |
query(OQuery<?> iCommand,
Object... iArgs)
Deprecated.
Execute a query against the database.
|
OResultSet |
query(String query,
Map args)
Deprecated.
Executes an SQL query (idempotent).
|
OResultSet |
query(String query,
Object... args)
Deprecated.
Executes an SQL query.
|
void |
rawBegin(OTransaction transaction)
Deprecated.
|
void |
recycle(ORecord record)
Deprecated.
|
<DB extends ODatabase<?>> |
registerHook(ORecordHook iHookImpl)
Deprecated.
Registers a hook to listen all events for Records.
|
<DB extends ODatabase<?>> |
registerHook(ORecordHook iHookImpl,
ORecordHook.HOOK_POSITION iPosition)
Deprecated.
|
void |
registerListener(ODatabaseListener iListener)
Deprecated.
Registers a listener to the database events.
|
void |
release()
Deprecated.
Allows to execute write-related commands on DB.
|
void |
reload()
Deprecated.
Reloads the database information like the cluster list.
|
<RET extends ORecord> |
reload(ORecord iObject,
String iFetchPlan,
boolean iIgnoreCache)
Deprecated.
Force the reloading of the entity.
|
<RET extends ORecord> |
reload(ORecord iObject,
String iFetchPlan,
boolean iIgnoreCache,
boolean force)
Deprecated.
Force the reloading of the entity.
|
void |
reloadUser()
Deprecated.
|
void |
replaceStorage(OStorage iNewStorage)
Deprecated.
Internal only: replace the storage with a new one.
|
void |
resetInitialization()
Deprecated.
|
void |
restore(InputStream in,
Map<String,Object> options,
Callable<Object> callable,
OCommandOutputListener iListener)
Deprecated.
Executes a restore of a database backup.
|
ODatabase<ORecord> |
rollback()
Deprecated.
Aborts the current running transaction.
|
ODatabase<ORecord> |
rollback(boolean force)
Deprecated.
|
<RET extends ORecord> |
save(ORecord iObject)
Deprecated.
Saves an entity in synchronous mode.
|
<RET extends ORecord> |
save(ORecord iObject,
ODatabase.OPERATION_MODE iMode,
boolean iForceCreate,
ORecordCallback<? extends Number> iRecordCreatedCallback,
ORecordCallback<Integer> iRecordUpdatedCallback)
Deprecated.
Saves an entity specifying the mode.
|
<RET extends ORecord> |
save(ORecord iObject,
String iClusterName)
Deprecated.
Saves an entity in the specified cluster in synchronous mode.
|
<RET extends ORecord> |
save(ORecord iObject,
String iClusterName,
ODatabase.OPERATION_MODE iMode,
boolean iForceCreate,
ORecordCallback<? extends Number> iRecordCreatedCallback,
ORecordCallback<Integer> iRecordUpdatedCallback)
Deprecated.
Saves an entity in the specified cluster specifying the mode.
|
ORecord |
saveAll(ORecord iRecord,
String iClusterName,
ODatabase.OPERATION_MODE iMode,
boolean iForceCreate,
ORecordCallback<? extends Number> iRecordCreatedCallback,
ORecordCallback<Integer> iRecordUpdatedCallback)
Deprecated.
|
<T> T |
sendSequenceAction(OSequenceAction action)
Deprecated.
|
<DB extends ODatabase> |
set(ODatabase.ATTRIBUTES iAttribute,
Object iValue)
Deprecated.
Sets a database attribute value
|
<DB extends ODatabase<?>> |
setConflictStrategy(ORecordConflictStrategy iResolver)
Deprecated.
Overrides record conflict strategy.
|
<DB extends ODatabase<?>> |
setConflictStrategy(String iStrategyName)
Deprecated.
Overrides record conflict strategy selecting the strategy by name.
|
<DB extends ODatabase> |
setCustom(String name,
Object iValue)
Deprecated.
|
ODatabaseInternal<?> |
setDatabaseOwner(ODatabaseInternal<?> iOwner)
Deprecated.
Internal.
|
static void |
setDefaultSerializer(ORecordSerializer defaultSerializer)
Deprecated.
|
void |
setDefaultTransactionMode(Map<ORID,OTransactionAbstract.LockedRecordMetadata> noTxLocks)
Deprecated.
|
void |
setInternal(ODatabase.ATTRIBUTES attribute,
Object iValue)
Deprecated.
Internal method.
|
<DB extends ODatabase<?>> |
setMVCC(boolean iValue)
Deprecated.
Enables or disables the Multi-Version Concurrency Control.
|
void |
setPrefetchRecords(boolean prefetchRecords)
Deprecated.
|
Object |
setProperty(String iName,
Object iValue)
Deprecated.
Sets a property value
|
ODatabaseDocument |
setRetainRecords(boolean iValue)
Deprecated.
Specifies if retain handled objects in memory or not.
|
void |
setSerializer(ORecordSerializer serializer)
Deprecated.
|
<DB extends ODatabase> |
setStatus(ODatabase.STATUS iStatus)
Deprecated.
Set the current status of database.
|
protected void |
setupThreadOwner()
Deprecated.
|
void |
setUseLightweightEdges(boolean b)
Deprecated.
|
void |
setUser(OSecurityUser user)
Deprecated.
Set user for current database instance.
|
<DB extends ODatabaseDocument> |
setValidationEnabled(boolean iEnabled)
Deprecated.
Enables or disables the record validation.
|
void |
truncateCluster(String clusterName)
Deprecated.
Removes all data in the cluster with given name.
|
void |
unlock(ORID recordId)
Deprecated.
Pessimistic unlock
|
<DB extends ODatabase<?>> |
unregisterHook(ORecordHook iHookImpl)
Deprecated.
Unregisters a previously registered hook.
|
void |
unregisterListener(ODatabaseListener iListener)
Deprecated.
Unregisters a listener to the database events.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetActiveQueries, getActiveQuery, getCommandInterruptionDepth, getHaStatus, indexQuery, isCommandInterrupted, isDistributed, queryOnNode, realClose, removeHaServer, reuse, setCommandInterrupted, setCommandInterruptionDepth, swapTx, sync, syncCommitcreateClassIfNotExist, createEdgeClass, createVertexClass, newEdge, newVertexcreateClass, executeWithRetry, getClassaddRidbagPrefetchStats, createInterruptTimerTask, getActiveClusterMap, getActiveDataCenterMap, getEnterpriseEndpoint, getLocalNodeName, getStats, isSharded, resetRecordLoadStatsprotected static ConcurrentMap<String,OrientDBInternal> embedded
protected static ConcurrentMap<String,OrientDBInternal> remote
protected ODatabaseDocumentInternal internal
protected final AtomicReference<Thread> owner
@Deprecated public ODatabaseDocumentTx(String url)
protected ODatabaseDocumentTx(String url, boolean ownerProtection)
protected ODatabaseDocumentTx(ODatabaseDocumentInternal ref, String baseUrl)
public static void closeAll()
protected static OrientDBInternal getOrCreateRemoteFactory(String baseUrl)
protected static OrientDBInternal getOrCreateEmbeddedFactory(String baseUrl, OrientDBConfig config)
public static ORecordSerializer getDefaultSerializer()
public static void setDefaultSerializer(ORecordSerializer defaultSerializer)
public OCurrentStorageComponentsFactory getStorageVersions()
ODatabaseDocumentInternalgetStorageVersions in interface ODatabaseDocumentInternalpublic OSBTreeCollectionManager getSbTreeCollectionManager()
ODatabaseDocumentInternalgetSbTreeCollectionManager in interface ODatabaseDocumentInternalpublic OBinarySerializerFactory getSerializerFactory()
getSerializerFactory in interface ODatabaseDocumentInternalpublic ORecordSerializer getSerializer()
getSerializer in interface ODatabaseDocumentInternalpublic int assignAndCheckCluster(ORecord record, String iClusterName)
assignAndCheckCluster in interface ODatabaseDocumentInternalpublic <RET extends ORecord> RET loadIfVersionIsNotLatest(ORID rid, int recordVersion, String fetchPlan, boolean ignoreCache) throws ORecordNotFoundException
loadIfVersionIsNotLatest in interface ODatabaseDocumentInternalORecordNotFoundExceptionpublic void reloadUser()
reloadUser in interface ODatabaseDocumentInternalpublic ORecordHook.RESULT callbackHooks(ORecordHook.TYPE type, OIdentifiable id)
callbackHooks in interface ODatabaseDocumentInternalpublic <RET extends ORecord> RET executeReadRecord(ORecordId rid, ORecord iRecord, int recordVersion, String fetchPlan, boolean ignoreCache, boolean iUpdateCache, boolean loadTombstones, OStorage.LOCKING_STRATEGY lockingStrategy, RecordReader recordReader)
executeReadRecord in interface ODatabaseDocumentInternalpublic void executeDeleteRecord(OIdentifiable record, int iVersion, boolean iRequired, ODatabase.OPERATION_MODE iMode, boolean prohibitTombstones)
executeDeleteRecord in interface ODatabaseDocumentInternalpublic void setDefaultTransactionMode(Map<ORID,OTransactionAbstract.LockedRecordMetadata> noTxLocks)
setDefaultTransactionMode in interface ODatabaseDocumentInternalpublic OMetadataInternal getMetadata()
ODatabasegetMetadata in interface ODatabase<ORecord>getMetadata in interface ODatabaseDocumentInternalpublic <DB extends ODatabase<?>> DB registerHook(ORecordHook iHookImpl)
ODatabaseregisterHook in interface ODatabase<ORecord>iHookImpl - ORecordHook implementationpublic <DB extends ODatabase<?>> DB registerHook(ORecordHook iHookImpl, ORecordHook.HOOK_POSITION iPosition)
registerHook in interface ODatabase<ORecord>public Map<ORecordHook,ORecordHook.HOOK_POSITION> getHooks()
ODatabasepublic <DB extends ODatabase<?>> DB unregisterHook(ORecordHook iHookImpl)
ODatabaseunregisterHook in interface ODatabase<ORecord>iHookImpl - ORecordHook implementationpublic boolean isMVCC()
ODatabaseisMVCC in interface ODatabase<ORecord>deprecated since 2.2public Iterable<ODatabaseListener> getListeners()
ODatabasegetListeners in interface ODatabase<ORecord>public <DB extends ODatabase<?>> DB setMVCC(boolean iValue)
ODatabasesetMVCC in interface ODatabase<ORecord>ODatabase.isMVCC()public ORecordConflictStrategy getConflictStrategy()
ODatabasegetConflictStrategy in interface ODatabase<ORecord>public <DB extends ODatabase<?>> DB setConflictStrategy(String iStrategyName)
ODatabasesetConflictStrategy in interface ODatabase<ORecord>iStrategyName - ORecordConflictStrategy strategy namepublic <DB extends ODatabase<?>> DB setConflictStrategy(ORecordConflictStrategy iResolver)
ODatabasesetConflictStrategy in interface ODatabase<ORecord>iResolver - ORecordConflictStrategy implementationpublic String incrementalBackup(String path)
ODatabaseIf it will be first backup of data full content of database will be copied into folder otherwise only changes after last backup in the same folder will be copied.
incrementalBackup in interface ODatabase<ORecord>path - Path to backup folder.public ODatabaseDocumentTx copy()
copy in interface ODatabaseDocumentInternalpublic void checkIfActive()
checkIfActive in interface ODatabaseDocumentInternalprotected void checkOpenness()
public void callOnOpenListeners()
callOnOpenListeners in interface ODatabaseDocumentInternalpublic void callOnCloseListeners()
callOnCloseListeners in interface ODatabaseDocumentInternal@Deprecated public OStorage getStorage()
ODatabaseInternalgetStorage in interface ODatabaseInternal<ORecord>OStoragepublic OBasicTransaction getMicroOrRegularTransaction()
ODatabaseInternalgetMicroOrRegularTransaction in interface ODatabaseInternal<ORecord>public void setUser(OSecurityUser user)
ODatabaseInternalsetUser in interface ODatabaseInternal<ORecord>public void replaceStorage(OStorage iNewStorage)
ODatabaseInternalreplaceStorage in interface ODatabaseInternal<ORecord>iNewStorage - The new storage to use. Usually it's a wrapped instance of the current
cluster.public void resetInitialization()
resetInitialization in interface ODatabaseInternal<ORecord>public ODatabaseInternal<?> getDatabaseOwner()
ODatabaseInternalgetDatabaseOwner in interface ODatabaseInternal<ORecord>public ODatabaseInternal<?> setDatabaseOwner(ODatabaseInternal<?> iOwner)
ODatabaseInternalsetDatabaseOwner in interface ODatabaseInternal<ORecord>public <DB extends ODatabase> DB getUnderlying()
ODatabaseInternalgetUnderlying in interface ODatabaseInternal<ORecord>public void setInternal(ODatabase.ATTRIBUTES attribute, Object iValue)
ODatabaseInternalsetInternal in interface ODatabaseInternal<ORecord>public <DB extends ODatabase> DB open(OToken iToken)
ODatabaseInternalopen in interface ODatabaseInternal<ORecord>iToken - Authentication tokenpublic OSharedContext getSharedContext()
getSharedContext in interface ODatabaseInternal<ORecord>public ORecordIteratorClass<ODocument> browseClass(String iClassName)
ODatabaseDocumentbrowseClass in interface ODatabaseDocumentiClassName - Class name to iteratepublic ORecordIteratorClass<ODocument> browseClass(String iClassName, boolean iPolymorphic)
ODatabaseDocumentbrowseClass in interface ODatabaseDocumentiClassName - Class name to iterateiPolymorphic - Consider also the instances of the subclasses or notpublic void freeze()
ODatabaseDocumentAfter this call users can perform only select queries. All write-related commands will
queued till ODatabaseDocument.release() command will be called.
Given command waits till all on going modifications in indexes or DB will be finished.
IMPORTANT: This command is not reentrant.
freeze in interface ODatabaseDocumentfreeze in interface ODatabase<ORecord>ODatabase.release()public void release()
ODatabaseDocumentODatabaseDocument.freeze() command.release in interface ODatabaseDocumentrelease in interface ODatabase<ORecord>ODatabase.freeze()public void freeze(boolean throwException)
ODatabaseDocumentAfter this call users can perform only select queries. All write-related commands will
queued till ODatabaseDocument.release() command will be called or exception will be thrown on attempt to
modify DB data. Concrete behaviour depends on throwException parameter.
IMPORTANT: This command is not reentrant.
freeze in interface ODatabaseDocumentfreeze in interface ODatabase<ORecord>throwException - If true OModificationOperationProhibitedException
exception will be thrown in case of write command will be performed.public OVertex newVertex(String iClassName)
ODatabaseDocumentnewVertex in interface ODatabaseDocumentiClassName - the vertex type (class name)public OVertex newVertex(OClass type)
ODatabaseDocumentnewVertex in interface ODatabaseDocumenttype - the vertex typepublic OEdge newEdge(OVertex from, OVertex to, String type)
ODatabaseDocumentnewEdge in interface ODatabaseDocumentfrom - the starting point vertexto - the endpoint vertextype - the edge typepublic OEdge newEdge(OVertex from, OVertex to, OClass type)
ODatabaseDocumentnewEdge in interface ODatabaseDocumentfrom - the starting point vertexto - the endpoint vertextype - the edge typepublic OElement newElement()
newElement in interface ODatabaseDocumentpublic OElement newElement(String className)
newElement in interface ODatabaseDocumentpublic OElement newEmbeddedElement()
newEmbeddedElement in interface ODatabaseDocumentpublic OElement newEmbeddedElement(String className)
newEmbeddedElement in interface ODatabaseDocumentpublic boolean isUseLightweightEdges()
isUseLightweightEdges in interface ODatabaseDocumentInternalpublic void setUseLightweightEdges(boolean b)
setUseLightweightEdges in interface ODatabaseDocumentInternalpublic ODocument newInstance()
ODatabasenewInstance in interface ODatabase<ORecord>@Deprecated public ODictionary<ORecord> getDictionary()
getDictionary in interface ODatabase<ORecord>public OSecurityUser getUser()
ODatabasepublic <RET extends ORecord> RET load(ORecord iObject)
ODatabasepublic <RET extends ORecord> RET load(ORecord iObject, String iFetchPlan)
ODatabasepublic <RET extends ORecord> RET load(ORecord iObject, String iFetchPlan, boolean iIgnoreCache)
ODatabasepublic <RET extends ORecord> RET reload(ORecord iObject, String iFetchPlan, boolean iIgnoreCache)
ODatabasepublic <RET extends ORecord> RET reload(ORecord iObject, String iFetchPlan, boolean iIgnoreCache, boolean force)
ODatabasereload in interface ODatabase<ORecord>iObject - The entity to load. If the entity was already loaded it will be reloaded and all
the changes will be lost.iFetchPlan - Fetch plan usediIgnoreCache - Ignore cache or use itforce - Force to reload record even if storage has the same record as reloaded record, it
is useful if fetch plan is not null and alongside with root record linked records will be
reloaded.public <RET extends ORecord> RET load(ORID recordId)
ODatabasepublic <RET extends ORecord> RET load(ORID iRecordId, String iFetchPlan)
ODatabasepublic <RET extends ORecord> RET load(ORID iRecordId, String iFetchPlan, boolean iIgnoreCache)
ODatabasepublic <RET extends ORecord> RET save(ORecord iObject)
ODatabasepublic <RET extends ORecord> RET save(ORecord iObject, ODatabase.OPERATION_MODE iMode, boolean iForceCreate, ORecordCallback<? extends Number> iRecordCreatedCallback, ORecordCallback<Integer> iRecordUpdatedCallback)
ODatabasepublic <RET extends ORecord> RET save(ORecord iObject, String iClusterName)
ODatabasepublic <RET extends ORecord> RET save(ORecord iObject, String iClusterName, ODatabase.OPERATION_MODE iMode, boolean iForceCreate, ORecordCallback<? extends Number> iRecordCreatedCallback, ORecordCallback<Integer> iRecordUpdatedCallback)
ODatabasesave in interface ODatabase<ORecord>iObject - The entity to saveiClusterName - Name of the cluster where to saveiMode - Mode of save: synchronous (default) or asynchronousiForceCreate - Flag that indicates that record should be created. If record with current
rid already exists, exception is thrownpublic ODatabase<ORecord> delete(ORecord iObject)
ODatabasepublic ODatabase<ORecord> delete(ORID iRID)
ODatabasepublic ODatabase<ORecord> delete(ORID iRID, int iVersion)
ODatabasepublic ODatabaseDocumentInternal cleanOutRecord(ORID rid, int version)
cleanOutRecord in interface ODatabaseDocumentInternalpublic OTransaction getTransaction()
ODatabasegetTransaction in interface ODatabase<ORecord>public ODatabase<ORecord> begin()
ODatabaseODatabase.commit() or ODatabase.rollback().public ODatabase<ORecord> begin(OTransaction.TXTYPE iStatus)
ODatabaseODatabase.commit() or ODatabase.rollback().public ODatabase<ORecord> begin(OTransaction iTx) throws OTransactionException
ODatabasebegin in interface ODatabase<ORecord>OTransactionExceptionpublic void rawBegin(OTransaction transaction)
rawBegin in interface ODatabaseDocumentInternalpublic ODatabase<ORecord> commit() throws OTransactionException
ODatabasecommit in interface ODatabase<ORecord>OTransactionExceptionpublic ODatabase<ORecord> commit(boolean force) throws OTransactionException
commit in interface ODatabase<ORecord>OTransactionExceptionpublic ODatabase<ORecord> rollback() throws OTransactionException
ODatabaserollback in interface ODatabase<ORecord>OTransactionExceptionpublic ODatabase<ORecord> rollback(boolean force) throws OTransactionException
rollback in interface ODatabase<ORecord>OTransactionExceptionpublic <RET extends List<?>> RET query(OQuery<?> iCommand, Object... iArgs)
ODatabasepublic <RET extends OCommandRequest> RET command(OCommandRequest iCommand)
ODatabasepublic ORecordIteratorCluster<ODocument> browseCluster(String iClusterName)
ODatabaseDocumentbrowseCluster in interface ODatabaseDocumentiClusterName - Cluster name to iteratepublic ORecordIteratorCluster<ODocument> browseCluster(String iClusterName, long startClusterPosition, long endClusterPosition, boolean loadTombstones)
browseCluster in interface ODatabaseDocumentpublic <REC extends ORecord> ORecordIteratorCluster<REC> browseCluster(String iClusterName, Class<REC> iRecordClass)
ODatabaseDocumentbrowseCluster in interface ODatabaseDocumentiClusterName - Cluster name to iterateiRecordClass - The record class expectedpublic <REC extends ORecord> ORecordIteratorCluster<REC> browseCluster(String iClusterName, Class<REC> iRecordClass, long startClusterPosition, long endClusterPosition)
browseCluster in interface ODatabaseDocumentpublic <REC extends ORecord> ORecordIteratorCluster<REC> browseCluster(String iClusterName, Class<REC> iRecordClass, long startClusterPosition, long endClusterPosition, boolean loadTombstones)
browseCluster in interface ODatabaseDocumentpublic <RET extends ORecord> RET getRecord(OIdentifiable iIdentifiable)
ODatabaseDocumentgetRecord in interface ODatabaseDocumentpublic byte getRecordType()
ODatabaseDocumentgetRecordType in interface ODatabaseDocumentpublic boolean isRetainRecords()
ODatabaseDocumentisRetainRecords in interface ODatabaseDocumentODatabaseDocument.setRetainRecords(boolean)public ODatabaseDocument setRetainRecords(boolean iValue)
ODatabaseDocumentsetRetainRecords in interface ODatabaseDocumentiValue - True to enable, false to disable it.ODatabaseDocument.isRetainRecords()public <DB extends ODatabaseDocument> DB checkSecurity(ORule.ResourceGeneric resourceGeneric, String resourceSpecific, int iOperation)
ODatabaseDocumentcheckSecurity in interface ODatabaseDocumentresourceGeneric - Generic Resource where to execute the operationiOperation - Operation to execute against the resourcepublic <DB extends ODatabaseDocument> DB checkSecurity(ORule.ResourceGeneric iResourceGeneric, int iOperation, Object iResourceSpecific)
ODatabaseDocumentcheckSecurity in interface ODatabaseDocumentiResourceGeneric - Resource where to execute the operation, i.e.: database.clustersiOperation - Operation to execute against the resourceiResourceSpecific - Target resource, i.e.: "employee" to specify the cluster name.public <DB extends ODatabaseDocument> DB checkSecurity(ORule.ResourceGeneric iResourceGeneric, int iOperation, Object... iResourcesSpecific)
ODatabaseDocumentcheckSecurity in interface ODatabaseDocumentiResourceGeneric - Resource where to execute the operation, i.e.: database.clustersiOperation - Operation to execute against the resourceiResourcesSpecific - Target resources as an array of Objects, i.e.: ["employee", 2] to
specify cluster name and id.public boolean isValidationEnabled()
ODatabaseDocumentisValidationEnabled in interface ODatabaseDocumentpublic <DB extends ODatabaseDocument> DB setValidationEnabled(boolean iEnabled)
ODatabaseDocumentSince 2.2 this setting is persistent.
setValidationEnabled in interface ODatabaseDocumentiEnabled - True to enable, false to disablepublic <DB extends ODatabaseDocument> DB checkSecurity(String iResource, int iOperation)
ODatabaseDocumentcheckSecurity in interface ODatabaseDocumentiResource - Resource where to execute the operationiOperation - Operation to execute against the resourcepublic <DB extends ODatabaseDocument> DB checkSecurity(String iResourceGeneric, int iOperation, Object iResourceSpecific)
ODatabaseDocumentcheckSecurity in interface ODatabaseDocumentiResourceGeneric - Resource where to execute the operation, i.e.: database.clustersiOperation - Operation to execute against the resourceiResourceSpecific - Target resource, i.e.: "employee" to specify the cluster name.public <DB extends ODatabaseDocument> DB checkSecurity(String iResourceGeneric, int iOperation, Object... iResourcesSpecific)
ODatabaseDocumentcheckSecurity in interface ODatabaseDocumentiResourceGeneric - Resource where to execute the operation, i.e.: database.clustersiOperation - Operation to execute against the resourceiResourcesSpecific - Target resources as an array of Objects, i.e.: ["employee", 2] to
specify cluster name and id.public boolean isPooled()
isPooled in interface ODatabaseDocumenttrue if database is obtained from the pool and false
otherwise.public <DB extends ODatabase> DB open(String iUserName, String iUserPassword)
ODatabaseprotected void setupThreadOwner()
protected void clearOwner()
public <DB extends ODatabase> DB create()
ODatabase@Deprecated public <DB extends ODatabase> DB create(String incrementalBackupPath)
ODatabasepublic <DB extends ODatabase> DB create(Map<OGlobalConfiguration,Object> iInitialSettings)
ODatabasepublic ODatabase activateOnCurrentThread()
ODatabaseactivateOnCurrentThread in interface ODatabase<ORecord>public boolean isActiveOnCurrentThread()
ODatabaseisActiveOnCurrentThread in interface ODatabase<ORecord>public void reload()
ODatabasepublic void drop()
ODatabasepublic OContextConfiguration getConfiguration()
ODatabasegetConfiguration in interface ODatabase<ORecord>public boolean declareIntent(OIntent iIntent)
ODatabasedeclareIntent in interface ODatabase<ORecord>iIntent - The intentpublic OIntent getActiveIntent()
ODatabasegetActiveIntent in interface ODatabase<ORecord>public boolean exists()
ODatabasepublic void close()
ODatabasepublic ODatabase.STATUS getStatus()
ODatabasepublic <DB extends ODatabase> DB setStatus(ODatabase.STATUS iStatus)
ODatabasepublic long getSize()
ODatabasepublic String getName()
ODatabasepublic String getURL()
ODatabasepublic OLocalRecordCache getLocalCache()
ODatabasegetLocalCache in interface ODatabase<ORecord>public int getDefaultClusterId()
ODatabasegetDefaultClusterId in interface ODatabase<ORecord>public int getClusters()
ODatabasegetClusters in interface ODatabase<ORecord>public boolean existsCluster(String iClusterName)
ODatabaseexistsCluster in interface ODatabase<ORecord>iClusterName - Cluster namepublic Collection<String> getClusterNames()
ODatabasegetClusterNames in interface ODatabase<ORecord>public int getClusterIdByName(String iClusterName)
ODatabasegetClusterIdByName in interface ODatabase<ORecord>iClusterName - Cluster namepublic String getClusterNameById(int iClusterId)
ODatabasegetClusterNameById in interface ODatabase<ORecord>iClusterId - Cluster idpublic long getClusterRecordSizeByName(String iClusterName)
ODatabasegetClusterRecordSizeByName in interface ODatabase<ORecord>iClusterName - Cluster namepublic long getClusterRecordSizeById(int iClusterId)
ODatabasegetClusterRecordSizeById in interface ODatabase<ORecord>iClusterId - Cluster idpublic boolean isClosed()
ODatabasepublic void truncateCluster(String clusterName)
ODatabasetruncateCluster in interface ODatabase<ORecord>clusterName - Name of cluster to be truncated.public long countClusterElements(int iCurrentClusterId)
ODatabasecountClusterElements in interface ODatabase<ORecord>iCurrentClusterId - Cluster idpublic long countClusterElements(int iCurrentClusterId,
boolean countTombstones)
countClusterElements in interface ODatabase<ORecord>public long countClusterElements(int[] iClusterIds)
ODatabasecountClusterElements in interface ODatabase<ORecord>iClusterIds - Array of cluster ids Cluster idpublic long countClusterElements(int[] iClusterIds,
boolean countTombstones)
countClusterElements in interface ODatabase<ORecord>public long countClusterElements(String iClusterName)
ODatabasecountClusterElements in interface ODatabase<ORecord>iClusterName - Cluster namepublic int addCluster(String iClusterName, Object... iParameters)
ODatabaseaddCluster in interface ODatabase<ORecord>iClusterName - Cluster nameiParameters - Additional parameters to pass to the factoriespublic int addBlobCluster(String iClusterName, Object... iParameters)
ODatabaseDocumentaddBlobCluster in interface ODatabaseDocumentaddBlobCluster in interface ODatabase<ORecord>iClusterName - Cluster nameiParameters - Additional parameters to pass to the factoriespublic Set<Integer> getBlobClusterIds()
ODatabasegetBlobClusterIds in interface ODatabase<ORecord>public int addCluster(String iClusterName, int iRequestedId)
ODatabaseaddCluster in interface ODatabase<ORecord>iClusterName - Cluster nameiRequestedId - requested id of the clusterpublic boolean dropCluster(String iClusterName)
ODatabasedropCluster in interface ODatabase<ORecord>iClusterName - the name of the clusterpublic boolean dropCluster(int iClusterId)
ODatabasedropCluster in interface ODatabase<ORecord>iClusterId - id of cluster to deletepublic Object setProperty(String iName, Object iValue)
ODatabasesetProperty in interface ODatabase<ORecord>iName - Property nameiValue - new value to setpublic Object getProperty(String iName)
ODatabasegetProperty in interface ODatabase<ORecord>iName - Property namepublic Iterator<Map.Entry<String,Object>> getProperties()
ODatabasegetProperties in interface ODatabase<ORecord>public Object get(ODatabase.ATTRIBUTES iAttribute)
ODatabasepublic <DB extends ODatabase> DB set(ODatabase.ATTRIBUTES iAttribute, Object iValue)
ODatabasepublic void registerListener(ODatabaseListener iListener)
ODatabaseregisterListener in interface ODatabase<ORecord>iListener - the listener to registerpublic void unregisterListener(ODatabaseListener iListener)
ODatabaseunregisterListener in interface ODatabase<ORecord>iListener - the listener to unregisterpublic ORecordMetadata getRecordMetadata(ORID rid)
getRecordMetadata in interface ODatabase<ORecord>public ODocument newInstance(String iClassName)
ODatabaseDocumentnewInstance in interface ODatabaseDocumentpublic OBlob newBlob(byte[] bytes)
ODatabaseDocumentnewBlob in interface ODatabaseDocumentbytes - content of the OBlobpublic OBlob newBlob()
ODatabaseDocumentnewBlob in interface ODatabaseDocumentpublic OEdge newLightweightEdge(String iClassName, OVertex from, OVertex to)
newLightweightEdge in interface ODatabaseDocumentInternalpublic OEdge newRegularEdge(String iClassName, OVertex from, OVertex to)
newRegularEdge in interface ODatabaseDocumentInternalpublic long countClass(String iClassName)
ODatabaseDocumentcountClass in interface ODatabaseDocumentiClassName - Class namepublic long countClass(String iClassName, boolean iPolymorphic)
ODatabaseDocumentcountClass in interface ODatabaseDocumentiClassName - Class nameiPolymorphic - True if consider also the sub classes, otherwise falsepublic long countView(String viewName)
countView in interface ODatabaseDocumentpublic List<String> backup(OutputStream out, Map<String,Object> options, Callable<Object> callable, OCommandOutputListener iListener, int compressionLevel, int bufferSize) throws IOException
OBackupablebackup in interface OBackupableout - OutputStream used to write the backup content. Use a FileOutputStream to make the
backup persistent on diskoptions - Backup options as Mapcallable - Callback to execute when the database is lockediListener - Listener called for backup messagescompressionLevel - ZIP Compression level between 1 (the minimum) and 9 (maximum). The
bigger is the compression, the smaller will be the final backup content, but will consume
more CPU and time to executebufferSize - Buffer size in bytes, the bigger is the buffer, the more efficient will be
the compressionIOExceptionODatabaseExportpublic void restore(InputStream in, Map<String,Object> options, Callable<Object> callable, OCommandOutputListener iListener) throws IOException
OBackupablerestore in interface OBackupablein - InputStream used to read the backup content. Use a FileInputStream to read a backup
on a diskoptions - Backup options as Mapcallable - Callback to execute when the database is lockediListener - Listener called for backup messagesIOExceptionODatabaseImportpublic void setSerializer(ORecordSerializer serializer)
setSerializer in interface ODatabaseDocumentInternalpublic 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();
public OResultSet query(String query, Map args) throws OCommandSQLParsingException, OCommandExecutionException
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 in interface ODatabase<ORecord>query - the query stringargs - query parameters (named)OCommandSQLParsingExceptionOCommandExecutionExceptionpublic OResultSet command(String query, Object... args) throws OCommandSQLParsingException, OCommandExecutionException
ODatabase
OResultSet rs = db.command("INSERT INTO Person SET name = ?", "John"); ... rs.close();
command in interface ODatabase<ORecord>args - query argumentsOCommandSQLParsingExceptionOCommandExecutionExceptionpublic OResultSet command(String query, Map args) throws OCommandSQLParsingException, OCommandExecutionException
ODatabase
Map<String, Object> params = new HashMapMap<>(); params.put("name", "John"); OResultSet rs = db.query("INSERT
INTO Person SET name = :name", params); ... rs.close();
command in interface ODatabase<ORecord>OCommandSQLParsingExceptionOCommandExecutionExceptionpublic <DB extends ODatabase> DB setCustom(String name, Object iValue)
setCustom in interface ODatabaseDocumentInternalpublic void callOnDropListeners()
callOnDropListeners in interface ODatabaseDocumentInternalpublic boolean isPrefetchRecords()
isPrefetchRecords in interface ODatabaseDocumentInternalpublic void setPrefetchRecords(boolean prefetchRecords)
setPrefetchRecords in interface ODatabaseDocumentInternalpublic void checkForClusterPermissions(String name)
checkForClusterPermissions in interface ODatabaseDocumentInternalpublic 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 = ?;";
execute in interface ODatabase<ORecord>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");
execute in interface ODatabase<ORecord>OCommandExecutionExceptionOCommandScriptExceptionpublic OLiveQueryMonitor live(String query, OLiveQueryResultListener listener, Object... args)
ODatabasepublic OLiveQueryMonitor live(String query, OLiveQueryResultListener listener, Map<String,?> args)
ODatabasepublic void recycle(ORecord record)
recycle in interface ODatabaseDocumentInternalpublic void internalCommit(OTransactionInternal transaction)
ODatabaseDocumentInternalinternalCommit in interface ODatabaseDocumentInternalpublic boolean isClusterVertex(int cluster)
isClusterVertex in interface ODatabaseDocumentInternalpublic boolean isClusterEdge(int cluster)
isClusterEdge in interface ODatabaseDocumentInternalpublic boolean isClusterView(int cluster)
isClusterView in interface ODatabaseDocumentInternalpublic OIdentifiable beforeCreateOperations(OIdentifiable id, String iClusterName)
beforeCreateOperations in interface ODatabaseDocumentInternalpublic OIdentifiable beforeUpdateOperations(OIdentifiable id, String iClusterName)
beforeUpdateOperations in interface ODatabaseDocumentInternalpublic void beforeDeleteOperations(OIdentifiable id, String iClusterName)
beforeDeleteOperations in interface ODatabaseDocumentInternalpublic void afterCreateOperations(OIdentifiable id)
afterCreateOperations in interface ODatabaseDocumentInternalpublic void afterDeleteOperations(OIdentifiable id)
afterDeleteOperations in interface ODatabaseDocumentInternalpublic void afterUpdateOperations(OIdentifiable id)
afterUpdateOperations in interface ODatabaseDocumentInternalpublic void afterReadOperations(OIdentifiable identifiable)
afterReadOperations in interface ODatabaseDocumentInternalpublic boolean beforeReadOperations(OIdentifiable identifiable)
beforeReadOperations in interface ODatabaseDocumentInternalpublic void internalClose(boolean recycle)
internalClose in interface ODatabaseDocumentInternalpublic ORecord saveAll(ORecord iRecord, String iClusterName, ODatabase.OPERATION_MODE iMode, boolean iForceCreate, ORecordCallback<? extends Number> iRecordCreatedCallback, ORecordCallback<Integer> iRecordUpdatedCallback)
saveAll in interface ODatabaseDocumentInternalpublic String getClusterName(ORecord record)
getClusterName in interface ODatabaseDocumentInternalpublic OView getViewFromCluster(int cluster)
getViewFromCluster in interface ODatabaseDocumentInternalpublic void internalLockRecord(OIdentifiable iRecord, OStorage.LOCKING_STRATEGY lockingStrategy)
internalLockRecord in interface ODatabaseDocumentInternalpublic void internalUnlockRecord(OIdentifiable iRecord)
internalUnlockRecord in interface ODatabaseDocumentInternalpublic <RET extends ORecord> RET lock(ORID recordId) throws OLockException
ODatabaseIn case of lock inside the transaction the lock will be release by the commit operation, In case of lock outside a transaction unlock need to be call manually.
lock in interface ODatabase<ORecord>recordId - the id of the record that need to be lockedOLockException - In case of deadlock detectedpublic <RET extends ORecord> RET lock(ORID recordId, long timeout, TimeUnit timeoutUnit) throws OLockException
ODatabaselock in interface ODatabase<ORecord>recordId - the id of the record that need to be lockedtimeout - for the record lockingtimeoutUnit - relative for the timeoutOLockException - In case of deadlock detectedpublic void unlock(ORID recordId) throws OLockException
ODatabaseunlock in interface ODatabase<ORecord>recordId - the id of the record to unlockOLockException - if the record is not locked.public <T> T sendSequenceAction(OSequenceAction action) throws ExecutionException, InterruptedException
sendSequenceAction in interface ODatabaseDocumentInternalExecutionExceptionInterruptedExceptionpublic Map<UUID,OBonsaiCollectionPointer> getCollectionsChanges()
getCollectionsChanges in interface ODatabaseDocumentInternalpublic boolean isRemote()
isRemote in interface ODatabaseDocumentInternalpublic OStorageInfo getStorageInfo()
getStorageInfo in interface ODatabaseInternal<ORecord>Copyright © 2009–2025 OrientDB. All rights reserved.