Class ODatabaseDocumentTx
- All Implemented Interfaces:
ODatabaseDocument,ODatabase<ORecord>,ODatabaseDocumentInternal,ODatabaseInternal<ORecord>,ODatabaseSession,OBackupable,Closeable,AutoCloseable
- Direct Known Subclasses:
ODatabaseDocumentTxPooled
OrientDB instead.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.orientechnologies.orient.core.db.ODatabase
ODatabase.ATTRIBUTES, ODatabase.OPERATION_MODE, ODatabase.STATUS -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static ConcurrentMap<String,OrientDBInternal> Deprecated.protected ODatabaseDocumentInternalDeprecated.protected final AtomicReference<Thread>Deprecated.protected static ConcurrentMap<String,OrientDBInternal> Deprecated.Fields inherited from interface com.orientechnologies.orient.core.db.document.ODatabaseDocument
TYPE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedODatabaseDocumentTx(ODatabaseDocumentInternal ref, String baseUrl) Deprecated.Deprecated.protectedODatabaseDocumentTx(String url, boolean ownerProtection) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Activate current database instance on current thread.intaddBlobCluster(String iClusterName, Object... iParameters) Deprecated.Add a cluster for blob records.intaddCluster(String iClusterName, int iRequestedId) Deprecated.Adds a new cluster.intaddCluster(String iClusterName, Object... iParameters) Deprecated.Adds a new cluster.voidDeprecated.voidDeprecated.voidafterReadOperations(OIdentifiable identifiable) Deprecated.voidDeprecated.intassignAndCheckCluster(ORecord record, String iClusterName) Deprecated.backup(OutputStream out, Map<String, Object> options, Callable<Object> callable, OCommandOutputListener iListener, int compressionLevel, int bufferSize) Deprecated.Executes a backup of the database.beforeCreateOperations(OIdentifiable id, String iClusterName) Deprecated.voidbeforeDeleteOperations(OIdentifiable id, String iClusterName) Deprecated.booleanbeforeReadOperations(OIdentifiable identifiable) Deprecated.beforeUpdateOperations(OIdentifiable id, String iClusterName) Deprecated.begin()Deprecated.Begins a new transaction.begin(OTransaction iTx) Deprecated.Attaches a transaction as current.begin(OTransaction.TXTYPE iStatus) Deprecated.Begins a new transaction specifying the transaction type.browseClass(String iClassName) Deprecated.Browses all the records of the specified class and also all the subclasses.browseClass(String iClassName, boolean iPolymorphic) Deprecated.Browses all the records of the specified class and if iPolymorphic is true also all the subclasses.browseCluster(String iClusterName) Deprecated.Browses all the records of the specified cluster.browseCluster(String iClusterName, long startClusterPosition, long endClusterPosition, boolean loadTombstones) Deprecated.<REC extends ORecord>
ORecordIteratorCluster<REC>browseCluster(String iClusterName, Class<REC> iRecordClass) Deprecated.Browses all the records of the specified cluster of the passed record type.<REC extends ORecord>
ORecordIteratorCluster<REC>browseCluster(String iClusterName, Class<REC> iRecordClass, long startClusterPosition, long endClusterPosition) Deprecated.<REC extends ORecord>
ORecordIteratorCluster<REC>browseCluster(String iClusterName, Class<REC> iRecordClass, long startClusterPosition, long endClusterPosition, boolean loadTombstones) Deprecated.callbackHooks(ORecordHook.TYPE type, OIdentifiable id) Deprecated.voidDeprecated.voidDeprecated.voidDeprecated.voidDeprecated.voidDeprecated.protected voidDeprecated.<DB extends ODatabaseDocument>
DBcheckSecurity(ORule.ResourceGeneric iResourceGeneric, int iOperation, Object iResourceSpecific) Deprecated.Checks if the operation on a resource is allowed for the current user.<DB extends ODatabaseDocument>
DBcheckSecurity(ORule.ResourceGeneric iResourceGeneric, int iOperation, Object... iResourcesSpecific) Deprecated.Checks if the operation against multiple resources is allowed for the current user.<DB extends ODatabaseDocument>
DBcheckSecurity(ORule.ResourceGeneric resourceGeneric, String resourceSpecific, int iOperation) Deprecated.Checks if the operation on a resource is allowed for the current user.<DB extends ODatabaseDocument>
DBcheckSecurity(String iResource, int iOperation) Deprecated.Checks if the operation on a resource is allowed for the current user.<DB extends ODatabaseDocument>
DBcheckSecurity(String iResourceGeneric, int iOperation, Object iResourceSpecific) Deprecated.Checks if the operation on a resource is allowed for the current user.<DB extends ODatabaseDocument>
DBcheckSecurity(String iResourceGeneric, int iOperation, Object... iResourcesSpecific) Deprecated.Checks if the operation against multiple resources is allowed for the current user.cleanOutRecord(ORID rid, int version) Deprecated.protected voidDeprecated.voidclose()Deprecated.Closes an opened database, if the database is already closed does nothing, if a transaction is active will be rollback.static voidcloseAll()Deprecated.<RET extends OCommandRequest>
RETcommand(OCommandRequest iCommand) Deprecated.Creates a command request to run a command against the database (you have to invoke .execute(parameters) to actually execute it).Deprecated.Executes a generic (idempotent or non idempotent) command.Deprecated.Executes a generic (idempotent or non idempotent) command.commit()Deprecated.Commits the current transaction.commit(boolean force) Deprecated.voidDeprecated.copy()Deprecated.longcountClass(String iClassName) Deprecated.Counts the entities contained in the specified class and sub classes (polymorphic).longcountClass(String iClassName, boolean iPolymorphic) Deprecated.Counts the entities contained in the specified class.longcountClusterElements(int iCurrentClusterId) Deprecated.Counts all the entities in the specified cluster id.longcountClusterElements(int[] iClusterIds) Deprecated.Counts all the entities in the specified cluster ids.longcountClusterElements(int[] iClusterIds, boolean countTombstones) Deprecated.longcountClusterElements(int iCurrentClusterId, boolean countTombstones) Deprecated.longcountClusterElements(String iClusterName) Deprecated.Counts all the entities in the specified cluster name.longDeprecated.<DB extends ODatabase>
DBcreate()Deprecated.Creates a new database.<DB extends ODatabase>
DBDeprecated.<DB extends ODatabase>
DBcreate(Map<OGlobalConfiguration, Object> iInitialSettings) Deprecated.Creates a new database passing initial settings.booleandeclareIntent(OIntent iIntent) Deprecated.Declares an intent to the database.Deprecated.Deletes the entity with the received RID from the database.Deprecated.Deletes the entity with the received RID from the database.Deprecated.Deletes an entity from the database in synchronous mode.voiddrop()Deprecated.Drops a database.booleandropCluster(int iClusterId) Deprecated.Drops a cluster by its id.booleandropCluster(String iClusterName) Deprecated.Drops a cluster by its name.booleandropClusterInternal(int clusterId) Deprecated.Deprecated.Execute a script in a specified query language.Deprecated.Execute a script of a specified query language The result set has to be closed after usage
Sample usage:voidexecuteDeleteRecord(OIdentifiable record, int iVersion, boolean iRequired, ODatabase.OPERATION_MODE iMode, boolean prohibitTombstones) Deprecated.<RET extends ORecord>
RETexecuteReadRecord(ORecordId rid, ORecord iRecord, int recordVersion, String fetchPlan, boolean ignoreCache, boolean iUpdateCache, boolean loadTombstones, OStorage.LOCKING_STRATEGY lockingStrategy, RecordReader recordReader) Deprecated.booleanexists()Deprecated.Checks if the database exists.booleanexistsCluster(String iClusterName) Deprecated.Returns true if the cluster exists, otherwise false.voidfreeze()Deprecated.Flush all indexes and cached storage content to the disk.voidfreeze(boolean throwException) Deprecated.Flush all indexes and cached storage content to the disk.get(ODatabase.ATTRIBUTES iAttribute) Deprecated.Returns a database attribute valueDeprecated.Get the active intent in the current session.Deprecated.Retrieve the set of defined blob cluster.long[]getClusterDataRange(int currentClusterId) Deprecated.intgetClusterIdByName(String iClusterName) Deprecated.Returns the cluster id by name.getClusterName(ORecord record) Deprecated.getClusterNameById(int iClusterId) Deprecated.Returns the cluster name by id.Deprecated.Returns all the names of the clusters.getClusterRecordConflictStrategy(int clusterId) Deprecated.longgetClusterRecordSizeById(int iClusterId) Deprecated.Returns the total size of records contained in the cluster defined by its id.longgetClusterRecordSizeByName(String iClusterName) Deprecated.Returns the total size of records contained in the cluster defined by its name.intDeprecated.Returns the number of clusters.int[]getClustersIds(Set<String> filterClusters) Deprecated.Deprecated.Deprecated.Returns the database configuration settings.Deprecated.Returns the current record conflict strategy.Deprecated.Returns the database owner.intDeprecated.Returns the default cluster id.static ORecordSerializerDeprecated.Deprecated.getHooks()Deprecated.Retrieves all the registered hooks.longgetLastClusterPosition(int clusterId) Deprecated.Deprecated.Retrieves all the registered listeners.Deprecated.Returns the level1 cache.Deprecated.Return the OMetadata instance.getName()Deprecated.Returns the database name.protected static OrientDBInternalgetOrCreateEmbeddedFactory(String baseUrl, OrientDBConfig config) Deprecated.protected static OrientDBInternalgetOrCreateRemoteFactory(String baseUrl) Deprecated.Deprecated.Returns an iterator of the property entriesgetProperty(String iName) Deprecated.Gets the property value.<RET extends ORecord>
RETgetRecord(OIdentifiable iIdentifiable) Deprecated.Returns the record for a OIdentifiable instance.getRecordMetadata(ORID rid) Deprecated.byteDeprecated.Returns the default record type for this kind of database.Deprecated.Internal.Deprecated.Deprecated.Deprecated.longgetSize()Deprecated.Returns the total size of the records in the database.Deprecated.Returns the current status of database.Deprecated.Deprecated.Deprecated.Internal.Deprecated.Return active transaction.getType()Deprecated.<DB extends ODatabase>
DBDeprecated.Return the underlying database.getURL()Deprecated.Returns the database URL.getUser()Deprecated.Returns the current user logged into the database.getViewFromCluster(int cluster) Deprecated.incrementalBackup(String path) Deprecated.Performs incremental backup of database content to the selected folder.voidinternalClose(boolean recycle) Deprecated.voidinternalCommit(OTransactionInternal transaction) Deprecated.Executed the commit on the storage hiding away storage concepts from the transactionvoidinternalCommitPreallocate(OTransactionOptimistic oTransactionOptimistic) Deprecated.voidinternalLockRecord(OIdentifiable iRecord, OStorage.LOCKING_STRATEGY lockingStrategy) Deprecated.voidinternalUnlockRecord(OIdentifiable iRecord) Deprecated.booleanDeprecated.Returns true if the current database instance is active on current thread, otherwise false.booleanisClosed()Deprecated.Checks if the database is closed.booleanisClusterEdge(int cluster) Deprecated.booleanisClusterVertex(int cluster) Deprecated.booleanisClusterView(int cluster) Deprecated.booleanisMVCC()Deprecated.Returns if the Multi Version Concurrency Control is enabled or not.booleanisPooled()Deprecated.booleanDeprecated.booleanisRemote()Deprecated.booleanDeprecated.Returns true if current configuration retains objects, otherwise falsebooleanDeprecated.booleanDeprecated.Tells if validation of record is active.live(String query, OLiveQueryResultListener listener, Object... args) Deprecated.Subscribe a query as a live query for future create/update event with the referred conditionslive(String query, OLiveQueryResultListener listener, Map<String, ?> args) Deprecated.Subscribe a query as a live query for future create/update event with the referred conditions<RET extends ORecord>
RETDeprecated.Loads the entity by the Record ID.<RET extends ORecord>
RETDeprecated.Loads the entity by the Record ID using a fetch plan.<RET extends ORecord>
RETDeprecated.Loads the entity by the Record ID using a fetch plan and specifying if the cache must be ignored.<RET extends ORecord>
RETDeprecated.Loads the entity and return it.<RET extends ORecord>
RETDeprecated.Loads a record using a fetch plan.<RET extends ORecord>
RETDeprecated.Loads a record using a fetch plan.<RET extends ORecord>
RETloadIfVersionIsNotLatest(ORID rid, int recordVersion, String fetchPlan, boolean ignoreCache) Deprecated.<RET extends ORecord>
RETDeprecated.Pessimistic lock a record.<RET extends ORecord>
RETDeprecated.Pessimistic lock a record.newBlob()Deprecated.Create a new empty instance of a blob.newBlob(byte[] bytes) Deprecated.Create a new instance of a blob containing the given bytes.Deprecated.Creates a new EdgeDeprecated.Creates a new EdgeDeprecated.newElement(String className) Deprecated.Deprecated.newEmbeddedElement(String className) Deprecated.Deprecated.Creates a new entity instance.newInstance(String iClassName) Deprecated.Creates a new entity instance.newLightweightEdge(String iClassName, OVertex from, OVertex to) Deprecated.newRegularEdge(String iClassName, OVertex from, OVertex to) Deprecated.Deprecated.Creates a new VertexDeprecated.Creates a new Vertex<DB extends ODatabase>
DBDeprecated.Opens a database using an authentication token received as an argument.<DB extends ODatabase>
DBDeprecated.Opens a database using the user and password received as arguments.<RET extends List<?>>
RETDeprecated.Execute a query against the database.Deprecated.Executes an SQL query.Deprecated.Executes an SQL query (idempotent).voidrawBegin(OTransaction transaction) Deprecated.voidDeprecated.<DB extends ODatabase<?>>
DBregisterHook(ORecordHook iHookImpl) Deprecated.Registers a hook to listen all events for Records.<DB extends ODatabase<?>>
DBregisterHook(ORecordHook iHookImpl, ORecordHook.HOOK_POSITION iPosition) Deprecated.voidregisterListener(ODatabaseListener iListener) Deprecated.Registers a listener to the database events.voidrelease()Deprecated.Allows to execute write-related commands on DB.voidreload()Deprecated.Reloads the database information like the cluster list.<RET extends ORecord>
RETDeprecated.Force the reloading of the entity.<RET extends ORecord>
RETDeprecated.Force the reloading of the entity.voidDeprecated.voidreplaceStorage(OStorage iNewStorage) Deprecated.Internal only: replace the storage with a new one.voidDeprecated.voidrestore(InputStream in, Map<String, Object> options, Callable<Object> callable, OCommandOutputListener iListener) Deprecated.Executes a restore of a database backup.rollback()Deprecated.Aborts the current running transaction.rollback(boolean force) Deprecated.<RET extends ORecord>
RETDeprecated.Saves an entity in synchronous mode.<RET extends ORecord>
RETsave(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>
RETDeprecated.Saves an entity in the specified cluster in synchronous mode.<RET extends ORecord>
RETsave(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.saveAll(ORecord iRecord, String iClusterName, ODatabase.OPERATION_MODE iMode, boolean iForceCreate, ORecordCallback<? extends Number> iRecordCreatedCallback, ORecordCallback<Integer> iRecordUpdatedCallback) Deprecated.<T> TsendSequenceAction(OSequenceAction action) Deprecated.<DB extends ODatabase>
DBset(ODatabase.ATTRIBUTES iAttribute, Object iValue) Deprecated.Sets a database attribute value<DB extends ODatabase<?>>
DBsetConflictStrategy(ORecordConflictStrategy iResolver) Deprecated.Overrides record conflict strategy.<DB extends ODatabase<?>>
DBsetConflictStrategy(String iStrategyName) Deprecated.Overrides record conflict strategy selecting the strategy by name.<DB extends ODatabase>
DBDeprecated.setDatabaseOwner(ODatabaseInternal<?> iOwner) Deprecated.Internal.voidsetDefaultClusterId(int addCluster) Deprecated.static voidsetDefaultSerializer(ORecordSerializer defaultSerializer) Deprecated.voidDeprecated.voidsetInternal(ODatabase.ATTRIBUTES attribute, Object iValue) Deprecated.Internal method.<DB extends ODatabase<?>>
DBsetMVCC(boolean iValue) Deprecated.Enables or disables the Multi-Version Concurrency Control.voidsetPrefetchRecords(boolean prefetchRecords) Deprecated.setProperty(String iName, Object iValue) Deprecated.Sets a property valuesetRetainRecords(boolean iValue) Deprecated.Specifies if retain handled objects in memory or not.voidsetSerializer(ORecordSerializer serializer) Deprecated.<DB extends ODatabase>
DBsetStatus(ODatabase.STATUS iStatus) Deprecated.Set the current status of database.protected voidDeprecated.voidsetUseLightweightEdges(boolean b) Deprecated.voidsetUser(OSecurityUser user) Deprecated.Set user for current database instance.<DB extends ODatabaseDocument>
DBsetValidationEnabled(boolean iEnabled) Deprecated.Enables or disables the record validation.voidtruncateClass(String name) Deprecated.longtruncateClass(String name, boolean polimorfic) Deprecated.voidtruncateCluster(String clusterName) Deprecated.Removes all data in the cluster with given name.longDeprecated.voidDeprecated.Pessimistic unlock<DB extends ODatabase<?>>
DBunregisterHook(ORecordHook iHookImpl) Deprecated.Unregisters a previously registered hook.voidunregisterListener(ODatabaseListener iListener) Deprecated.Unregisters a listener to the database events.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.db.ODatabase
createClass, executeWithRetry, getClassMethods inherited from interface com.orientechnologies.orient.core.db.document.ODatabaseDocument
createClassIfNotExist, createEdgeClass, createVertexClass, newEdge, newVertex, reloadMethods inherited from interface com.orientechnologies.orient.core.db.ODatabaseDocumentInternal
endEsclusiveMetadataChange, getActiveQueries, getActiveQuery, getHaStatus, getStorageId, indexQuery, isDistributed, isLocalEnv, queryOnNode, queryStartUsingViewCluster, queryStartUsingViewIndex, realClose, removeHaServer, reuse, startEsclusiveMetadataChange, swapTx, sync, syncCommitMethods inherited from interface com.orientechnologies.orient.core.db.ODatabaseInternal
addRidbagPrefetchStats, createInterruptTimerTask, getActiveClusterMap, getActiveDataCenterMap, getEnterpriseEndpoint, getLocalNodeName, getStats, isSharded, resetRecordLoadStats
-
Field Details
-
embedded
Deprecated. -
remote
Deprecated. -
internal
Deprecated. -
owner
Deprecated.
-
-
Constructor Details
-
ODatabaseDocumentTx
Deprecated. -
ODatabaseDocumentTx
Deprecated. -
ODatabaseDocumentTx
Deprecated.
-
-
Method Details
-
closeAll
public static void closeAll()Deprecated. -
getOrCreateRemoteFactory
Deprecated. -
getOrCreateEmbeddedFactory
Deprecated. -
getDefaultSerializer
Deprecated. -
setDefaultSerializer
Deprecated. -
getStorageVersions
Deprecated.Description copied from interface:ODatabaseDocumentInternalInternal. Returns the factory that defines a set of components that current database should use to be compatible to current version of storage. So if you open a database create with old version of OrientDB it defines a components that should be used to provide backward compatibility with that version of database.- Specified by:
getStorageVersionsin interfaceODatabaseDocumentInternal
-
getSbTreeCollectionManager
Deprecated.Description copied from interface:ODatabaseDocumentInternalInternal. Gets an instance of sb-tree collection manager for current database.- Specified by:
getSbTreeCollectionManagerin interfaceODatabaseDocumentInternal
-
getSerializerFactory
Deprecated.- Specified by:
getSerializerFactoryin interfaceODatabaseDocumentInternal- Returns:
- the factory of binary serializers.
-
getSerializer
Deprecated.- Specified by:
getSerializerin interfaceODatabaseDocumentInternal- Returns:
- serializer which is used for document serialization.
-
assignAndCheckCluster
Deprecated.- Specified by:
assignAndCheckClusterin interfaceODatabaseDocumentInternal
-
loadIfVersionIsNotLatest
public <RET extends ORecord> RET loadIfVersionIsNotLatest(ORID rid, int recordVersion, String fetchPlan, boolean ignoreCache) throws ORecordNotFoundException Deprecated.- Specified by:
loadIfVersionIsNotLatestin interfaceODatabaseDocumentInternal- Throws:
ORecordNotFoundException
-
reloadUser
public void reloadUser()Deprecated.- Specified by:
reloadUserin interfaceODatabaseDocumentInternal
-
callbackHooks
Deprecated.- Specified by:
callbackHooksin interfaceODatabaseDocumentInternal
-
executeReadRecord
public <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) Deprecated.- Specified by:
executeReadRecordin interfaceODatabaseDocumentInternal
-
executeDeleteRecord
public void executeDeleteRecord(OIdentifiable record, int iVersion, boolean iRequired, ODatabase.OPERATION_MODE iMode, boolean prohibitTombstones) Deprecated.- Specified by:
executeDeleteRecordin interfaceODatabaseDocumentInternal
-
setDefaultTransactionMode
public void setDefaultTransactionMode(Map<ORID, OTransactionAbstract.LockedRecordMetadata> noTxLocks) Deprecated.- Specified by:
setDefaultTransactionModein interfaceODatabaseDocumentInternal
-
getMetadata
Deprecated.Description copied from interface:ODatabaseReturn the OMetadata instance. Cannot be null.- Specified by:
getMetadatain interfaceODatabase<ORecord>- Specified by:
getMetadatain interfaceODatabaseDocumentInternal- Returns:
- The OMetadata instance.
-
registerHook
Deprecated.Description copied from interface:ODatabaseRegisters a hook to listen all events for Records.- Specified by:
registerHookin interfaceODatabase<ORecord>- Parameters:
iHookImpl- ORecordHook implementation- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
registerHook
public <DB extends ODatabase<?>> DB registerHook(ORecordHook iHookImpl, ORecordHook.HOOK_POSITION iPosition) Deprecated.- Specified by:
registerHookin interfaceODatabase<ORecord>
-
getHooks
Deprecated.Description copied from interface:ODatabaseRetrieves all the registered hooks. -
unregisterHook
Deprecated.Description copied from interface:ODatabaseUnregisters a previously registered hook.- Specified by:
unregisterHookin interfaceODatabase<ORecord>- Parameters:
iHookImpl- ORecordHook implementation- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain. deprecated since 2.2
-
isMVCC
public boolean isMVCC()Deprecated.Description copied from interface:ODatabaseReturns if the Multi Version Concurrency Control is enabled or not. If enabled the version of the record is checked before each update and delete against the records. -
getListeners
Deprecated.Description copied from interface:ODatabaseRetrieves all the registered listeners.- Specified by:
getListenersin interfaceODatabase<ORecord>- Returns:
- An iterable of ODatabaseListener instances.
-
setMVCC
Deprecated.Description copied from interface:ODatabaseEnables or disables the Multi-Version Concurrency Control. If enabled the version of the record is checked before each update and delete against the records. -
getType
Deprecated. -
getConflictStrategy
Deprecated.Description copied from interface:ODatabaseReturns the current record conflict strategy.- Specified by:
getConflictStrategyin interfaceODatabase<ORecord>
-
setConflictStrategy
Deprecated.Description copied from interface:ODatabaseOverrides record conflict strategy selecting the strategy by name.- Specified by:
setConflictStrategyin interfaceODatabase<ORecord>- Parameters:
iStrategyName- ORecordConflictStrategy strategy name- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
setConflictStrategy
Deprecated.Description copied from interface:ODatabaseOverrides record conflict strategy.- Specified by:
setConflictStrategyin interfaceODatabase<ORecord>- Parameters:
iResolver- ORecordConflictStrategy implementation- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
incrementalBackup
Deprecated.Description copied from interface:ODatabasePerforms incremental backup of database content to the selected folder. This is thread safe operation and can be done in normal operational mode.If 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.
- Specified by:
incrementalBackupin interfaceODatabase<ORecord>- Parameters:
path- Path to backup folder.- Returns:
- File name of the backup
-
copy
Deprecated.- Specified by:
copyin interfaceODatabaseDocumentInternal
-
checkIfActive
public void checkIfActive()Deprecated.- Specified by:
checkIfActivein interfaceODatabaseDocumentInternal
-
checkOpenness
protected void checkOpenness()Deprecated. -
callOnOpenListeners
public void callOnOpenListeners()Deprecated.- Specified by:
callOnOpenListenersin interfaceODatabaseDocumentInternal
-
callOnCloseListeners
public void callOnCloseListeners()Deprecated.- Specified by:
callOnCloseListenersin interfaceODatabaseDocumentInternal
-
getStorage
Deprecated.Description copied from interface:ODatabaseInternalReturns the underlying storage implementation.- Specified by:
getStoragein interfaceODatabaseInternal<ORecord>- Returns:
- The underlying storage implementation
- See Also:
-
setUser
Deprecated.Description copied from interface:ODatabaseInternalSet user for current database instance.- Specified by:
setUserin interfaceODatabaseInternal<ORecord>
-
replaceStorage
Deprecated.Description copied from interface:ODatabaseInternalInternal only: replace the storage with a new one.- Specified by:
replaceStoragein interfaceODatabaseInternal<ORecord>- Parameters:
iNewStorage- The new storage to use. Usually it's a wrapped instance of the current cluster.
-
resetInitialization
public void resetInitialization()Deprecated.- Specified by:
resetInitializationin interfaceODatabaseInternal<ORecord>
-
getDatabaseOwner
Deprecated.Description copied from interface:ODatabaseInternalReturns the database owner. Used in wrapped instances to know the up level ODatabase instance.- Specified by:
getDatabaseOwnerin interfaceODatabaseInternal<ORecord>- Returns:
- Returns the database owner.
-
setDatabaseOwner
Deprecated.Description copied from interface:ODatabaseInternalInternal. Sets the database owner.- Specified by:
setDatabaseOwnerin interfaceODatabaseInternal<ORecord>
-
getUnderlying
Deprecated.Description copied from interface:ODatabaseInternalReturn the underlying database. Used in wrapper instances to know the down level ODatabase instance.- Specified by:
getUnderlyingin interfaceODatabaseInternal<ORecord>- Returns:
- The underlying ODatabase implementation.
-
setInternal
Deprecated.Description copied from interface:ODatabaseInternalInternal method. Don't call it directly unless you're building an internal component.- Specified by:
setInternalin interfaceODatabaseInternal<ORecord>
-
open
Deprecated.Description copied from interface:ODatabaseInternalOpens a database using an authentication token received as an argument.- Specified by:
openin interfaceODatabaseInternal<ORecord>- Parameters:
iToken- Authentication token- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
browseClass
Deprecated.Description copied from interface:ODatabaseDocumentBrowses all the records of the specified class and also all the subclasses. If you've a class Vehicle and Car that extends Vehicle then a db.browseClass("Vehicle", true) will return all the instances of Vehicle and Car. The order of the returned instance starts from record id with position 0 until the end. Base classes are worked at first.- Specified by:
browseClassin interfaceODatabaseDocument- Parameters:
iClassName- Class name to iterate- Returns:
- Iterator of ODocument instances
-
browseClass
Deprecated.Description copied from interface:ODatabaseDocumentBrowses all the records of the specified class and if iPolymorphic is true also all the subclasses. If you've a class Vehicle and Car that extends Vehicle then a db.browseClass("Vehicle", true) will return all the instances of Vehicle and Car. The order of the returned instance starts from record id with position 0 until the end. Base classes are worked at first.- Specified by:
browseClassin interfaceODatabaseDocument- Parameters:
iClassName- Class name to iterateiPolymorphic- Consider also the instances of the subclasses or not- Returns:
- Iterator of ODocument instances
-
freeze
public void freeze()Deprecated.Description copied from interface:ODatabaseDocumentFlush all indexes and cached storage content to the disk.After 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.
- Specified by:
freezein interfaceODatabase<ORecord>- Specified by:
freezein interfaceODatabaseDocument- See Also:
-
release
public void release()Deprecated.Description copied from interface:ODatabaseDocumentAllows to execute write-related commands on DB. Called afterODatabaseDocument.freeze()command.- Specified by:
releasein interfaceODatabase<ORecord>- Specified by:
releasein interfaceODatabaseDocument- See Also:
-
freeze
public void freeze(boolean throwException) Deprecated.Description copied from interface:ODatabaseDocumentFlush all indexes and cached storage content to the disk.After 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 onthrowExceptionparameter.IMPORTANT: This command is not reentrant.
- Specified by:
freezein interfaceODatabase<ORecord>- Specified by:
freezein interfaceODatabaseDocument- Parameters:
throwException- IftrueOModificationOperationProhibitedExceptionexception will be thrown in case of write command will be performed.
-
newVertex
Deprecated.Description copied from interface:ODatabaseDocumentCreates a new Vertex- Specified by:
newVertexin interfaceODatabaseDocument- Parameters:
iClassName- the vertex type (class name)- Returns:
-
newVertex
Deprecated.Description copied from interface:ODatabaseDocumentCreates a new Vertex- Specified by:
newVertexin interfaceODatabaseDocument- Parameters:
type- the vertex type- Returns:
-
newEdge
Deprecated.Description copied from interface:ODatabaseDocumentCreates a new Edge- Specified by:
newEdgein interfaceODatabaseDocument- Parameters:
from- the starting point vertexto- the endpoint vertextype- the edge type- Returns:
- the edge
-
newEdge
Deprecated.Description copied from interface:ODatabaseDocumentCreates a new Edge- Specified by:
newEdgein interfaceODatabaseDocument- Parameters:
from- the starting point vertexto- the endpoint vertextype- the edge type- Returns:
- the edge
-
newElement
Deprecated.- Specified by:
newElementin interfaceODatabaseDocument
-
newElement
Deprecated.- Specified by:
newElementin interfaceODatabaseDocument
-
newEmbeddedElement
Deprecated.- Specified by:
newEmbeddedElementin interfaceODatabaseDocument
-
newEmbeddedElement
Deprecated.- Specified by:
newEmbeddedElementin interfaceODatabaseDocument
-
isUseLightweightEdges
public boolean isUseLightweightEdges()Deprecated.- Specified by:
isUseLightweightEdgesin interfaceODatabaseDocumentInternal
-
setUseLightweightEdges
public void setUseLightweightEdges(boolean b) Deprecated.- Specified by:
setUseLightweightEdgesin interfaceODatabaseDocumentInternal
-
newInstance
Deprecated.Description copied from interface:ODatabaseCreates a new entity instance.- Specified by:
newInstancein interfaceODatabase<ORecord>- Returns:
- The new instance.
-
getDictionary
Deprecated.Returns the Dictionary manual index.- Specified by:
getDictionaryin interfaceODatabase<ORecord>- Returns:
- ODictionary instance
-
getUser
Deprecated.Description copied from interface:ODatabaseReturns the current user logged into the database. -
load
Deprecated.Description copied from interface:ODatabaseLoads the entity and return it. -
load
Deprecated.Description copied from interface:ODatabaseLoads a record using a fetch plan. -
load
Deprecated.Description copied from interface:ODatabaseLoads a record using a fetch plan. -
reload
Deprecated.Description copied from interface:ODatabaseForce the reloading of the entity. -
reload
public <RET extends ORecord> RET reload(ORecord iObject, String iFetchPlan, boolean iIgnoreCache, boolean force) Deprecated.Description copied from interface:ODatabaseForce the reloading of the entity.- Specified by:
reloadin interfaceODatabase<ORecord>- Parameters:
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.- Returns:
- The loaded entity
-
load
Deprecated.Description copied from interface:ODatabaseLoads the entity by the Record ID. -
load
Deprecated.Description copied from interface:ODatabaseLoads the entity by the Record ID using a fetch plan. -
load
Deprecated.Description copied from interface:ODatabaseLoads the entity by the Record ID using a fetch plan and specifying if the cache must be ignored. -
save
Deprecated.Description copied from interface:ODatabaseSaves an entity in synchronous mode. If the entity is not dirty, then the operation will be ignored. For custom entity implementations assure to set the entity as dirty. -
save
public <RET extends ORecord> RET save(ORecord iObject, ODatabase.OPERATION_MODE iMode, boolean iForceCreate, ORecordCallback<? extends Number> iRecordCreatedCallback, ORecordCallback<Integer> iRecordUpdatedCallback) Deprecated.Description copied from interface:ODatabaseSaves an entity specifying the mode. If the entity is not dirty, then the operation will be ignored. For custom entity implementations assure to set the entity as dirty. If the cluster does not exist, an error will be thrown. -
save
Deprecated.Description copied from interface:ODatabaseSaves an entity in the specified cluster in synchronous mode. If the entity is not dirty, then the operation will be ignored. For custom entity implementations assure to set the entity as dirty. If the cluster does not exist, an error will be thrown. -
save
public <RET extends ORecord> RET save(ORecord iObject, String iClusterName, ODatabase.OPERATION_MODE iMode, boolean iForceCreate, ORecordCallback<? extends Number> iRecordCreatedCallback, ORecordCallback<Integer> iRecordUpdatedCallback) Deprecated.Description copied from interface:ODatabaseSaves an entity in the specified cluster specifying the mode. If the entity is not dirty, then the operation will be ignored. For custom entity implementations assure to set the entity as dirty. If the cluster does not exist, an error will be thrown.- Specified by:
savein interfaceODatabase<ORecord>- Parameters:
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 thrown
-
delete
Deprecated.Description copied from interface:ODatabaseDeletes an entity from the database in synchronous mode. -
delete
Deprecated.Description copied from interface:ODatabaseDeletes the entity with the received RID from the database. -
delete
Deprecated.Description copied from interface:ODatabaseDeletes the entity with the received RID from the database. -
cleanOutRecord
Deprecated.- Specified by:
cleanOutRecordin interfaceODatabaseDocumentInternal
-
getTransaction
Deprecated.Description copied from interface:ODatabaseReturn active transaction. Cannot be null. If no transaction is active, then a OTransactionNoTx instance is returned.- Specified by:
getTransactionin interfaceODatabase<ORecord>- Returns:
- OTransaction implementation
-
begin
Deprecated.Description copied from interface:ODatabaseBegins a new transaction. By default the type is OPTIMISTIC. If a previous transaction is running a nested call counter is incremented. A transaction once begun has to be closed by calling theODatabase.commit()orODatabase.rollback(). -
begin
Deprecated.Description copied from interface:ODatabaseBegins a new transaction specifying the transaction type. If a previous transaction is running a nested call counter is incremented. A transaction once begun has to be closed by calling theODatabase.commit()orODatabase.rollback(). -
begin
Deprecated.Description copied from interface:ODatabaseAttaches a transaction as current.- Specified by:
beginin interfaceODatabase<ORecord>- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
- Throws:
OTransactionException
-
rawBegin
Deprecated.- Specified by:
rawBeginin interfaceODatabaseDocumentInternal
-
commit
Deprecated.Description copied from interface:ODatabaseCommits the current transaction. The approach is all or nothing. All changes will be permanent following the storage type. If the operation succeed all the entities changed inside the transaction context will be effective. If the operation fails, all the changed entities will be restored in the data store.- Specified by:
commitin interfaceODatabase<ORecord>- Returns:
- Throws:
OTransactionException
-
commit
Deprecated.- Specified by:
commitin interfaceODatabase<ORecord>- Throws:
OTransactionException
-
rollback
Deprecated.Description copied from interface:ODatabaseAborts the current running transaction. All the pending changed entities will be restored in the data store.- Specified by:
rollbackin interfaceODatabase<ORecord>- Returns:
- Throws:
OTransactionException
-
rollback
Deprecated.- Specified by:
rollbackin interfaceODatabase<ORecord>- Throws:
OTransactionException
-
query
Deprecated.Description copied from interface:ODatabaseExecute a query against the database. If the OStorage used is remote (OStorageRemote) then the command will be executed remotely and the result returned back to the calling client. -
command
Deprecated.Description copied from interface:ODatabaseCreates a command request to run a command against the database (you have to invoke .execute(parameters) to actually execute it). A command can be a SQL statement or a Procedure. If the OStorage used is remote (OStorageRemote) then the command will be executed remotely and the result returned back to the calling client. -
browseCluster
Deprecated.Description copied from interface:ODatabaseDocumentBrowses all the records of the specified cluster.- Specified by:
browseClusterin interfaceODatabaseDocument- Parameters:
iClusterName- Cluster name to iterate- Returns:
- Iterator of ODocument instances
-
browseCluster
public ORecordIteratorCluster<ODocument> browseCluster(String iClusterName, long startClusterPosition, long endClusterPosition, boolean loadTombstones) Deprecated.- Specified by:
browseClusterin interfaceODatabaseDocument
-
browseCluster
public <REC extends ORecord> ORecordIteratorCluster<REC> browseCluster(String iClusterName, Class<REC> iRecordClass) Deprecated.Description copied from interface:ODatabaseDocumentBrowses all the records of the specified cluster of the passed record type.- Specified by:
browseClusterin interfaceODatabaseDocument- Parameters:
iClusterName- Cluster name to iterateiRecordClass- The record class expected- Returns:
- Iterator of ODocument instances
-
browseCluster
public <REC extends ORecord> ORecordIteratorCluster<REC> browseCluster(String iClusterName, Class<REC> iRecordClass, long startClusterPosition, long endClusterPosition) Deprecated.- Specified by:
browseClusterin interfaceODatabaseDocument
-
browseCluster
public <REC extends ORecord> ORecordIteratorCluster<REC> browseCluster(String iClusterName, Class<REC> iRecordClass, long startClusterPosition, long endClusterPosition, boolean loadTombstones) Deprecated.- Specified by:
browseClusterin interfaceODatabaseDocument
-
getRecord
Deprecated.Description copied from interface:ODatabaseDocumentReturns the record for a OIdentifiable instance. If the argument received already is a ORecord instance, then it's returned as is, otherwise a new ORecord is created with the identity received and returned.- Specified by:
getRecordin interfaceODatabaseDocument- Returns:
- A ORecord instance
-
getRecordType
public byte getRecordType()Deprecated.Description copied from interface:ODatabaseDocumentReturns the default record type for this kind of database.- Specified by:
getRecordTypein interfaceODatabaseDocument
-
isRetainRecords
public boolean isRetainRecords()Deprecated.Description copied from interface:ODatabaseDocumentReturns true if current configuration retains objects, otherwise false- Specified by:
isRetainRecordsin interfaceODatabaseDocument- See Also:
-
setRetainRecords
Deprecated.Description copied from interface:ODatabaseDocumentSpecifies if retain handled objects in memory or not. Setting it to false can improve performance on large inserts. Default is enabled.- Specified by:
setRetainRecordsin interfaceODatabaseDocument- Parameters:
iValue- True to enable, false to disable it.- See Also:
-
checkSecurity
public <DB extends ODatabaseDocument> DB checkSecurity(ORule.ResourceGeneric resourceGeneric, String resourceSpecific, int iOperation) Deprecated.Description copied from interface:ODatabaseDocumentChecks if the operation on a resource is allowed for the current user.- Specified by:
checkSecurityin interfaceODatabaseDocument- Parameters:
resourceGeneric- Generic Resource where to execute the operationiOperation- Operation to execute against the resource- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
checkSecurity
public <DB extends ODatabaseDocument> DB checkSecurity(ORule.ResourceGeneric iResourceGeneric, int iOperation, Object iResourceSpecific) Deprecated.Description copied from interface:ODatabaseDocumentChecks if the operation on a resource is allowed for the current user. The check is made in two steps:- Access to all the resource as *
- Access to the specific target resource
- Specified by:
checkSecurityin interfaceODatabaseDocument- Parameters:
iResourceGeneric- 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.- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
checkSecurity
public <DB extends ODatabaseDocument> DB checkSecurity(ORule.ResourceGeneric iResourceGeneric, int iOperation, Object... iResourcesSpecific) Deprecated.Description copied from interface:ODatabaseDocumentChecks if the operation against multiple resources is allowed for the current user. The check is made in two steps:- Access to all the resource as *
- Access to the specific target resources
- Specified by:
checkSecurityin interfaceODatabaseDocument- Parameters:
iResourceGeneric- 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.- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
isValidationEnabled
public boolean isValidationEnabled()Deprecated.Description copied from interface:ODatabaseDocumentTells if validation of record is active. Default is true.- Specified by:
isValidationEnabledin interfaceODatabaseDocument- Returns:
- true if it's active, otherwise false.
-
setValidationEnabled
Deprecated.Description copied from interface:ODatabaseDocumentEnables or disables the record validation.Since 2.2 this setting is persistent.
- Specified by:
setValidationEnabledin interfaceODatabaseDocument- Parameters:
iEnabled- True to enable, false to disable- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
checkSecurity
Deprecated.Description copied from interface:ODatabaseDocumentChecks if the operation on a resource is allowed for the current user.- Specified by:
checkSecurityin interfaceODatabaseDocument- Parameters:
iResource- Resource where to execute the operationiOperation- Operation to execute against the resource- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
checkSecurity
public <DB extends ODatabaseDocument> DB checkSecurity(String iResourceGeneric, int iOperation, Object iResourceSpecific) Deprecated.Description copied from interface:ODatabaseDocumentChecks if the operation on a resource is allowed for the current user. The check is made in two steps:- Access to all the resource as *
- Access to the specific target resource
- Specified by:
checkSecurityin interfaceODatabaseDocument- Parameters:
iResourceGeneric- 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.- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
checkSecurity
public <DB extends ODatabaseDocument> DB checkSecurity(String iResourceGeneric, int iOperation, Object... iResourcesSpecific) Deprecated.Description copied from interface:ODatabaseDocumentChecks if the operation against multiple resources is allowed for the current user. The check is made in two steps:- Access to all the resource as *
- Access to the specific target resources
- Specified by:
checkSecurityin interfaceODatabaseDocument- Parameters:
iResourceGeneric- 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.- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
isPooled
public boolean isPooled()Deprecated.- Specified by:
isPooledin interfaceODatabaseDocument- Returns:
trueif database is obtained from the pool andfalseotherwise.
-
open
Deprecated.Description copied from interface:ODatabaseOpens a database using the user and password received as arguments. -
setupThreadOwner
protected void setupThreadOwner()Deprecated. -
clearOwner
protected void clearOwner()Deprecated. -
create
Deprecated.Description copied from interface:ODatabaseCreates a new database. -
create
Deprecated.Description copied from interface:ODatabaseCreates new database from database backup. Only incremental backups are supported. -
create
Deprecated.Description copied from interface:ODatabaseCreates a new database passing initial settings. -
activateOnCurrentThread
Deprecated.Description copied from interface:ODatabaseActivate current database instance on current thread. Call this method before using the database if you switch between multiple databases instances on the same thread or if you pass them across threads.- Specified by:
activateOnCurrentThreadin interfaceODatabase<ORecord>
-
isActiveOnCurrentThread
public boolean isActiveOnCurrentThread()Deprecated.Description copied from interface:ODatabaseReturns true if the current database instance is active on current thread, otherwise false.- Specified by:
isActiveOnCurrentThreadin interfaceODatabase<ORecord>
-
reload
public void reload()Deprecated.Description copied from interface:ODatabaseReloads the database information like the cluster list. -
drop
public void drop()Deprecated.Description copied from interface:ODatabaseDrops a database. -
getConfiguration
Deprecated.Description copied from interface:ODatabaseReturns the database configuration settings. If defined, any database configuration overwrites the global one.- Specified by:
getConfigurationin interfaceODatabase<ORecord>- Returns:
- OContextConfiguration
-
declareIntent
Deprecated.Description copied from interface:ODatabaseDeclares an intent to the database. Intents aim to optimize common use cases.- Specified by:
declareIntentin interfaceODatabase<ORecord>- Parameters:
iIntent- The intent
-
getActiveIntent
Deprecated.Description copied from interface:ODatabaseGet the active intent in the current session.- Specified by:
getActiveIntentin interfaceODatabase<ORecord>- Returns:
-
exists
public boolean exists()Deprecated.Description copied from interface:ODatabaseChecks if the database exists. -
close
public void close()Deprecated.Description copied from interface:ODatabaseCloses an opened database, if the database is already closed does nothing, if a transaction is active will be rollback. -
getStatus
Deprecated.Description copied from interface:ODatabaseReturns the current status of database. -
setStatus
Deprecated.Description copied from interface:ODatabaseSet the current status of database. deprecated since 2.2 -
getSize
public long getSize()Deprecated.Description copied from interface:ODatabaseReturns the total size of the records in the database. -
getName
Deprecated.Description copied from interface:ODatabaseReturns the database name. -
getURL
Deprecated.Description copied from interface:ODatabaseReturns the database URL. -
getLocalCache
Deprecated.Description copied from interface:ODatabaseReturns the level1 cache. Cannot be null.- Specified by:
getLocalCachein interfaceODatabase<ORecord>- Returns:
- Current cache.
-
getDefaultClusterId
public int getDefaultClusterId()Deprecated.Description copied from interface:ODatabaseReturns the default cluster id. If not specified all the new entities will be stored in the default cluster.- Specified by:
getDefaultClusterIdin interfaceODatabase<ORecord>- Returns:
- The default cluster id
-
getClusters
public int getClusters()Deprecated.Description copied from interface:ODatabaseReturns the number of clusters.- Specified by:
getClustersin interfaceODatabase<ORecord>- Returns:
- Number of the clusters
-
existsCluster
Deprecated.Description copied from interface:ODatabaseReturns true if the cluster exists, otherwise false.- Specified by:
existsClusterin interfaceODatabase<ORecord>- Parameters:
iClusterName- Cluster name- Returns:
- true if the cluster exists, otherwise false
-
getClusterNames
Deprecated.Description copied from interface:ODatabaseReturns all the names of the clusters.- Specified by:
getClusterNamesin interfaceODatabase<ORecord>- Returns:
- Collection of cluster names.
-
getClusterIdByName
Deprecated.Description copied from interface:ODatabaseReturns the cluster id by name.- Specified by:
getClusterIdByNamein interfaceODatabase<ORecord>- Parameters:
iClusterName- Cluster name- Returns:
- The id of searched cluster.
-
getClusterNameById
Deprecated.Description copied from interface:ODatabaseReturns the cluster name by id.- Specified by:
getClusterNameByIdin interfaceODatabase<ORecord>- Parameters:
iClusterId- Cluster id- Returns:
- The name of searched cluster.
-
getClusterRecordSizeByName
Deprecated.Description copied from interface:ODatabaseReturns the total size of records contained in the cluster defined by its name.- Specified by:
getClusterRecordSizeByNamein interfaceODatabase<ORecord>- Parameters:
iClusterName- Cluster name- Returns:
- Total size of records contained.
-
getClusterRecordSizeById
public long getClusterRecordSizeById(int iClusterId) Deprecated.Description copied from interface:ODatabaseReturns the total size of records contained in the cluster defined by its id.- Specified by:
getClusterRecordSizeByIdin interfaceODatabase<ORecord>- Parameters:
iClusterId- Cluster id- Returns:
- The name of searched cluster.
-
isClosed
public boolean isClosed()Deprecated.Description copied from interface:ODatabaseChecks if the database is closed. -
truncateCluster
Deprecated.Description copied from interface:ODatabaseRemoves all data in the cluster with given name. As result indexes for this class will be rebuilt.- Specified by:
truncateClusterin interfaceODatabase<ORecord>- Parameters:
clusterName- Name of cluster to be truncated.
-
countClusterElements
public long countClusterElements(int iCurrentClusterId) Deprecated.Description copied from interface:ODatabaseCounts all the entities in the specified cluster id.- Specified by:
countClusterElementsin interfaceODatabase<ORecord>- Parameters:
iCurrentClusterId- Cluster id- Returns:
- Total number of entities contained in the specified cluster
-
countClusterElements
public long countClusterElements(int iCurrentClusterId, boolean countTombstones) Deprecated.- Specified by:
countClusterElementsin interfaceODatabase<ORecord>
-
countClusterElements
public long countClusterElements(int[] iClusterIds) Deprecated.Description copied from interface:ODatabaseCounts all the entities in the specified cluster ids.- Specified by:
countClusterElementsin interfaceODatabase<ORecord>- Parameters:
iClusterIds- Array of cluster ids Cluster id- Returns:
- Total number of entities contained in the specified clusters
-
countClusterElements
public long countClusterElements(int[] iClusterIds, boolean countTombstones) Deprecated.- Specified by:
countClusterElementsin interfaceODatabase<ORecord>
-
countClusterElements
Deprecated.Description copied from interface:ODatabaseCounts all the entities in the specified cluster name.- Specified by:
countClusterElementsin interfaceODatabase<ORecord>- Parameters:
iClusterName- Cluster name- Returns:
- Total number of entities contained in the specified cluster
-
addCluster
Deprecated.Description copied from interface:ODatabaseAdds a new cluster.- Specified by:
addClusterin interfaceODatabase<ORecord>- Parameters:
iClusterName- Cluster nameiParameters- Additional parameters to pass to the factories- Returns:
- Cluster id
-
addBlobCluster
Deprecated.Description copied from interface:ODatabaseDocumentAdd a cluster for blob records.- Specified by:
addBlobClusterin interfaceODatabase<ORecord>- Specified by:
addBlobClusterin interfaceODatabaseDocument- Parameters:
iClusterName- Cluster nameiParameters- Additional parameters to pass to the factories- Returns:
- Cluster id
-
getBlobClusterIds
Deprecated.Description copied from interface:ODatabaseRetrieve the set of defined blob cluster.- Specified by:
getBlobClusterIdsin interfaceODatabase<ORecord>- Returns:
- the set of defined blob cluster ids.
-
addCluster
Deprecated.Description copied from interface:ODatabaseAdds a new cluster.- Specified by:
addClusterin interfaceODatabase<ORecord>- Parameters:
iClusterName- Cluster nameiRequestedId- requested id of the cluster- Returns:
- Cluster id
-
dropCluster
Deprecated.Description copied from interface:ODatabaseDrops a cluster by its name. Physical clusters will be completely deleted- Specified by:
dropClusterin interfaceODatabase<ORecord>- Parameters:
iClusterName- the name of the cluster- Returns:
- true if has been removed, otherwise false
-
dropCluster
public boolean dropCluster(int iClusterId) Deprecated.Description copied from interface:ODatabaseDrops a cluster by its id. Physical clusters will be completely deleted.- Specified by:
dropClusterin interfaceODatabase<ORecord>- Parameters:
iClusterId- id of cluster to delete- Returns:
- true if has been removed, otherwise false
-
setProperty
Deprecated.Description copied from interface:ODatabaseSets a property value- Specified by:
setPropertyin interfaceODatabase<ORecord>- Parameters:
iName- Property nameiValue- new value to set- Returns:
- The previous value if any, otherwise null
-
getProperty
Deprecated.Description copied from interface:ODatabaseGets the property value.- Specified by:
getPropertyin interfaceODatabase<ORecord>- Parameters:
iName- Property name- Returns:
- The previous value if any, otherwise null
-
getProperties
Deprecated.Description copied from interface:ODatabaseReturns an iterator of the property entries- Specified by:
getPropertiesin interfaceODatabase<ORecord>
-
get
Deprecated.Description copied from interface:ODatabaseReturns a database attribute value -
set
Deprecated.Description copied from interface:ODatabaseSets a database attribute value -
registerListener
Deprecated.Description copied from interface:ODatabaseRegisters a listener to the database events.- Specified by:
registerListenerin interfaceODatabase<ORecord>- Parameters:
iListener- the listener to register
-
unregisterListener
Deprecated.Description copied from interface:ODatabaseUnregisters a listener to the database events.- Specified by:
unregisterListenerin interfaceODatabase<ORecord>- Parameters:
iListener- the listener to unregister
-
getRecordMetadata
Deprecated.- Specified by:
getRecordMetadatain interfaceODatabase<ORecord>
-
newInstance
Deprecated.Description copied from interface:ODatabaseDocumentCreates a new entity instance. Each database implementation will return the right type.- Specified by:
newInstancein interfaceODatabaseDocument- Returns:
- The new instance.
-
newBlob
Deprecated.Description copied from interface:ODatabaseDocumentCreate a new instance of a blob containing the given bytes.- Specified by:
newBlobin interfaceODatabaseDocument- Parameters:
bytes- content of the OBlob- Returns:
- the OBlob instance.
-
newBlob
Deprecated.Description copied from interface:ODatabaseDocumentCreate a new empty instance of a blob.- Specified by:
newBlobin interfaceODatabaseDocument- Returns:
- the OBlob instance.
-
newLightweightEdge
Deprecated.- Specified by:
newLightweightEdgein interfaceODatabaseDocumentInternal
-
newRegularEdge
Deprecated.- Specified by:
newRegularEdgein interfaceODatabaseDocumentInternal
-
countClass
Deprecated.Description copied from interface:ODatabaseDocumentCounts the entities contained in the specified class and sub classes (polymorphic).- Specified by:
countClassin interfaceODatabaseDocument- Parameters:
iClassName- Class name- Returns:
- Total entities
-
countClass
Deprecated.Description copied from interface:ODatabaseDocumentCounts the entities contained in the specified class.- Specified by:
countClassin interfaceODatabaseDocument- Parameters:
iClassName- Class nameiPolymorphic- True if consider also the sub classes, otherwise false- Returns:
- Total entities
-
countView
Deprecated.- Specified by:
countViewin interfaceODatabaseDocument
-
backup
public List<String> backup(OutputStream out, Map<String, Object> options, Callable<Object> callable, OCommandOutputListener iListener, int compressionLevel, int bufferSize) throws IOExceptionDeprecated.Description copied from interface:OBackupableExecutes a backup of the database. During the backup the database will be frozen in read-only mode.- Specified by:
backupin interfaceOBackupable- Parameters:
out- OutputStream used to write the backup content. Use a FileOutputStream to make the backup persistent on diskoptions- Backup options as Map<String, Object> objectcallable- 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 compression- Throws:
IOException- See Also:
-
restore
public void restore(InputStream in, Map<String, Object> options, Callable<Object> callable, OCommandOutputListener iListener) throws IOExceptionDeprecated.Description copied from interface:OBackupableExecutes a restore of a database backup. During the restore the database will be frozen in read-only mode.- Specified by:
restorein interfaceOBackupable- Parameters:
in- InputStream used to read the backup content. Use a FileInputStream to read a backup on a diskoptions- Backup options as Map<String, Object> objectcallable- Callback to execute when the database is lockediListener- Listener called for backup messages- Throws:
IOException- See Also:
-
setSerializer
Deprecated.- Specified by:
setSerializerin interfaceODatabaseDocumentInternal
-
query
Deprecated.Description copied from interface:ODatabaseExecutes an SQL query. The result set has to be closed after usage
Sample usage:OResultSet rs = db.query("SELECT FROM V where name = ?", "John"); while(rs.hasNext()){ OResult item = rs.next(); ... } rs.close(); -
query
public OResultSet query(String query, Map args) throws OCommandSQLParsingException, OCommandExecutionException Deprecated.Description copied from interface:ODatabaseExecutes an SQL query (idempotent). The result set has to be closed after usage
Sample usage: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();- Specified by:
queryin interfaceODatabase<ORecord>- Parameters:
query- the query stringargs- query parameters (named)- Returns:
- Throws:
OCommandSQLParsingExceptionOCommandExecutionException
-
command
public OResultSet command(String query, Object... args) throws OCommandSQLParsingException, OCommandExecutionException Deprecated.Description copied from interface:ODatabaseExecutes a generic (idempotent or non idempotent) command. The result set has to be closed after usage
Sample usage:OResultSet rs = db.command("INSERT INTO Person SET name = ?", "John"); ... rs.close();- Specified by:
commandin interfaceODatabase<ORecord>args- query arguments- Returns:
- Throws:
OCommandSQLParsingExceptionOCommandExecutionException
-
command
public OResultSet command(String query, Map args) throws OCommandSQLParsingException, OCommandExecutionException Deprecated.Description copied from interface:ODatabaseExecutes a generic (idempotent or non idempotent) command. The result set has to be closed after usage
Sample usage:Map<String, Object> params = new HashMapMap<>(); params.put("name", "John"); OResultSet rs = db.query("INSERT INTO Person SET name = :name", params); ... rs.close();- Specified by:
commandin interfaceODatabase<ORecord>- Returns:
- Throws:
OCommandSQLParsingExceptionOCommandExecutionException
-
setCustom
Deprecated.- Specified by:
setCustomin interfaceODatabaseDocumentInternal
-
callOnDropListeners
public void callOnDropListeners()Deprecated.- Specified by:
callOnDropListenersin interfaceODatabaseDocumentInternal
-
isPrefetchRecords
public boolean isPrefetchRecords()Deprecated.- Specified by:
isPrefetchRecordsin interfaceODatabaseDocumentInternal
-
setPrefetchRecords
public void setPrefetchRecords(boolean prefetchRecords) Deprecated.- Specified by:
setPrefetchRecordsin interfaceODatabaseDocumentInternal
-
checkForClusterPermissions
Deprecated.- Specified by:
checkForClusterPermissionsin interfaceODatabaseDocumentInternal
-
execute
public OResultSet execute(String language, String script, Object... args) throws OCommandExecutionException, OCommandScriptException Deprecated.Description copied from interface:ODatabaseExecute a script in a specified query language. The result set has to be closed after usage
Sample usage:String script = "INSERT INTO Person SET name = 'foo', surname = ?;"+ "INSERT INTO Person SET name = 'bar', surname = ?;"+ "INSERT INTO Person SET name = 'baz', surname = ?;";OResultSet rs = db.execute("sql", script, "Surname1", "Surname2", "Surname3"); ... rs.close();
- Specified by:
executein interfaceODatabase<ORecord>- Returns:
- Throws:
OCommandExecutionExceptionOCommandScriptException
-
execute
public OResultSet execute(String language, String script, Map<String, ?> args) throws OCommandExecutionException, OCommandScriptExceptionDeprecated.Description copied from interface:ODatabaseExecute a script of a specified query language The result set has to be closed after usage
Sample usage:Map<String, Object> params = new HashMapMap<>(); params.put("surname1", "Jones"); params.put("surname2", "May"); params.put("surname3", "Ali");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();
- Specified by:
executein interfaceODatabase<ORecord>- Returns:
- Throws:
OCommandExecutionExceptionOCommandScriptException
-
live
Deprecated.Description copied from interface:ODatabaseSubscribe a query as a live query for future create/update event with the referred conditions -
live
Deprecated.Description copied from interface:ODatabaseSubscribe a query as a live query for future create/update event with the referred conditions -
recycle
Deprecated.- Specified by:
recyclein interfaceODatabaseDocumentInternal
-
internalCommit
Deprecated.Description copied from interface:ODatabaseDocumentInternalExecuted the commit on the storage hiding away storage concepts from the transaction- Specified by:
internalCommitin interfaceODatabaseDocumentInternal
-
isClusterVertex
public boolean isClusterVertex(int cluster) Deprecated.- Specified by:
isClusterVertexin interfaceODatabaseDocumentInternal
-
isClusterEdge
public boolean isClusterEdge(int cluster) Deprecated.- Specified by:
isClusterEdgein interfaceODatabaseDocumentInternal
-
isClusterView
public boolean isClusterView(int cluster) Deprecated.- Specified by:
isClusterViewin interfaceODatabaseDocumentInternal
-
beforeCreateOperations
Deprecated.- Specified by:
beforeCreateOperationsin interfaceODatabaseDocumentInternal- Returns:
- null if nothing changed the instance if has been modified or replaced
-
beforeUpdateOperations
Deprecated.- Specified by:
beforeUpdateOperationsin interfaceODatabaseDocumentInternal- Returns:
- null if nothing changed the instance if has been modified or replaced
-
beforeDeleteOperations
Deprecated.- Specified by:
beforeDeleteOperationsin interfaceODatabaseDocumentInternal
-
afterCreateOperations
Deprecated.- Specified by:
afterCreateOperationsin interfaceODatabaseDocumentInternal
-
afterDeleteOperations
Deprecated.- Specified by:
afterDeleteOperationsin interfaceODatabaseDocumentInternal
-
afterUpdateOperations
Deprecated.- Specified by:
afterUpdateOperationsin interfaceODatabaseDocumentInternal
-
afterReadOperations
Deprecated.- Specified by:
afterReadOperationsin interfaceODatabaseDocumentInternal
-
beforeReadOperations
Deprecated.- Specified by:
beforeReadOperationsin interfaceODatabaseDocumentInternal- Returns:
- true if the record should be skipped
-
internalClose
public void internalClose(boolean recycle) Deprecated.- Specified by:
internalClosein interfaceODatabaseDocumentInternal
-
saveAll
public ORecord saveAll(ORecord iRecord, String iClusterName, ODatabase.OPERATION_MODE iMode, boolean iForceCreate, ORecordCallback<? extends Number> iRecordCreatedCallback, ORecordCallback<Integer> iRecordUpdatedCallback) Deprecated.- Specified by:
saveAllin interfaceODatabaseDocumentInternal
-
getClusterName
Deprecated.- Specified by:
getClusterNamein interfaceODatabaseDocumentInternal
-
getViewFromCluster
Deprecated.- Specified by:
getViewFromClusterin interfaceODatabaseDocumentInternal
-
internalLockRecord
Deprecated.- Specified by:
internalLockRecordin interfaceODatabaseDocumentInternal
-
internalUnlockRecord
Deprecated.- Specified by:
internalUnlockRecordin interfaceODatabaseDocumentInternal
-
lock
Deprecated.Description copied from interface:ODatabasePessimistic lock a record.In 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.
- Specified by:
lockin interfaceODatabase<ORecord>- Parameters:
recordId- the id of the record that need to be locked- Returns:
- the record updated to the last state after the lock.
- Throws:
OLockException- In case of deadlock detected
-
lock
public <RET extends ORecord> RET lock(ORID recordId, long timeout, TimeUnit timeoutUnit) throws OLockException Deprecated.Description copied from interface:ODatabasePessimistic lock a record.- Specified by:
lockin interfaceODatabase<ORecord>- Parameters:
recordId- the id of the record that need to be lockedtimeout- for the record lockingtimeoutUnit- relative for the timeout- Returns:
- the record updated to the last state after the lock.
- Throws:
OLockException- In case of deadlock detected
-
unlock
Deprecated.Description copied from interface:ODatabasePessimistic unlock- Specified by:
unlockin interfaceODatabase<ORecord>- Parameters:
recordId- the id of the record to unlock- Throws:
OLockException- if the record is not locked.
-
sendSequenceAction
public <T> T sendSequenceAction(OSequenceAction action) throws ExecutionException, InterruptedException Deprecated.- Specified by:
sendSequenceActionin interfaceODatabaseDocumentInternal- Throws:
ExecutionExceptionInterruptedException
-
getCollectionsChanges
Deprecated.- Specified by:
getCollectionsChangesin interfaceODatabaseDocumentInternal
-
isRemote
public boolean isRemote()Deprecated.- Specified by:
isRemotein interfaceODatabaseDocumentInternal
-
getStorageInfo
Deprecated.- Specified by:
getStorageInfoin interfaceODatabaseInternal<ORecord>
-
dropClusterInternal
public boolean dropClusterInternal(int clusterId) Deprecated.- Specified by:
dropClusterInternalin interfaceODatabaseDocumentInternal
-
getClusterDataRange
public long[] getClusterDataRange(int currentClusterId) Deprecated.- Specified by:
getClusterDataRangein interfaceODatabaseDocumentInternal
-
getLastClusterPosition
public long getLastClusterPosition(int clusterId) Deprecated.- Specified by:
getLastClusterPositionin interfaceODatabaseDocumentInternal
-
setDefaultClusterId
public void setDefaultClusterId(int addCluster) Deprecated.- Specified by:
setDefaultClusterIdin interfaceODatabaseDocumentInternal
-
getClusterRecordConflictStrategy
Deprecated.- Specified by:
getClusterRecordConflictStrategyin interfaceODatabaseDocumentInternal
-
getClustersIds
Deprecated.- Specified by:
getClustersIdsin interfaceODatabaseDocumentInternal
-
truncateClass
Deprecated.- Specified by:
truncateClassin interfaceODatabaseDocumentInternal
-
truncateClusterInternal
Deprecated.- Specified by:
truncateClusterInternalin interfaceODatabaseDocumentInternal
-
truncateClass
Deprecated.- Specified by:
truncateClassin interfaceODatabaseDocumentInternal
-
commitPreallocate
public void commitPreallocate()Deprecated.- Specified by:
commitPreallocatein interfaceODatabaseDocumentInternal
-
internalCommitPreallocate
Deprecated.- Specified by:
internalCommitPreallocatein interfaceODatabaseDocumentInternal
-