Class ODatabaseDocumentTx

java.lang.Object
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx
All Implemented Interfaces:
ODatabaseDocument, ODatabase<ORecord>, ODatabaseDocumentInternal, ODatabaseInternal<ORecord>, ODatabaseSession, OBackupable, Closeable, AutoCloseable
Direct Known Subclasses:
ODatabaseDocumentTxPooled

@Deprecated public class ODatabaseDocumentTx extends Object implements ODatabaseDocumentInternal
Deprecated.
Created by tglman on 20/07/16. @Deprecated use OrientDB instead.
  • Field Details

  • Constructor Details

    • ODatabaseDocumentTx

      @Deprecated public ODatabaseDocumentTx(String url)
      Deprecated.
    • ODatabaseDocumentTx

      protected ODatabaseDocumentTx(String url, boolean ownerProtection)
      Deprecated.
    • ODatabaseDocumentTx

      protected ODatabaseDocumentTx(ODatabaseDocumentInternal ref, String baseUrl)
      Deprecated.
  • Method Details

    • closeAll

      public static void closeAll()
      Deprecated.
    • getOrCreateRemoteFactory

      protected static OrientDBInternal getOrCreateRemoteFactory(String baseUrl)
      Deprecated.
    • getOrCreateEmbeddedFactory

      protected static OrientDBInternal getOrCreateEmbeddedFactory(String baseUrl, OrientDBConfig config)
      Deprecated.
    • getDefaultSerializer

      public static ORecordSerializer getDefaultSerializer()
      Deprecated.
    • setDefaultSerializer

      public static void setDefaultSerializer(ORecordSerializer defaultSerializer)
      Deprecated.
    • getStorageVersions

      public OCurrentStorageComponentsFactory getStorageVersions()
      Deprecated.
      Description copied from interface: ODatabaseDocumentInternal
      Internal. 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:
      getStorageVersions in interface ODatabaseDocumentInternal
    • getSbTreeCollectionManager

      public OSBTreeCollectionManager getSbTreeCollectionManager()
      Deprecated.
      Description copied from interface: ODatabaseDocumentInternal
      Internal. Gets an instance of sb-tree collection manager for current database.
      Specified by:
      getSbTreeCollectionManager in interface ODatabaseDocumentInternal
    • getSerializerFactory

      public OBinarySerializerFactory getSerializerFactory()
      Deprecated.
      Specified by:
      getSerializerFactory in interface ODatabaseDocumentInternal
      Returns:
      the factory of binary serializers.
    • getSerializer

      public ORecordSerializer getSerializer()
      Deprecated.
      Specified by:
      getSerializer in interface ODatabaseDocumentInternal
      Returns:
      serializer which is used for document serialization.
    • assignAndCheckCluster

      public int assignAndCheckCluster(ORecord record, String iClusterName)
      Deprecated.
      Specified by:
      assignAndCheckCluster in interface ODatabaseDocumentInternal
    • loadIfVersionIsNotLatest

      public <RET extends ORecord> RET loadIfVersionIsNotLatest(ORID rid, int recordVersion, String fetchPlan, boolean ignoreCache) throws ORecordNotFoundException
      Deprecated.
      Specified by:
      loadIfVersionIsNotLatest in interface ODatabaseDocumentInternal
      Throws:
      ORecordNotFoundException
    • reloadUser

      public void reloadUser()
      Deprecated.
      Specified by:
      reloadUser in interface ODatabaseDocumentInternal
    • callbackHooks

      public ORecordHook.RESULT callbackHooks(ORecordHook.TYPE type, OIdentifiable id)
      Deprecated.
      Specified by:
      callbackHooks in interface ODatabaseDocumentInternal
    • 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:
      executeReadRecord in interface ODatabaseDocumentInternal
    • executeDeleteRecord

      public void executeDeleteRecord(OIdentifiable record, int iVersion, boolean iRequired, ODatabase.OPERATION_MODE iMode, boolean prohibitTombstones)
      Deprecated.
      Specified by:
      executeDeleteRecord in interface ODatabaseDocumentInternal
    • setDefaultTransactionMode

      public void setDefaultTransactionMode(Map<ORID,OTransactionAbstract.LockedRecordMetadata> noTxLocks)
      Deprecated.
      Specified by:
      setDefaultTransactionMode in interface ODatabaseDocumentInternal
    • getMetadata

      public OMetadataInternal getMetadata()
      Deprecated.
      Description copied from interface: ODatabase
      Return the OMetadata instance. Cannot be null.
      Specified by:
      getMetadata in interface ODatabase<ORecord>
      Specified by:
      getMetadata in interface ODatabaseDocumentInternal
      Returns:
      The OMetadata instance.
    • registerHook

      public <DB extends ODatabase<?>> DB registerHook(ORecordHook iHookImpl)
      Deprecated.
      Description copied from interface: ODatabase
      Registers a hook to listen all events for Records.
      Specified by:
      registerHook in interface ODatabase<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:
      registerHook in interface ODatabase<ORecord>
    • getHooks

      Deprecated.
      Description copied from interface: ODatabase
      Retrieves all the registered hooks.
      Specified by:
      getHooks in interface ODatabase<ORecord>
      Returns:
      A not-null unmodifiable map of ORecordHook and position instances. If there are no hooks registered, the Map is empty.
    • unregisterHook

      public <DB extends ODatabase<?>> DB unregisterHook(ORecordHook iHookImpl)
      Deprecated.
      Description copied from interface: ODatabase
      Unregisters a previously registered hook.
      Specified by:
      unregisterHook in interface ODatabase<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: ODatabase
      Returns 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.
      Specified by:
      isMVCC in interface ODatabase<ORecord>
      Returns:
      true if enabled, otherwise false
      See Also:
    • getListeners

      public Iterable<ODatabaseListener> getListeners()
      Deprecated.
      Description copied from interface: ODatabase
      Retrieves all the registered listeners.
      Specified by:
      getListeners in interface ODatabase<ORecord>
      Returns:
      An iterable of ODatabaseListener instances.
    • setMVCC

      public <DB extends ODatabase<?>> DB setMVCC(boolean iValue)
      Deprecated.
      Description copied from interface: ODatabase
      Enables or disables the Multi-Version Concurrency Control. If enabled the version of the record is checked before each update and delete against the records.
      Specified by:
      setMVCC in interface ODatabase<ORecord>
      Returns:
      The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain. deprecated since 2.2
      See Also:
    • getType

      public String getType()
      Deprecated.
      Specified by:
      getType in interface ODatabase<ORecord>
    • getConflictStrategy

      public ORecordConflictStrategy getConflictStrategy()
      Deprecated.
      Description copied from interface: ODatabase
      Returns the current record conflict strategy.
      Specified by:
      getConflictStrategy in interface ODatabase<ORecord>
    • setConflictStrategy

      public <DB extends ODatabase<?>> DB setConflictStrategy(String iStrategyName)
      Deprecated.
      Description copied from interface: ODatabase
      Overrides record conflict strategy selecting the strategy by name.
      Specified by:
      setConflictStrategy in interface ODatabase<ORecord>
      Parameters:
      iStrategyName - ORecordConflictStrategy strategy name
      Returns:
      The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
    • setConflictStrategy

      public <DB extends ODatabase<?>> DB setConflictStrategy(ORecordConflictStrategy iResolver)
      Deprecated.
      Description copied from interface: ODatabase
      Overrides record conflict strategy.
      Specified by:
      setConflictStrategy in interface ODatabase<ORecord>
      Parameters:
      iResolver - ORecordConflictStrategy implementation
      Returns:
      The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
    • incrementalBackup

      public String incrementalBackup(String path)
      Deprecated.
      Description copied from interface: ODatabase
      Performs 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:
      incrementalBackup in interface ODatabase<ORecord>
      Parameters:
      path - Path to backup folder.
      Returns:
      File name of the backup
    • copy

      public ODatabaseDocumentTx copy()
      Deprecated.
      Specified by:
      copy in interface ODatabaseDocumentInternal
    • checkIfActive

      public void checkIfActive()
      Deprecated.
      Specified by:
      checkIfActive in interface ODatabaseDocumentInternal
    • checkOpenness

      protected void checkOpenness()
      Deprecated.
    • callOnOpenListeners

      public void callOnOpenListeners()
      Deprecated.
      Specified by:
      callOnOpenListeners in interface ODatabaseDocumentInternal
    • callOnCloseListeners

      public void callOnCloseListeners()
      Deprecated.
      Specified by:
      callOnCloseListeners in interface ODatabaseDocumentInternal
    • getStorage

      @Deprecated public OStorage getStorage()
      Deprecated.
      Description copied from interface: ODatabaseInternal
      Returns the underlying storage implementation.
      Specified by:
      getStorage in interface ODatabaseInternal<ORecord>
      Returns:
      The underlying storage implementation
      See Also:
    • setUser

      public void setUser(OSecurityUser user)
      Deprecated.
      Description copied from interface: ODatabaseInternal
      Set user for current database instance.
      Specified by:
      setUser in interface ODatabaseInternal<ORecord>
    • replaceStorage

      public void replaceStorage(OStorage iNewStorage)
      Deprecated.
      Description copied from interface: ODatabaseInternal
      Internal only: replace the storage with a new one.
      Specified by:
      replaceStorage in interface ODatabaseInternal<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:
      resetInitialization in interface ODatabaseInternal<ORecord>
    • getDatabaseOwner

      public ODatabaseInternal<?> getDatabaseOwner()
      Deprecated.
      Description copied from interface: ODatabaseInternal
      Returns the database owner. Used in wrapped instances to know the up level ODatabase instance.
      Specified by:
      getDatabaseOwner in interface ODatabaseInternal<ORecord>
      Returns:
      Returns the database owner.
    • setDatabaseOwner

      public ODatabaseInternal<?> setDatabaseOwner(ODatabaseInternal<?> iOwner)
      Deprecated.
      Description copied from interface: ODatabaseInternal
      Internal. Sets the database owner.
      Specified by:
      setDatabaseOwner in interface ODatabaseInternal<ORecord>
    • getUnderlying

      public <DB extends ODatabase> DB getUnderlying()
      Deprecated.
      Description copied from interface: ODatabaseInternal
      Return the underlying database. Used in wrapper instances to know the down level ODatabase instance.
      Specified by:
      getUnderlying in interface ODatabaseInternal<ORecord>
      Returns:
      The underlying ODatabase implementation.
    • setInternal

      public void setInternal(ODatabase.ATTRIBUTES attribute, Object iValue)
      Deprecated.
      Description copied from interface: ODatabaseInternal
      Internal method. Don't call it directly unless you're building an internal component.
      Specified by:
      setInternal in interface ODatabaseInternal<ORecord>
    • open

      public <DB extends ODatabase> DB open(OToken iToken)
      Deprecated.
      Description copied from interface: ODatabaseInternal
      Opens a database using an authentication token received as an argument.
      Specified by:
      open in interface ODatabaseInternal<ORecord>
      Parameters:
      iToken - Authentication token
      Returns:
      The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
    • getSharedContext

      public OSharedContext getSharedContext()
      Deprecated.
      Specified by:
      getSharedContext in interface ODatabaseInternal<ORecord>
    • browseClass

      public ORecordIteratorClass<ODocument> browseClass(String iClassName)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Browses 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:
      browseClass in interface ODatabaseDocument
      Parameters:
      iClassName - Class name to iterate
      Returns:
      Iterator of ODocument instances
    • browseClass

      public ORecordIteratorClass<ODocument> browseClass(String iClassName, boolean iPolymorphic)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Browses 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:
      browseClass in interface ODatabaseDocument
      Parameters:
      iClassName - Class name to iterate
      iPolymorphic - Consider also the instances of the subclasses or not
      Returns:
      Iterator of ODocument instances
    • freeze

      public void freeze()
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Flush 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:
      freeze in interface ODatabase<ORecord>
      Specified by:
      freeze in interface ODatabaseDocument
      See Also:
    • release

      public void release()
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Allows to execute write-related commands on DB. Called after ODatabaseDocument.freeze() command.
      Specified by:
      release in interface ODatabase<ORecord>
      Specified by:
      release in interface ODatabaseDocument
      See Also:
    • freeze

      public void freeze(boolean throwException)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Flush 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 on throwException parameter.

      IMPORTANT: This command is not reentrant.

      Specified by:
      freeze in interface ODatabase<ORecord>
      Specified by:
      freeze in interface ODatabaseDocument
      Parameters:
      throwException - If true OModificationOperationProhibitedException exception will be thrown in case of write command will be performed.
    • newVertex

      public OVertex newVertex(String iClassName)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Creates a new Vertex
      Specified by:
      newVertex in interface ODatabaseDocument
      Parameters:
      iClassName - the vertex type (class name)
      Returns:
    • newVertex

      public OVertex newVertex(OClass type)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Creates a new Vertex
      Specified by:
      newVertex in interface ODatabaseDocument
      Parameters:
      type - the vertex type
      Returns:
    • newEdge

      public OEdge newEdge(OVertex from, OVertex to, String type)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Creates a new Edge
      Specified by:
      newEdge in interface ODatabaseDocument
      Parameters:
      from - the starting point vertex
      to - the endpoint vertex
      type - the edge type
      Returns:
      the edge
    • newEdge

      public OEdge newEdge(OVertex from, OVertex to, OClass type)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Creates a new Edge
      Specified by:
      newEdge in interface ODatabaseDocument
      Parameters:
      from - the starting point vertex
      to - the endpoint vertex
      type - the edge type
      Returns:
      the edge
    • newElement

      public OElement newElement()
      Deprecated.
      Specified by:
      newElement in interface ODatabaseDocument
    • newElement

      public OElement newElement(String className)
      Deprecated.
      Specified by:
      newElement in interface ODatabaseDocument
    • newEmbeddedElement

      public OElement newEmbeddedElement()
      Deprecated.
      Specified by:
      newEmbeddedElement in interface ODatabaseDocument
    • newEmbeddedElement

      public OElement newEmbeddedElement(String className)
      Deprecated.
      Specified by:
      newEmbeddedElement in interface ODatabaseDocument
    • isUseLightweightEdges

      public boolean isUseLightweightEdges()
      Deprecated.
      Specified by:
      isUseLightweightEdges in interface ODatabaseDocumentInternal
    • setUseLightweightEdges

      public void setUseLightweightEdges(boolean b)
      Deprecated.
      Specified by:
      setUseLightweightEdges in interface ODatabaseDocumentInternal
    • newInstance

      public ODocument newInstance()
      Deprecated.
      Description copied from interface: ODatabase
      Creates a new entity instance.
      Specified by:
      newInstance in interface ODatabase<ORecord>
      Returns:
      The new instance.
    • getDictionary

      @Deprecated public ODictionary<ORecord> getDictionary()
      Deprecated.
      Returns the Dictionary manual index.
      Specified by:
      getDictionary in interface ODatabase<ORecord>
      Returns:
      ODictionary instance
    • getUser

      public OSecurityUser getUser()
      Deprecated.
      Description copied from interface: ODatabase
      Returns the current user logged into the database.
      Specified by:
      getUser in interface ODatabase<ORecord>
      See Also:
    • load

      public <RET extends ORecord> RET load(ORecord iObject)
      Deprecated.
      Description copied from interface: ODatabase
      Loads the entity and return it.
      Specified by:
      load in interface ODatabase<ORecord>
      Parameters:
      iObject - The entity to load. If the entity was already loaded it will be reloaded and all the changes will be lost.
      Returns:
    • load

      public <RET extends ORecord> RET load(ORecord iObject, String iFetchPlan)
      Deprecated.
      Description copied from interface: ODatabase
      Loads a record using a fetch plan.
      Specified by:
      load in interface ODatabase<ORecord>
      Parameters:
      iObject - Record to load
      iFetchPlan - Fetch plan used
      Returns:
      The record received
    • load

      public <RET extends ORecord> RET load(ORecord iObject, String iFetchPlan, boolean iIgnoreCache)
      Deprecated.
      Description copied from interface: ODatabase
      Loads a record using a fetch plan.
      Specified by:
      load in interface ODatabase<ORecord>
      Parameters:
      iObject - Record to load
      iFetchPlan - Fetch plan used
      iIgnoreCache - Ignore cache or use it
      Returns:
      The record received
    • reload

      public <RET extends ORecord> RET reload(ORecord iObject, String iFetchPlan, boolean iIgnoreCache)
      Deprecated.
      Description copied from interface: ODatabase
      Force the reloading of the entity.
      Specified by:
      reload in interface ODatabase<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 used
      iIgnoreCache - Ignore cache or use it
      Returns:
      The loaded entity
    • reload

      public <RET extends ORecord> RET reload(ORecord iObject, String iFetchPlan, boolean iIgnoreCache, boolean force)
      Deprecated.
      Description copied from interface: ODatabase
      Force the reloading of the entity.
      Specified by:
      reload in interface ODatabase<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 used
      iIgnoreCache - Ignore cache or use it
      force - 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

      public <RET extends ORecord> RET load(ORID recordId)
      Deprecated.
      Description copied from interface: ODatabase
      Loads the entity by the Record ID.
      Specified by:
      load in interface ODatabase<ORecord>
      Parameters:
      recordId - The unique record id of the entity to load.
      Returns:
      The loaded entity
    • load

      public <RET extends ORecord> RET load(ORID iRecordId, String iFetchPlan)
      Deprecated.
      Description copied from interface: ODatabase
      Loads the entity by the Record ID using a fetch plan.
      Specified by:
      load in interface ODatabase<ORecord>
      Parameters:
      iRecordId - The unique record id of the entity to load.
      iFetchPlan - Fetch plan used
      Returns:
      The loaded entity
    • load

      public <RET extends ORecord> RET load(ORID iRecordId, String iFetchPlan, boolean iIgnoreCache)
      Deprecated.
      Description copied from interface: ODatabase
      Loads the entity by the Record ID using a fetch plan and specifying if the cache must be ignored.
      Specified by:
      load in interface ODatabase<ORecord>
      Parameters:
      iRecordId - The unique record id of the entity to load.
      iFetchPlan - Fetch plan used
      iIgnoreCache - Ignore cache or use it
      Returns:
      The loaded entity
    • save

      public <RET extends ORecord> RET save(ORecord iObject)
      Deprecated.
      Description copied from interface: ODatabase
      Saves 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.
      Specified by:
      save in interface ODatabase<ORecord>
      Parameters:
      iObject - The entity to save
      Returns:
      The saved entity.
    • 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: ODatabase
      Saves 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.
      Specified by:
      save in interface ODatabase<ORecord>
      Parameters:
      iObject - The entity to save
      iMode - Mode of save: synchronous (default) or asynchronous
      iForceCreate - Flag that indicates that record should be created. If record with current rid already exists, exception is thrown
    • save

      public <RET extends ORecord> RET save(ORecord iObject, String iClusterName)
      Deprecated.
      Description copied from interface: ODatabase
      Saves 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.
      Specified by:
      save in interface ODatabase<ORecord>
      Parameters:
      iObject - The entity to save
      iClusterName - Name of the cluster where to save
      Returns:
      The saved entity.
    • 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: ODatabase
      Saves 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:
      save in interface ODatabase<ORecord>
      Parameters:
      iObject - The entity to save
      iClusterName - Name of the cluster where to save
      iMode - Mode of save: synchronous (default) or asynchronous
      iForceCreate - Flag that indicates that record should be created. If record with current rid already exists, exception is thrown
    • delete

      public ODatabase<ORecord> delete(ORecord iObject)
      Deprecated.
      Description copied from interface: ODatabase
      Deletes an entity from the database in synchronous mode.
      Specified by:
      delete in interface ODatabase<ORecord>
      Parameters:
      iObject - The entity to delete.
      Returns:
      The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
    • delete

      public ODatabase<ORecord> delete(ORID iRID)
      Deprecated.
      Description copied from interface: ODatabase
      Deletes the entity with the received RID from the database.
      Specified by:
      delete in interface ODatabase<ORecord>
      Parameters:
      iRID - The RecordID to delete.
      Returns:
      The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
    • delete

      public ODatabase<ORecord> delete(ORID iRID, int iVersion)
      Deprecated.
      Description copied from interface: ODatabase
      Deletes the entity with the received RID from the database.
      Specified by:
      delete in interface ODatabase<ORecord>
      Parameters:
      iRID - The RecordID to delete.
      iVersion - for MVCC
      Returns:
      The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
    • cleanOutRecord

      public ODatabaseDocumentInternal cleanOutRecord(ORID rid, int version)
      Deprecated.
      Specified by:
      cleanOutRecord in interface ODatabaseDocumentInternal
    • getTransaction

      public OTransaction getTransaction()
      Deprecated.
      Description copied from interface: ODatabase
      Return active transaction. Cannot be null. If no transaction is active, then a OTransactionNoTx instance is returned.
      Specified by:
      getTransaction in interface ODatabase<ORecord>
      Returns:
      OTransaction implementation
    • begin

      public ODatabase<ORecord> begin()
      Deprecated.
      Description copied from interface: ODatabase
      Begins 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 the ODatabase.commit() or ODatabase.rollback().
      Specified by:
      begin in interface ODatabase<ORecord>
      Returns:
      The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
    • begin

      public ODatabase<ORecord> begin(OTransaction.TXTYPE iStatus)
      Deprecated.
      Description copied from interface: ODatabase
      Begins 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 the ODatabase.commit() or ODatabase.rollback().
      Specified by:
      begin in interface ODatabase<ORecord>
      Returns:
      The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
    • begin

      Deprecated.
      Description copied from interface: ODatabase
      Attaches a transaction as current.
      Specified by:
      begin in interface ODatabase<ORecord>
      Returns:
      The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
      Throws:
      OTransactionException
    • rawBegin

      public void rawBegin(OTransaction transaction)
      Deprecated.
      Specified by:
      rawBegin in interface ODatabaseDocumentInternal
    • commit

      public ODatabase<ORecord> commit() throws OTransactionException
      Deprecated.
      Description copied from interface: ODatabase
      Commits 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:
      commit in interface ODatabase<ORecord>
      Returns:
      Throws:
      OTransactionException
    • commit

      public ODatabase<ORecord> commit(boolean force) throws OTransactionException
      Deprecated.
      Specified by:
      commit in interface ODatabase<ORecord>
      Throws:
      OTransactionException
    • rollback

      public ODatabase<ORecord> rollback() throws OTransactionException
      Deprecated.
      Description copied from interface: ODatabase
      Aborts the current running transaction. All the pending changed entities will be restored in the data store.
      Specified by:
      rollback in interface ODatabase<ORecord>
      Returns:
      Throws:
      OTransactionException
    • rollback

      public ODatabase<ORecord> rollback(boolean force) throws OTransactionException
      Deprecated.
      Specified by:
      rollback in interface ODatabase<ORecord>
      Throws:
      OTransactionException
    • query

      public <RET extends List<?>> RET query(OQuery<?> iCommand, Object... iArgs)
      Deprecated.
      Description copied from interface: ODatabase
      Execute 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.
      Specified by:
      query in interface ODatabase<ORecord>
      Parameters:
      iCommand - Query command
      iArgs - Optional parameters to bind to the query
      Returns:
      List of POJOs
    • command

      public <RET extends OCommandRequest> RET command(OCommandRequest iCommand)
      Deprecated.
      Description copied from interface: ODatabase
      Creates 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.
      Specified by:
      command in interface ODatabase<ORecord>
      Parameters:
      iCommand - Command request to execute.
      Returns:
      The same Command request received as parameter.
    • browseCluster

      public ORecordIteratorCluster<ODocument> browseCluster(String iClusterName)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Browses all the records of the specified cluster.
      Specified by:
      browseCluster in interface ODatabaseDocument
      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:
      browseCluster in interface ODatabaseDocument
    • browseCluster

      public <REC extends ORecord> ORecordIteratorCluster<REC> browseCluster(String iClusterName, Class<REC> iRecordClass)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Browses all the records of the specified cluster of the passed record type.
      Specified by:
      browseCluster in interface ODatabaseDocument
      Parameters:
      iClusterName - Cluster name to iterate
      iRecordClass - 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:
      browseCluster in interface ODatabaseDocument
    • browseCluster

      public <REC extends ORecord> ORecordIteratorCluster<REC> browseCluster(String iClusterName, Class<REC> iRecordClass, long startClusterPosition, long endClusterPosition, boolean loadTombstones)
      Deprecated.
      Specified by:
      browseCluster in interface ODatabaseDocument
    • getRecord

      public <RET extends ORecord> RET getRecord(OIdentifiable iIdentifiable)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Returns 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:
      getRecord in interface ODatabaseDocument
      Returns:
      A ORecord instance
    • getRecordType

      public byte getRecordType()
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Returns the default record type for this kind of database.
      Specified by:
      getRecordType in interface ODatabaseDocument
    • isRetainRecords

      public boolean isRetainRecords()
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Returns true if current configuration retains objects, otherwise false
      Specified by:
      isRetainRecords in interface ODatabaseDocument
      See Also:
    • setRetainRecords

      public ODatabaseDocument setRetainRecords(boolean iValue)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Specifies if retain handled objects in memory or not. Setting it to false can improve performance on large inserts. Default is enabled.
      Specified by:
      setRetainRecords in interface ODatabaseDocument
      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: ODatabaseDocument
      Checks if the operation on a resource is allowed for the current user.
      Specified by:
      checkSecurity in interface ODatabaseDocument
      Parameters:
      resourceGeneric - Generic Resource where to execute the operation
      iOperation - 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: ODatabaseDocument
      Checks if the operation on a resource is allowed for the current user. The check is made in two steps:
      1. Access to all the resource as *
      2. Access to the specific target resource
      Specified by:
      checkSecurity in interface ODatabaseDocument
      Parameters:
      iResourceGeneric - Resource where to execute the operation, i.e.: database.clusters
      iOperation - Operation to execute against the resource
      iResourceSpecific - 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: ODatabaseDocument
      Checks if the operation against multiple resources is allowed for the current user. The check is made in two steps:
      1. Access to all the resource as *
      2. Access to the specific target resources
      Specified by:
      checkSecurity in interface ODatabaseDocument
      Parameters:
      iResourceGeneric - Resource where to execute the operation, i.e.: database.clusters
      iOperation - Operation to execute against the resource
      iResourcesSpecific - 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: ODatabaseDocument
      Tells if validation of record is active. Default is true.
      Specified by:
      isValidationEnabled in interface ODatabaseDocument
      Returns:
      true if it's active, otherwise false.
    • setValidationEnabled

      public <DB extends ODatabaseDocument> DB setValidationEnabled(boolean iEnabled)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Enables or disables the record validation.

      Since 2.2 this setting is persistent.

      Specified by:
      setValidationEnabled in interface ODatabaseDocument
      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

      public <DB extends ODatabaseDocument> DB checkSecurity(String iResource, int iOperation)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Checks if the operation on a resource is allowed for the current user.
      Specified by:
      checkSecurity in interface ODatabaseDocument
      Parameters:
      iResource - Resource where to execute the operation
      iOperation - 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: ODatabaseDocument
      Checks if the operation on a resource is allowed for the current user. The check is made in two steps:
      1. Access to all the resource as *
      2. Access to the specific target resource
      Specified by:
      checkSecurity in interface ODatabaseDocument
      Parameters:
      iResourceGeneric - Resource where to execute the operation, i.e.: database.clusters
      iOperation - Operation to execute against the resource
      iResourceSpecific - 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: ODatabaseDocument
      Checks if the operation against multiple resources is allowed for the current user. The check is made in two steps:
      1. Access to all the resource as *
      2. Access to the specific target resources
      Specified by:
      checkSecurity in interface ODatabaseDocument
      Parameters:
      iResourceGeneric - Resource where to execute the operation, i.e.: database.clusters
      iOperation - Operation to execute against the resource
      iResourcesSpecific - 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:
      isPooled in interface ODatabaseDocument
      Returns:
      true if database is obtained from the pool and false otherwise.
    • open

      public <DB extends ODatabase> DB open(String iUserName, String iUserPassword)
      Deprecated.
      Description copied from interface: ODatabase
      Opens a database using the user and password received as arguments.
      Specified by:
      open in interface ODatabase<ORecord>
      Parameters:
      iUserName - Username to login
      iUserPassword - Password associated to the user
      Returns:
      The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
    • setupThreadOwner

      protected void setupThreadOwner()
      Deprecated.
    • clearOwner

      protected void clearOwner()
      Deprecated.
    • create

      public <DB extends ODatabase> DB create()
      Deprecated.
      Description copied from interface: ODatabase
      Creates a new database.
      Specified by:
      create in interface ODatabase<ORecord>
      Returns:
      The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
    • create

      @Deprecated public <DB extends ODatabase> DB create(String incrementalBackupPath)
      Deprecated.
      Description copied from interface: ODatabase
      Creates new database from database backup. Only incremental backups are supported.
      Specified by:
      create in interface ODatabase<ORecord>
      Type Parameters:
      DB - Concrete database instance type.
      Parameters:
      incrementalBackupPath - Path to incremental backup
      Returns:
      he Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
    • create

      public <DB extends ODatabase> DB create(Map<OGlobalConfiguration,Object> iInitialSettings)
      Deprecated.
      Description copied from interface: ODatabase
      Creates a new database passing initial settings.
      Specified by:
      create in interface ODatabase<ORecord>
      Returns:
      The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
    • activateOnCurrentThread

      public ODatabase activateOnCurrentThread()
      Deprecated.
      Description copied from interface: ODatabase
      Activate 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:
      activateOnCurrentThread in interface ODatabase<ORecord>
    • isActiveOnCurrentThread

      public boolean isActiveOnCurrentThread()
      Deprecated.
      Description copied from interface: ODatabase
      Returns true if the current database instance is active on current thread, otherwise false.
      Specified by:
      isActiveOnCurrentThread in interface ODatabase<ORecord>
    • reload

      public void reload()
      Deprecated.
      Description copied from interface: ODatabase
      Reloads the database information like the cluster list.
      Specified by:
      reload in interface ODatabase<ORecord>
    • drop

      public void drop()
      Deprecated.
      Description copied from interface: ODatabase
      Drops a database.
      Specified by:
      drop in interface ODatabase<ORecord>
    • getConfiguration

      public OContextConfiguration getConfiguration()
      Deprecated.
      Description copied from interface: ODatabase
      Returns the database configuration settings. If defined, any database configuration overwrites the global one.
      Specified by:
      getConfiguration in interface ODatabase<ORecord>
      Returns:
      OContextConfiguration
    • declareIntent

      public boolean declareIntent(OIntent iIntent)
      Deprecated.
      Description copied from interface: ODatabase
      Declares an intent to the database. Intents aim to optimize common use cases.
      Specified by:
      declareIntent in interface ODatabase<ORecord>
      Parameters:
      iIntent - The intent
    • getActiveIntent

      public OIntent getActiveIntent()
      Deprecated.
      Description copied from interface: ODatabase
      Get the active intent in the current session.
      Specified by:
      getActiveIntent in interface ODatabase<ORecord>
      Returns:
    • exists

      public boolean exists()
      Deprecated.
      Description copied from interface: ODatabase
      Checks if the database exists.
      Specified by:
      exists in interface ODatabase<ORecord>
      Returns:
      True if already exists, otherwise false.
    • close

      public void close()
      Deprecated.
      Description copied from interface: ODatabase
      Closes an opened database, if the database is already closed does nothing, if a transaction is active will be rollback.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface ODatabase<ORecord>
    • getStatus

      public ODatabase.STATUS getStatus()
      Deprecated.
      Description copied from interface: ODatabase
      Returns the current status of database.
      Specified by:
      getStatus in interface ODatabase<ORecord>
    • setStatus

      public <DB extends ODatabase> DB setStatus(ODatabase.STATUS iStatus)
      Deprecated.
      Description copied from interface: ODatabase
      Set the current status of database. deprecated since 2.2
      Specified by:
      setStatus in interface ODatabase<ORecord>
    • getSize

      public long getSize()
      Deprecated.
      Description copied from interface: ODatabase
      Returns the total size of the records in the database.
      Specified by:
      getSize in interface ODatabase<ORecord>
    • getName

      public String getName()
      Deprecated.
      Description copied from interface: ODatabase
      Returns the database name.
      Specified by:
      getName in interface ODatabase<ORecord>
      Returns:
      Name of the database
    • getURL

      public String getURL()
      Deprecated.
      Description copied from interface: ODatabase
      Returns the database URL.
      Specified by:
      getURL in interface ODatabase<ORecord>
      Returns:
      URL of the database
    • getLocalCache

      public OLocalRecordCache getLocalCache()
      Deprecated.
      Description copied from interface: ODatabase
      Returns the level1 cache. Cannot be null.
      Specified by:
      getLocalCache in interface ODatabase<ORecord>
      Returns:
      Current cache.
    • getDefaultClusterId

      public int getDefaultClusterId()
      Deprecated.
      Description copied from interface: ODatabase
      Returns the default cluster id. If not specified all the new entities will be stored in the default cluster.
      Specified by:
      getDefaultClusterId in interface ODatabase<ORecord>
      Returns:
      The default cluster id
    • getClusters

      public int getClusters()
      Deprecated.
      Description copied from interface: ODatabase
      Returns the number of clusters.
      Specified by:
      getClusters in interface ODatabase<ORecord>
      Returns:
      Number of the clusters
    • existsCluster

      public boolean existsCluster(String iClusterName)
      Deprecated.
      Description copied from interface: ODatabase
      Returns true if the cluster exists, otherwise false.
      Specified by:
      existsCluster in interface ODatabase<ORecord>
      Parameters:
      iClusterName - Cluster name
      Returns:
      true if the cluster exists, otherwise false
    • getClusterNames

      public Collection<String> getClusterNames()
      Deprecated.
      Description copied from interface: ODatabase
      Returns all the names of the clusters.
      Specified by:
      getClusterNames in interface ODatabase<ORecord>
      Returns:
      Collection of cluster names.
    • getClusterIdByName

      public int getClusterIdByName(String iClusterName)
      Deprecated.
      Description copied from interface: ODatabase
      Returns the cluster id by name.
      Specified by:
      getClusterIdByName in interface ODatabase<ORecord>
      Parameters:
      iClusterName - Cluster name
      Returns:
      The id of searched cluster.
    • getClusterNameById

      public String getClusterNameById(int iClusterId)
      Deprecated.
      Description copied from interface: ODatabase
      Returns the cluster name by id.
      Specified by:
      getClusterNameById in interface ODatabase<ORecord>
      Parameters:
      iClusterId - Cluster id
      Returns:
      The name of searched cluster.
    • getClusterRecordSizeByName

      public long getClusterRecordSizeByName(String iClusterName)
      Deprecated.
      Description copied from interface: ODatabase
      Returns the total size of records contained in the cluster defined by its name.
      Specified by:
      getClusterRecordSizeByName in interface ODatabase<ORecord>
      Parameters:
      iClusterName - Cluster name
      Returns:
      Total size of records contained.
    • getClusterRecordSizeById

      public long getClusterRecordSizeById(int iClusterId)
      Deprecated.
      Description copied from interface: ODatabase
      Returns the total size of records contained in the cluster defined by its id.
      Specified by:
      getClusterRecordSizeById in interface ODatabase<ORecord>
      Parameters:
      iClusterId - Cluster id
      Returns:
      The name of searched cluster.
    • isClosed

      public boolean isClosed()
      Deprecated.
      Description copied from interface: ODatabase
      Checks if the database is closed.
      Specified by:
      isClosed in interface ODatabase<ORecord>
      Returns:
      true if is closed, otherwise false.
    • truncateCluster

      public void truncateCluster(String clusterName)
      Deprecated.
      Description copied from interface: ODatabase
      Removes all data in the cluster with given name. As result indexes for this class will be rebuilt.
      Specified by:
      truncateCluster in interface ODatabase<ORecord>
      Parameters:
      clusterName - Name of cluster to be truncated.
    • countClusterElements

      public long countClusterElements(int iCurrentClusterId)
      Deprecated.
      Description copied from interface: ODatabase
      Counts all the entities in the specified cluster id.
      Specified by:
      countClusterElements in interface ODatabase<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:
      countClusterElements in interface ODatabase<ORecord>
    • countClusterElements

      public long countClusterElements(int[] iClusterIds)
      Deprecated.
      Description copied from interface: ODatabase
      Counts all the entities in the specified cluster ids.
      Specified by:
      countClusterElements in interface ODatabase<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:
      countClusterElements in interface ODatabase<ORecord>
    • countClusterElements

      public long countClusterElements(String iClusterName)
      Deprecated.
      Description copied from interface: ODatabase
      Counts all the entities in the specified cluster name.
      Specified by:
      countClusterElements in interface ODatabase<ORecord>
      Parameters:
      iClusterName - Cluster name
      Returns:
      Total number of entities contained in the specified cluster
    • addCluster

      public int addCluster(String iClusterName, Object... iParameters)
      Deprecated.
      Description copied from interface: ODatabase
      Adds a new cluster.
      Specified by:
      addCluster in interface ODatabase<ORecord>
      Parameters:
      iClusterName - Cluster name
      iParameters - Additional parameters to pass to the factories
      Returns:
      Cluster id
    • addBlobCluster

      public int addBlobCluster(String iClusterName, Object... iParameters)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Add a cluster for blob records.
      Specified by:
      addBlobCluster in interface ODatabase<ORecord>
      Specified by:
      addBlobCluster in interface ODatabaseDocument
      Parameters:
      iClusterName - Cluster name
      iParameters - Additional parameters to pass to the factories
      Returns:
      Cluster id
    • getBlobClusterIds

      public Set<Integer> getBlobClusterIds()
      Deprecated.
      Description copied from interface: ODatabase
      Retrieve the set of defined blob cluster.
      Specified by:
      getBlobClusterIds in interface ODatabase<ORecord>
      Returns:
      the set of defined blob cluster ids.
    • addCluster

      public int addCluster(String iClusterName, int iRequestedId)
      Deprecated.
      Description copied from interface: ODatabase
      Adds a new cluster.
      Specified by:
      addCluster in interface ODatabase<ORecord>
      Parameters:
      iClusterName - Cluster name
      iRequestedId - requested id of the cluster
      Returns:
      Cluster id
    • dropCluster

      public boolean dropCluster(String iClusterName)
      Deprecated.
      Description copied from interface: ODatabase
      Drops a cluster by its name. Physical clusters will be completely deleted
      Specified by:
      dropCluster in interface ODatabase<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: ODatabase
      Drops a cluster by its id. Physical clusters will be completely deleted.
      Specified by:
      dropCluster in interface ODatabase<ORecord>
      Parameters:
      iClusterId - id of cluster to delete
      Returns:
      true if has been removed, otherwise false
    • setProperty

      public Object setProperty(String iName, Object iValue)
      Deprecated.
      Description copied from interface: ODatabase
      Sets a property value
      Specified by:
      setProperty in interface ODatabase<ORecord>
      Parameters:
      iName - Property name
      iValue - new value to set
      Returns:
      The previous value if any, otherwise null
    • getProperty

      public Object getProperty(String iName)
      Deprecated.
      Description copied from interface: ODatabase
      Gets the property value.
      Specified by:
      getProperty in interface ODatabase<ORecord>
      Parameters:
      iName - Property name
      Returns:
      The previous value if any, otherwise null
    • getProperties

      public Iterator<Map.Entry<String,Object>> getProperties()
      Deprecated.
      Description copied from interface: ODatabase
      Returns an iterator of the property entries
      Specified by:
      getProperties in interface ODatabase<ORecord>
    • get

      public Object get(ODatabase.ATTRIBUTES iAttribute)
      Deprecated.
      Description copied from interface: ODatabase
      Returns a database attribute value
      Specified by:
      get in interface ODatabase<ORecord>
      Parameters:
      iAttribute - Attributes between #ATTRIBUTES enum
      Returns:
      The attribute value
    • set

      public <DB extends ODatabase> DB set(ODatabase.ATTRIBUTES iAttribute, Object iValue)
      Deprecated.
      Description copied from interface: ODatabase
      Sets a database attribute value
      Specified by:
      set in interface ODatabase<ORecord>
      Parameters:
      iAttribute - Attributes between #ATTRIBUTES enum
      iValue - Value to set
      Returns:
      underlying
    • registerListener

      public void registerListener(ODatabaseListener iListener)
      Deprecated.
      Description copied from interface: ODatabase
      Registers a listener to the database events.
      Specified by:
      registerListener in interface ODatabase<ORecord>
      Parameters:
      iListener - the listener to register
    • unregisterListener

      public void unregisterListener(ODatabaseListener iListener)
      Deprecated.
      Description copied from interface: ODatabase
      Unregisters a listener to the database events.
      Specified by:
      unregisterListener in interface ODatabase<ORecord>
      Parameters:
      iListener - the listener to unregister
    • getRecordMetadata

      public ORecordMetadata getRecordMetadata(ORID rid)
      Deprecated.
      Specified by:
      getRecordMetadata in interface ODatabase<ORecord>
    • newInstance

      public ODocument newInstance(String iClassName)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Creates a new entity instance. Each database implementation will return the right type.
      Specified by:
      newInstance in interface ODatabaseDocument
      Returns:
      The new instance.
    • newBlob

      public OBlob newBlob(byte[] bytes)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Create a new instance of a blob containing the given bytes.
      Specified by:
      newBlob in interface ODatabaseDocument
      Parameters:
      bytes - content of the OBlob
      Returns:
      the OBlob instance.
    • newBlob

      public OBlob newBlob()
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Create a new empty instance of a blob.
      Specified by:
      newBlob in interface ODatabaseDocument
      Returns:
      the OBlob instance.
    • newLightweightEdge

      public OEdge newLightweightEdge(String iClassName, OVertex from, OVertex to)
      Deprecated.
      Specified by:
      newLightweightEdge in interface ODatabaseDocumentInternal
    • newRegularEdge

      public OEdge newRegularEdge(String iClassName, OVertex from, OVertex to)
      Deprecated.
      Specified by:
      newRegularEdge in interface ODatabaseDocumentInternal
    • countClass

      public long countClass(String iClassName)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Counts the entities contained in the specified class and sub classes (polymorphic).
      Specified by:
      countClass in interface ODatabaseDocument
      Parameters:
      iClassName - Class name
      Returns:
      Total entities
    • countClass

      public long countClass(String iClassName, boolean iPolymorphic)
      Deprecated.
      Description copied from interface: ODatabaseDocument
      Counts the entities contained in the specified class.
      Specified by:
      countClass in interface ODatabaseDocument
      Parameters:
      iClassName - Class name
      iPolymorphic - True if consider also the sub classes, otherwise false
      Returns:
      Total entities
    • countView

      public long countView(String viewName)
      Deprecated.
      Specified by:
      countView in interface ODatabaseDocument
    • backup

      public List<String> backup(OutputStream out, Map<String,Object> options, Callable<Object> callable, OCommandOutputListener iListener, int compressionLevel, int bufferSize) throws IOException
      Deprecated.
      Description copied from interface: OBackupable
      Executes a backup of the database. During the backup the database will be frozen in read-only mode.
      Specified by:
      backup in interface OBackupable
      Parameters:
      out - OutputStream used to write the backup content. Use a FileOutputStream to make the backup persistent on disk
      options - Backup options as Map<String, Object> object
      callable - Callback to execute when the database is locked
      iListener - Listener called for backup messages
      compressionLevel - 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 execute
      bufferSize - 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 IOException
      Deprecated.
      Description copied from interface: OBackupable
      Executes a restore of a database backup. During the restore the database will be frozen in read-only mode.
      Specified by:
      restore in interface OBackupable
      Parameters:
      in - InputStream used to read the backup content. Use a FileInputStream to read a backup on a disk
      options - Backup options as Map<String, Object> object
      callable - Callback to execute when the database is locked
      iListener - Listener called for backup messages
      Throws:
      IOException
      See Also:
    • setSerializer

      public void setSerializer(ORecordSerializer serializer)
      Deprecated.
      Specified by:
      setSerializer in interface ODatabaseDocumentInternal
    • query

      public OResultSet query(String query, Object... args)
      Deprecated.
      Description copied from interface: ODatabase
      Executes 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();

      Specified by:
      query in interface ODatabase<ORecord>
      Parameters:
      query - the query string
      args - query parameters (positional)
      Returns:
      the query result set
    • query

      Deprecated.
      Description copied from interface: ODatabase
      Executes an SQL query (idempotent). The result set has to be closed after usage

      Sample usage:

      Map<String, Object&gt params = new HashMapMap<&gt(); 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:
      query in interface ODatabase<ORecord>
      Parameters:
      query - the query string
      args - query parameters (named)
      Returns:
      Throws:
      OCommandSQLParsingException
      OCommandExecutionException
    • command

      Deprecated.
      Description copied from interface: ODatabase
      Executes 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:
      command in interface ODatabase<ORecord>
      args - query arguments
      Returns:
      Throws:
      OCommandSQLParsingException
      OCommandExecutionException
    • command

      Deprecated.
      Description copied from interface: ODatabase
      Executes a generic (idempotent or non idempotent) command. The result set has to be closed after usage

      Sample usage:

      Map<String, Object&gt params = new HashMapMap<&gt(); params.put("name", "John"); OResultSet rs = db.query("INSERT INTO Person SET name = :name", params); ... rs.close();

      Specified by:
      command in interface ODatabase<ORecord>
      Returns:
      Throws:
      OCommandSQLParsingException
      OCommandExecutionException
    • setCustom

      public <DB extends ODatabase> DB setCustom(String name, Object iValue)
      Deprecated.
      Specified by:
      setCustom in interface ODatabaseDocumentInternal
    • callOnDropListeners

      public void callOnDropListeners()
      Deprecated.
      Specified by:
      callOnDropListeners in interface ODatabaseDocumentInternal
    • isPrefetchRecords

      public boolean isPrefetchRecords()
      Deprecated.
      Specified by:
      isPrefetchRecords in interface ODatabaseDocumentInternal
    • setPrefetchRecords

      public void setPrefetchRecords(boolean prefetchRecords)
      Deprecated.
      Specified by:
      setPrefetchRecords in interface ODatabaseDocumentInternal
    • checkForClusterPermissions

      public void checkForClusterPermissions(String name)
      Deprecated.
      Specified by:
      checkForClusterPermissions in interface ODatabaseDocumentInternal
    • execute

      public OResultSet execute(String language, String script, Object... args) throws OCommandExecutionException, OCommandScriptException
      Deprecated.
      Description copied from interface: ODatabase
      Execute 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:
      execute in interface ODatabase<ORecord>
      Returns:
      Throws:
      OCommandExecutionException
      OCommandScriptException
    • execute

      public OResultSet execute(String language, String script, Map<String,?> args) throws OCommandExecutionException, OCommandScriptException
      Deprecated.
      Description copied from interface: ODatabase
      Execute a script of a specified query language The result set has to be closed after usage

      Sample usage:

      Map<String, Object&gt params = new HashMapMap<&gt(); 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:
      execute in interface ODatabase<ORecord>
      Returns:
      Throws:
      OCommandExecutionException
      OCommandScriptException
    • live

      public OLiveQueryMonitor live(String query, OLiveQueryResultListener listener, Object... args)
      Deprecated.
      Description copied from interface: ODatabase
      Subscribe a query as a live query for future create/update event with the referred conditions
      Specified by:
      live in interface ODatabase<ORecord>
      Parameters:
      query - live query
      listener - the listener that receive the query results
      args - the live query args
    • live

      public OLiveQueryMonitor live(String query, OLiveQueryResultListener listener, Map<String,?> args)
      Deprecated.
      Description copied from interface: ODatabase
      Subscribe a query as a live query for future create/update event with the referred conditions
      Specified by:
      live in interface ODatabase<ORecord>
      Parameters:
      query - live query
      listener - the listener that receive the query results
      args - the live query args
    • recycle

      public void recycle(ORecord record)
      Deprecated.
      Specified by:
      recycle in interface ODatabaseDocumentInternal
    • internalCommit

      public void internalCommit(OTransactionInternal transaction)
      Deprecated.
      Description copied from interface: ODatabaseDocumentInternal
      Executed the commit on the storage hiding away storage concepts from the transaction
      Specified by:
      internalCommit in interface ODatabaseDocumentInternal
    • isClusterVertex

      public boolean isClusterVertex(int cluster)
      Deprecated.
      Specified by:
      isClusterVertex in interface ODatabaseDocumentInternal
    • isClusterEdge

      public boolean isClusterEdge(int cluster)
      Deprecated.
      Specified by:
      isClusterEdge in interface ODatabaseDocumentInternal
    • isClusterView

      public boolean isClusterView(int cluster)
      Deprecated.
      Specified by:
      isClusterView in interface ODatabaseDocumentInternal
    • beforeCreateOperations

      public OIdentifiable beforeCreateOperations(OIdentifiable id, String iClusterName)
      Deprecated.
      Specified by:
      beforeCreateOperations in interface ODatabaseDocumentInternal
      Returns:
      null if nothing changed the instance if has been modified or replaced
    • beforeUpdateOperations

      public OIdentifiable beforeUpdateOperations(OIdentifiable id, String iClusterName)
      Deprecated.
      Specified by:
      beforeUpdateOperations in interface ODatabaseDocumentInternal
      Returns:
      null if nothing changed the instance if has been modified or replaced
    • beforeDeleteOperations

      public void beforeDeleteOperations(OIdentifiable id, String iClusterName)
      Deprecated.
      Specified by:
      beforeDeleteOperations in interface ODatabaseDocumentInternal
    • afterCreateOperations

      public void afterCreateOperations(OIdentifiable id)
      Deprecated.
      Specified by:
      afterCreateOperations in interface ODatabaseDocumentInternal
    • afterDeleteOperations

      public void afterDeleteOperations(OIdentifiable id)
      Deprecated.
      Specified by:
      afterDeleteOperations in interface ODatabaseDocumentInternal
    • afterUpdateOperations

      public void afterUpdateOperations(OIdentifiable id)
      Deprecated.
      Specified by:
      afterUpdateOperations in interface ODatabaseDocumentInternal
    • afterReadOperations

      public void afterReadOperations(OIdentifiable identifiable)
      Deprecated.
      Specified by:
      afterReadOperations in interface ODatabaseDocumentInternal
    • beforeReadOperations

      public boolean beforeReadOperations(OIdentifiable identifiable)
      Deprecated.
      Specified by:
      beforeReadOperations in interface ODatabaseDocumentInternal
      Returns:
      true if the record should be skipped
    • internalClose

      public void internalClose(boolean recycle)
      Deprecated.
      Specified by:
      internalClose in interface ODatabaseDocumentInternal
    • saveAll

      public ORecord saveAll(ORecord iRecord, String iClusterName, ODatabase.OPERATION_MODE iMode, boolean iForceCreate, ORecordCallback<? extends Number> iRecordCreatedCallback, ORecordCallback<Integer> iRecordUpdatedCallback)
      Deprecated.
      Specified by:
      saveAll in interface ODatabaseDocumentInternal
    • getClusterName

      public String getClusterName(ORecord record)
      Deprecated.
      Specified by:
      getClusterName in interface ODatabaseDocumentInternal
    • getViewFromCluster

      public OView getViewFromCluster(int cluster)
      Deprecated.
      Specified by:
      getViewFromCluster in interface ODatabaseDocumentInternal
    • internalLockRecord

      public void internalLockRecord(OIdentifiable iRecord, OStorage.LOCKING_STRATEGY lockingStrategy)
      Deprecated.
      Specified by:
      internalLockRecord in interface ODatabaseDocumentInternal
    • internalUnlockRecord

      public void internalUnlockRecord(OIdentifiable iRecord)
      Deprecated.
      Specified by:
      internalUnlockRecord in interface ODatabaseDocumentInternal
    • lock

      public <RET extends ORecord> RET lock(ORID recordId) throws OLockException
      Deprecated.
      Description copied from interface: ODatabase
      Pessimistic 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:
      lock in interface ODatabase<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: ODatabase
      Pessimistic lock a record.
      Specified by:
      lock in interface ODatabase<ORecord>
      Parameters:
      recordId - the id of the record that need to be locked
      timeout - for the record locking
      timeoutUnit - relative for the timeout
      Returns:
      the record updated to the last state after the lock.
      Throws:
      OLockException - In case of deadlock detected
    • unlock

      public void unlock(ORID recordId) throws OLockException
      Deprecated.
      Description copied from interface: ODatabase
      Pessimistic unlock
      Specified by:
      unlock in interface ODatabase<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:
      sendSequenceAction in interface ODatabaseDocumentInternal
      Throws:
      ExecutionException
      InterruptedException
    • getCollectionsChanges

      public Map<UUID,OBonsaiCollectionPointer> getCollectionsChanges()
      Deprecated.
      Specified by:
      getCollectionsChanges in interface ODatabaseDocumentInternal
    • isRemote

      public boolean isRemote()
      Deprecated.
      Specified by:
      isRemote in interface ODatabaseDocumentInternal
    • getStorageInfo

      public OStorageInfo getStorageInfo()
      Deprecated.
      Specified by:
      getStorageInfo in interface ODatabaseInternal<ORecord>
    • dropClusterInternal

      public boolean dropClusterInternal(int clusterId)
      Deprecated.
      Specified by:
      dropClusterInternal in interface ODatabaseDocumentInternal
    • getClusterDataRange

      public long[] getClusterDataRange(int currentClusterId)
      Deprecated.
      Specified by:
      getClusterDataRange in interface ODatabaseDocumentInternal
    • getLastClusterPosition

      public long getLastClusterPosition(int clusterId)
      Deprecated.
      Specified by:
      getLastClusterPosition in interface ODatabaseDocumentInternal
    • setDefaultClusterId

      public void setDefaultClusterId(int addCluster)
      Deprecated.
      Specified by:
      setDefaultClusterId in interface ODatabaseDocumentInternal
    • getClusterRecordConflictStrategy

      public String getClusterRecordConflictStrategy(int clusterId)
      Deprecated.
      Specified by:
      getClusterRecordConflictStrategy in interface ODatabaseDocumentInternal
    • getClustersIds

      public int[] getClustersIds(Set<String> filterClusters)
      Deprecated.
      Specified by:
      getClustersIds in interface ODatabaseDocumentInternal
    • truncateClass

      public void truncateClass(String name)
      Deprecated.
      Specified by:
      truncateClass in interface ODatabaseDocumentInternal
    • truncateClusterInternal

      public long truncateClusterInternal(String name)
      Deprecated.
      Specified by:
      truncateClusterInternal in interface ODatabaseDocumentInternal
    • truncateClass

      public long truncateClass(String name, boolean polimorfic)
      Deprecated.
      Specified by:
      truncateClass in interface ODatabaseDocumentInternal
    • commitPreallocate

      public void commitPreallocate()
      Deprecated.
      Specified by:
      commitPreallocate in interface ODatabaseDocumentInternal
    • internalCommitPreallocate

      public void internalCommitPreallocate(OTransactionOptimistic oTransactionOptimistic)
      Deprecated.
      Specified by:
      internalCommitPreallocate in interface ODatabaseDocumentInternal