
public interface ODatabaseDocument extends ODatabase<ORecord>
ODatabase.ATTRIBUTES, ODatabase.OPERATION_MODE, ODatabase.STATUS| Modifier and Type | Method and Description |
|---|---|
int |
addBlobCluster(String iClusterName,
Object... iParameters)
Add a cluster for blob records.
|
ORecordIteratorClass<ODocument> |
browseClass(String iClassName)
Browses all the records of the specified class and also all the subclasses.
|
ORecordIteratorClass<ODocument> |
browseClass(String iClassName,
boolean iPolymorphic)
Browses all the records of the specified class and if iPolymorphic is true also all the subclasses.
|
<REC extends ORecord> |
browseCluster(String iClusterName)
Browses all the records of the specified cluster.
|
<REC extends ORecord> |
browseCluster(String iClusterName,
Class<REC> iRecordClass)
Deprecated.
|
<REC extends ORecord> |
browseCluster(String iClusterName,
Class<REC> iRecordClass,
long startClusterPosition,
long endClusterPosition)
Deprecated.
|
<REC extends ORecord> |
browseCluster(String iClusterName,
Class<REC> iRecordClass,
long startClusterPosition,
long endClusterPosition,
boolean loadTombstones)
Deprecated.
|
<REC extends ORecord> |
browseCluster(String iClusterName,
long startClusterPosition,
long endClusterPosition,
boolean loadTombstones) |
<DB extends ODatabaseDocument> |
checkSecurity(ORule.ResourceGeneric iResourceGeneric,
int iOperation,
Object... iResourcesSpecific)
Checks if the operation against multiple resources is allowed for the current user.
|
<DB extends ODatabaseDocument> |
checkSecurity(ORule.ResourceGeneric iResourceGeneric,
int iOperation,
Object iResourceSpecific)
Checks if the operation on a resource is allowed for the current user.
|
<DB extends ODatabaseDocument> |
checkSecurity(ORule.ResourceGeneric resourceGeneric,
String resourceSpecific,
int iOperation)
Checks if the operation on a resource is allowed for the current user.
|
<DB extends ODatabaseDocument> |
checkSecurity(String iResource,
int iOperation)
Deprecated.
|
<DB extends ODatabaseDocument> |
checkSecurity(String iResourceGeneric,
int iOperation,
Object... iResourcesSpecific)
Deprecated.
|
<DB extends ODatabaseDocument> |
checkSecurity(String iResourceGeneric,
int iOperation,
Object iResourceSpecific)
Deprecated.
|
long |
countClass(String iClassName)
Counts the entities contained in the specified class and sub classes (polymorphic).
|
long |
countClass(String iClassName,
boolean iPolymorphic)
Counts the entities contained in the specified class.
|
default OClass |
createClassIfNotExist(String className,
String... superclasses)
If a class with given name already exists, it's just returned, otherwise the method creates a new class and returns it.
|
default OClass |
createEdgeClass(String className)
creates a new edge class (a class that extends E)
|
default OClass |
createVertexClass(String className)
creates a new vertex class (a class that extends V)
|
void |
freeze()
Flush all indexes and cached storage content to the disk.
|
void |
freeze(boolean throwException)
Flush all indexes and cached storage content to the disk.
|
<RET extends ORecord> |
getRecord(OIdentifiable iIdentifiable)
Returns the record for a OIdentifiable instance.
|
byte |
getRecordType()
Returns the default record type for this kind of database.
|
boolean |
isPooled() |
boolean |
isRetainRecords()
Returns true if current configuration retains objects, otherwise false
|
boolean |
isValidationEnabled()
Tells if validation of record is active.
|
OBlob |
newBlob()
Create a new empty instance of a blob.
|
OBlob |
newBlob(byte[] bytes)
Create a new instance of a blob containing the given bytes.
|
default OEdge |
newEdge(OVertex from,
OVertex to)
Creates a new Edge of type E
|
OEdge |
newEdge(OVertex from,
OVertex to,
OClass type)
Creates a new Edge
|
OEdge |
newEdge(OVertex from,
OVertex to,
String type)
Creates a new Edge
|
OElement |
newElement() |
OElement |
newElement(String className) |
<RET> RET |
newInstance(String iClassName)
Creates a new entity instance.
|
default OVertex |
newVertex()
Creates a new Vertex of type V
|
OVertex |
newVertex(OClass type)
Creates a new Vertex
|
OVertex |
newVertex(String type)
Creates a new Vertex
|
void |
release()
Allows to execute write-related commands on DB.
|
ODatabaseDocument |
setRetainRecords(boolean iValue)
Specifies if retain handled objects in memory or not.
|
<DB extends ODatabaseDocument> |
setValidationEnabled(boolean iEnabled)
Enables or disables the record validation.
|
activateOnCurrentThread, addCluster, addCluster, begin, begin, begin, close, command, command, command, commit, commit, countClusterElements, countClusterElements, countClusterElements, countClusterElements, countClusterElements, create, create, create, createClass, declareIntent, delete, delete, delete, drop, dropCluster, dropCluster, execute, execute, executeWithRetry, exists, existsCluster, get, getActiveIntent, getBlobClusterIds, getClass, getClusterIdByName, getClusterNameById, getClusterNames, getClusterRecordSizeById, getClusterRecordSizeByName, getClusters, getConfiguration, getConflictStrategy, getDefaultClusterId, getDictionary, getHooks, getListeners, getLocalCache, getMetadata, getName, getProperties, getProperty, getRecordMetadata, getSize, getStatus, getTransaction, getType, getURL, getUser, incrementalBackup, isActiveOnCurrentThread, isClosed, isMVCC, live, live, load, load, load, load, load, load, load, load, load, load, newInstance, open, query, query, query, registerHook, registerHook, registerListener, reload, reload, reload, rollback, rollback, save, save, save, save, set, setConflictStrategy, setConflictStrategy, setMVCC, setProperty, setStatus, truncateCluster, unregisterHook, unregisterListenerbackup, restorestatic final String TYPE
ORecordIteratorClass<ODocument> browseClass(String iClassName)
iClassName - Class name to iterateORecordIteratorClass<ODocument> browseClass(String iClassName, boolean iPolymorphic)
iClassName - Class name to iterateiPolymorphic - Consider also the instances of the subclasses or not<RET> RET newInstance(String iClassName)
OBlob newBlob(byte[] bytes)
bytes - content of the OBlobOBlob newBlob()
long countClass(String iClassName)
iClassName - Class namelong countClass(String iClassName, boolean iPolymorphic)
iClassName - Class nameiPolymorphic - True if consider also the sub classes, otherwise falsevoid freeze()
After this call users can perform only select queries. All write-related commands will queued till release() command
will be called.
Given command waits till all on going modifications in indexes or DB will be finished.
IMPORTANT: This command is not reentrant.
freeze in interface ODatabase<ORecord>ODatabase.release()void release()
freeze() command.release in interface ODatabase<ORecord>ODatabase.freeze()void freeze(boolean throwException)
After this call users can perform only select queries. All write-related commands will queued till release() command
will be called or exception will be thrown on attempt to modify DB data. Concrete behaviour depends on
throwException parameter.
IMPORTANT: This command is not reentrant.
freeze in interface ODatabase<ORecord>throwException - If true OModificationOperationProhibitedException
exception will be thrown in case of write command will be performed.<REC extends ORecord> ORecordIteratorCluster<REC> browseCluster(String iClusterName)
iClusterName - Cluster name to iterate<REC extends ORecord> ORecordIteratorCluster<REC> browseCluster(String iClusterName, long startClusterPosition, long endClusterPosition, boolean loadTombstones)
@Deprecated <REC extends ORecord> ORecordIteratorCluster<REC> browseCluster(String iClusterName, Class<REC> iRecordClass)
iClusterName - Cluster name to iterateiRecordClass - The record class expected@Deprecated <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)
<RET extends ORecord> RET getRecord(OIdentifiable iIdentifiable)
iIdentifiable - byte getRecordType()
boolean isRetainRecords()
setRetainRecords(boolean)ODatabaseDocument setRetainRecords(boolean iValue)
iValue - True to enable, false to disable it.isRetainRecords()<DB extends ODatabaseDocument> DB checkSecurity(ORule.ResourceGeneric resourceGeneric, String resourceSpecific, int iOperation)
resourceGeneric - Generic Resource where to execute the operationresourceGeneric - Specific resource name where to execute the operationiOperation - Operation to execute against the resource<DB extends ODatabaseDocument> DB checkSecurity(ORule.ResourceGeneric iResourceGeneric, int iOperation, Object iResourceSpecific)
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.<DB extends ODatabaseDocument> DB checkSecurity(ORule.ResourceGeneric iResourceGeneric, int iOperation, Object... iResourcesSpecific)
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.boolean isValidationEnabled()
<DB extends ODatabaseDocument> DB setValidationEnabled(boolean iEnabled)
Since 2.2 this setting is persistent.
iEnabled - True to enable, false to disable@Deprecated <DB extends ODatabaseDocument> DB checkSecurity(String iResource, int iOperation)
iResource - Resource where to execute the operationiOperation - Operation to execute against the resource@Deprecated <DB extends ODatabaseDocument> DB checkSecurity(String iResourceGeneric, int iOperation, Object iResourceSpecific)
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.@Deprecated <DB extends ODatabaseDocument> DB checkSecurity(String iResourceGeneric, int iOperation, Object... iResourcesSpecific)
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.boolean isPooled()
true if database is obtained from the pool and false otherwise.int addBlobCluster(String iClusterName, Object... iParameters)
addBlobCluster in interface ODatabase<ORecord>iClusterName - Cluster nameiParameters - Additional parameters to pass to the factoriesOElement newElement()
default OEdge newEdge(OVertex from, OVertex to)
from - the starting point vertexto - the endpoint vertexOEdge newEdge(OVertex from, OVertex to, OClass type)
from - the starting point vertexto - the endpoint vertextype - the edge typeOEdge newEdge(OVertex from, OVertex to, String type)
from - the starting point vertexto - the endpoint vertextype - the edge typedefault OVertex newVertex()
OVertex newVertex(OClass type)
type - the vertex typeOVertex newVertex(String type)
type - the vertex type (class name)default OClass createVertexClass(String className) throws OSchemaException
className - the class nameOSchemaException - if the class already exists or if V class is not defined (Eg. if it was deleted from the schema)default OClass createEdgeClass(String className)
className - the class nameOSchemaException - if the class already exists or if E class is not defined (Eg. if it was deleted from the schema)default OClass createClassIfNotExist(String className, String... superclasses) throws OSchemaException
className - the class namesuperclasses - a list of superclasses for the class (can be empty)OSchemaException - if one of the superclasses does not exist in the schemaCopyright © 2009–2025 OrientDB. All rights reserved.