
public abstract class OrientBaseGraph extends OrientConfigurableGraph implements OrientExtendedGraph, OStorageRecoverListener
OrientConfigurableGraph.Settings, OrientConfigurableGraph.THREAD_MODE| Modifier and Type | Field and Description |
|---|---|
static String |
ADMIN |
static String |
CLASS_PREFIX |
static String |
CLUSTER_PREFIX |
static String |
CONNECTION_IN |
static String |
CONNECTION_OUT |
protected ODatabaseDocumentTx |
database |
AUTO_SCALE_EDGE_TYPE_DEFAULT, AUTO_START_TX_DEFAULT, EDGE_CONTAINER_EMBEDDED_2_TREE_THRESHOLD_DEFAULT, EDGE_CONTAINER_TREE_2_EMBEDDED_THRESHOLD_DEFAULT, KEEP_IN_MEMORY_REFERENCES_DEFAULT, REQUIRE_TRANSACTION_DEFAULT, SAVE_ORIGINAL_IDS_DEFAULT, settings, STANDARD_ELEMENT_CONSTRAINTS_DEFAULT, STANDARD_EXCEPTIONS, STANDARD_MAX_RETRIES, STANDARD_TX_REQUIRE_FOR_SQL_OPERATIONS, THREAD_MODE_DEFAULT, USE_CLASS_FOR_EDGE_LABEL_DEFAULT, USE_CLASS_FOR_VERTEX_LABEL_DEFAULT, USE_LIGHTWEIGHT_EDGES_DEFAULT, USE_LOG_DEFAULT, USE_VERTEX_FIELDS_FOR_EDGE_LABELS, WARN_ON_FORCE_CLOSING_TX_DEFAULT| Constructor and Description |
|---|
OrientBaseGraph(org.apache.commons.configuration.Configuration configuration)
Builds a OrientGraph instance passing a configuration.
|
OrientBaseGraph(ODatabaseDocumentTx iDatabase,
String iUserName,
String iUserPassword,
OrientConfigurableGraph.Settings iConfiguration)
Constructs a new object using an existent database instance.
|
OrientBaseGraph(OPartitionedDatabasePool pool) |
OrientBaseGraph(OPartitionedDatabasePool pool,
OrientConfigurableGraph.Settings iConfiguration) |
OrientBaseGraph(String url) |
OrientBaseGraph(String url,
String username,
String password) |
| Modifier and Type | Method and Description |
|---|---|
OrientEdge |
addEdge(Object id,
com.tinkerpop.blueprints.Vertex outVertex,
com.tinkerpop.blueprints.Vertex inVertex,
String label)
Creates an edge between a source Vertex and a destination Vertex setting label as Edge's label.
|
OrientVertex |
addTemporaryVertex(String iClassName,
Object... prop)
(Blueprints Extension) Creates a temporary vertex setting the initial field values.
|
OrientVertex |
addVertex(Object id)
Creates a new unconnected vertex with no fields in the Graph.
|
OrientVertex |
addVertex(Object id,
Object... prop)
(Blueprints Extension) Creates a new unconnected vertex in the Graph setting the initial field values.
|
OrientVertex |
addVertex(String iClassName,
String iClusterName)
(Blueprints Extension) Creates a new unconnected vertex with no fields of specific class in a cluster in the Graph.
|
OrientElement |
attach(OrientElement iElement)
Attaches a previously detached Graph Element to the current Graph.
|
protected void |
autoStartTransaction() |
void |
begin()
begins current transaction (if the graph is transactional)
|
static void |
clearInitStack()
Internal use only.
|
OCommandRequest |
command(OCommandRequest iCommand)
Executes commands against the graph.
|
void |
commit()
Commits the current active transaction.
|
OrientBaseGraph |
configure(OrientConfigurableGraph.Settings iSetting)
(Blueprints Extension) Configure the Graph instance.
|
protected Object |
convertKey(OIndex<?> idx,
Object iValue) |
protected Object[] |
convertKeys(OIndex<?> idx,
Object[] iValue) |
long |
countEdges()
Counts the edges in graph.
|
long |
countEdges(String iClassName)
Counts the edges in graph of a particular class.
|
long |
countVertices()
Counts the vertices in graph.
|
long |
countVertices(String iClassName)
Counts the vertices in graph of a particular class.
|
OrientEdgeType |
createEdgeType(String iClassName)
Creates a new Edge persistent class.
|
OrientEdgeType |
createEdgeType(String iClassName,
int clusters)
Creates a new Edge persistent class.
|
OrientEdgeType |
createEdgeType(String iClassName,
OClass iSuperClass)
Creates a new Edge persistent class specifying the super class.
|
OrientEdgeType |
createEdgeType(String iClassName,
OClass iSuperClass,
int clusters)
Creates a new Edge persistent class specifying the super class.
|
OrientEdgeType |
createEdgeType(String iClassName,
String iSuperClassName)
Creates a new Edge persistent class specifying the super class.
|
OrientEdgeType |
createEdgeType(String iClassName,
String iSuperClassName,
int clusters)
Creates a new Edge persistent class specifying the super class.
|
<T extends com.tinkerpop.blueprints.Element> |
createIndex(String indexName,
Class<T> indexClass,
com.tinkerpop.blueprints.Parameter... indexParameters) |
<T extends com.tinkerpop.blueprints.Element> |
createKeyIndex(String key,
Class<T> elementClass,
com.tinkerpop.blueprints.Parameter... indexParameters)
Creates an automatic indexing structure for indexing provided key for element class.
|
OrientVertexType |
createVertexType(String iClassName)
Creates a new Vertex persistent class.
|
OrientVertexType |
createVertexType(String iClassName,
int clusters)
Creates a new Vertex persistent class.
|
OrientVertexType |
createVertexType(String iClassName,
OClass iSuperClass)
Creates a new Vertex persistent class specifying the super class.
|
OrientVertexType |
createVertexType(String iClassName,
OClass iSuperClass,
int clusters)
Creates a new Vertex persistent class specifying the super class.
|
OrientVertexType |
createVertexType(String iClassName,
String iSuperClassName)
Creates a new Vertex persistent class specifying the super class.
|
OrientVertexType |
createVertexType(String iClassName,
String iSuperClassName,
int clusters)
Creates a new Vertex persistent class specifying the super class.
|
void |
declareIntent(OIntent iIntent)
Declare an intent.
|
static String |
decodeClassName(String iClassName)
(Internal)
|
protected static void |
deleteEdgeIfAny(OIdentifiable iRecord,
boolean forceReload)
(Internal only)
|
OrientElement |
detach(OrientElement iElement)
Detaches a Graph Element to be used offline.
|
void |
drop()
(Blueprints Extension) Drops the database
|
void |
dropEdgeType(String iTypeName)
Drops an edge class.
|
void |
dropIndex(String indexName)
Drops an index by name.
|
<T extends com.tinkerpop.blueprints.Element> |
dropKeyIndex(String key,
Class<T> elementClass)
Drops the index against a field name.
|
void |
dropVertexType(String iTypeName)
Drop a vertex class.
|
static String |
encodeClassName(String iClassName)
(Internal)
|
static void |
encodeClassNames(String... iLabels)
(Internal)
|
<RET> RET |
executeOutsideTx(OCallable<RET,OrientBaseGraph> iCallable,
String... iOperationStrings) |
static OrientBaseGraph |
getActiveGraph() |
protected <T> String |
getClassName(Class<T> elementClass) |
ORecordConflictStrategy |
getConflictStrategy() |
protected ODatabaseDocumentTx |
getDatabase() |
protected static ODocument |
getDocument(OIdentifiable id,
boolean forceReload) |
OrientEdge |
getEdge(Object id)
Returns a edge by an ID.
|
OrientEdgeType |
getEdgeBaseType()
Returns the E persistent class as OrientEdgeType instance.
|
static void |
getEdgeClassNames(OrientBaseGraph graph,
String... iLabels)
(Internal) Returns the case sensitive edge class names.
|
protected OrientEdge |
getEdgeInstance(OIdentifiable id) |
protected OrientEdge |
getEdgeInstance(OIdentifiable from,
OIdentifiable to,
String label) |
protected OrientEdge |
getEdgeInstance(String className,
Object... fields) |
Iterable<com.tinkerpop.blueprints.Edge> |
getEdges()
Returns all the edges in Graph.
|
Iterable<com.tinkerpop.blueprints.Edge> |
getEdges(boolean iPolymorphic)
Get all the Edges in Graph specifying if consider or not sub-classes of E.
|
Iterable<com.tinkerpop.blueprints.Edge> |
getEdges(String iKey,
Object iValue)
Get all the Edges in Graph filtering by field name and value.
|
Iterable<com.tinkerpop.blueprints.Edge> |
getEdgesOfClass(String iClassName)
Get all the Edges in Graph of a specific edge class and all sub-classes.
|
Iterable<com.tinkerpop.blueprints.Edge> |
getEdgesOfClass(String iClassName,
boolean iPolymorphic)
Get all the Edges in Graph of a specific edges class and all sub-classes only if iPolymorphic is true.
|
OrientEdgeType |
getEdgeType(String iTypeName)
Returns the persistent class for type iTypeName as OrientEdgeType instance.
|
OrientElement |
getElement(Object id)
Returns a graph element, vertex or edge, starting from an ID.
|
<T extends com.tinkerpop.blueprints.Element> |
getIndex(String indexName,
Class<T> indexClass)
Returns an index by name and class
|
<T extends com.tinkerpop.blueprints.Element> |
getIndexedKeys(Class<T> elementClass)
Returns the indexed properties.
|
<T extends com.tinkerpop.blueprints.Element> |
getIndexedKeys(Class<T> elementClass,
boolean includeClassNames)
Returns the indexed properties.
|
Iterable<com.tinkerpop.blueprints.Index<? extends com.tinkerpop.blueprints.Element>> |
getIndices()
Returns all the indices.
|
OIntent |
getIntent() |
Map<String,Object> |
getProperties() |
protected Object |
getProperty(String iName) |
ODatabaseDocumentTx |
getRawGraph()
Returns the underlying Database instance as ODatabaseDocumentTx instance.
|
OrientVertex |
getVertex(Object id)
Returns a vertex by an ID.
|
OrientVertexType |
getVertexBaseType()
Returns the V persistent class as OrientVertexType instance.
|
com.tinkerpop.blueprints.Vertex |
getVertexByKey(String iKey,
Object iValue)
Deprecated.
|
protected OrientVertex |
getVertexInstance(OIdentifiable id) |
protected OrientVertex |
getVertexInstance(String className,
Object... fields) |
OrientVertexType |
getVertexType(String iTypeName)
Returns the persistent class for type iTypeName as OrientVertexType instance.
|
Iterable<com.tinkerpop.blueprints.Vertex> |
getVertices()
Get all the Vertices in Graph.
|
Iterable<com.tinkerpop.blueprints.Vertex> |
getVertices(boolean iPolymorphic)
Get all the Vertices in Graph specifying if consider or not sub-classes of V.
|
Iterable<com.tinkerpop.blueprints.Vertex> |
getVertices(String iKey,
Object iValue)
Get all the Vertices in Graph filtering by field name and value.
|
Iterable<com.tinkerpop.blueprints.Vertex> |
getVertices(String label,
String[] iKey,
Object[] iValue)
Get all the Vertices in Graph filtering by field name and value.
|
Iterable<com.tinkerpop.blueprints.Vertex> |
getVerticesOfClass(String iClassName)
Get all the Vertices in Graph of a specific vertex class and all sub-classes.
|
Iterable<com.tinkerpop.blueprints.Vertex> |
getVerticesOfClass(String iClassName,
boolean iPolymorphic)
Get all the Vertices in Graph of a specific vertex class and all sub-classes only if iPolymorphic is true.
|
boolean |
isClosed()
Checks if the Graph has been closed.
|
void |
makeActive() |
void |
onStorageRecover() |
com.tinkerpop.blueprints.GraphQuery |
query()
Returns a GraphQuery object to execute queries against the Graph.
|
void |
removeEdge(com.tinkerpop.blueprints.Edge edge)
Removes an edge from the Graph.
|
protected static void |
removeEdges(OrientBaseGraph graph,
ODocument iVertex,
String iFieldName,
OIdentifiable iVertexToRemove,
boolean iAlsoInverse,
boolean useVertexFieldsForEdgeLabels,
boolean autoScaleEdgeType,
boolean forceReload)
(Internal only)
|
void |
removeVertex(com.tinkerpop.blueprints.Vertex vertex)
Removes a vertex from the Graph.
|
OrientBaseGraph |
reuse(ODatabaseDocumentTx iDatabase)
Reuses the underlying database avoiding to create and open it every time.
|
void |
rollback()
Rollbacks the current active transaction.
|
protected void |
saveIndexConfiguration() |
OrientBaseGraph |
setConflictStrategy(ORecordConflictStrategy iResolver) |
OrientBaseGraph |
setConflictStrategy(String iStrategyName) |
protected void |
setCurrentGraphInThreadLocal() |
protected Object |
setProperty(String iName,
Object iValue) |
void |
shutdown()
Closes the Graph.
|
void |
shutdown(boolean closeDb)
Closes the Graph.
|
void |
shutdown(boolean closeDb,
boolean commitTx)
Closes the Graph.
|
String |
toString()
Returns the Graph URL.
|
OTraverse |
traverse()
Returns a OTraverse object to start traversing the graph.
|
getConnectionStrategy, getEdgeContainerEmbedded2TreeThreshold, getEdgeContainerTree2EmbeddedThreshold, getMaxRetries, getThreadMode, init, isAutoScaleEdgeType, isAutoStartTx, isKeepInMemoryReferences, isRequireTransaction, isSaveOriginalIds, isStandardElementConstraints, isStandardExceptions, isTxRequiredForSQLGraphOperations, isUseClassForEdgeLabel, isUseClassForVertexLabel, isUseLightweightEdges, isUseVertexFieldsForEdgeLabels, isWarnOnForceClosingTx, setAutoScaleEdgeType, setAutoStartTx, setConnectionStrategy, setEdgeContainerEmbedded2TreeThreshold, setEdgeContainerTree2EmbeddedThreshold, setKeepInMemoryReferences, setMaxRetries, setRequireTransaction, setSaveOriginalIds, setStandardElementConstraints, setStandardExceptions, setThreadMode, setTxRequiredForSQLGraphOperations, setUseClassForEdgeLabel, setUseClassForVertexLabel, setUseLightweightEdges, setUseLog, setUseVertexFieldsForEdgeLabels, setWarnOnForceClosingTxpublic static final String CONNECTION_OUT
public static final String CONNECTION_IN
public static final String CLASS_PREFIX
public static final String CLUSTER_PREFIX
public static final String ADMIN
protected ODatabaseDocumentTx database
public OrientBaseGraph(ODatabaseDocumentTx iDatabase, String iUserName, String iUserPassword, OrientConfigurableGraph.Settings iConfiguration)
iDatabase - Underlying database object to attachpublic OrientBaseGraph(OPartitionedDatabasePool pool)
public OrientBaseGraph(OPartitionedDatabasePool pool, OrientConfigurableGraph.Settings iConfiguration)
public OrientBaseGraph(String url)
public OrientBaseGraph(org.apache.commons.configuration.Configuration configuration)
| Name | Description | Default value |
| blueprints.orientdb.url | Database URL | - |
| blueprints.orientdb.username | User name | admin |
| blueprints.orientdb.password | User password | admin |
| blueprints.orientdb.saveOriginalIds | Saves the original element IDs by using the property origId. This could be useful on import of graph to preserve original ids | false |
| blueprints.orientdb.keepInMemoryReferences | Avoid to keep records in memory but only RIDs | false |
| blueprints.orientdb.useCustomClassesForEdges | Use Edge's label as OrientDB class. If doesn't exist create it under the hood | true |
| blueprints.orientdb.useCustomClassesForVertex | Use Vertex's label as OrientDB class. If doesn't exist create it under the hood | true |
| blueprints.orientdb.useVertexFieldsForEdgeLabels | Store the edge relationships in vertex by using the Edge's class. This allow to use multiple fields and make faster traversal by edge's label (class) | true |
| blueprints.orientdb.lightweightEdges | Uses lightweight edges. This avoid to create a physical document per edge. Documents are created only when they have properties | true |
| blueprints.orientdb.autoScaleEdgeType | Set auto scale of edge type. True means one edge is managed as LINK, 2 or more are managed with a LINKBAG | false |
| blueprints.orientdb.edgeContainerEmbedded2TreeThreshold | Changes the minimum number of edges for edge containers to transform the underlying structure from embedded to tree. Use -1 to disable transformation | -1 |
| blueprints.orientdb.edgeContainerTree2EmbeddedThreshold | Changes the minimum number of edges for edge containers to transform the underlying structure from tree to embedded. Use -1 to disable transformation | -1 |
configuration - of graphpublic static OrientBaseGraph getActiveGraph()
public static void clearInitStack()
public void onStorageRecover()
onStorageRecover in interface OStorageRecoverListenerpublic static void encodeClassNames(String... iLabels)
public static void getEdgeClassNames(OrientBaseGraph graph, String... iLabels)
public void makeActive()
public OrientBaseGraph configure(OrientConfigurableGraph.Settings iSetting)
iSetting - Settings object containing all the settingspublic void drop()
drop in interface OrientExtendedGraphpublic <T extends com.tinkerpop.blueprints.Element> com.tinkerpop.blueprints.Index<T> createIndex(String indexName, Class<T> indexClass, com.tinkerpop.blueprints.Parameter... indexParameters)
createIndex in interface com.tinkerpop.blueprints.IndexableGraphpublic <T extends com.tinkerpop.blueprints.Element> com.tinkerpop.blueprints.Index<T> getIndex(String indexName, Class<T> indexClass)
getIndex in interface com.tinkerpop.blueprints.IndexableGraphindexName - Index nameindexClass - Class as one or subclass of Vertex.class and Edge.classpublic Iterable<com.tinkerpop.blueprints.Index<? extends com.tinkerpop.blueprints.Element>> getIndices()
getIndices in interface com.tinkerpop.blueprints.IndexableGraphpublic void dropIndex(String indexName)
dropIndex in interface com.tinkerpop.blueprints.IndexableGraphindexName - Index namepublic OrientVertex addVertex(Object id)
addVertex in interface com.tinkerpop.blueprints.Graphid - Optional, can contains the Vertex's class name by prefixing with "class:"public ORecordConflictStrategy getConflictStrategy()
getConflictStrategy in interface OrientExtendedGraphpublic OrientBaseGraph setConflictStrategy(String iStrategyName)
setConflictStrategy in interface OrientExtendedGraphpublic OrientBaseGraph setConflictStrategy(ORecordConflictStrategy iResolver)
setConflictStrategy in interface OrientExtendedGraphpublic OrientVertex addVertex(Object id, Object... prop)
addVertex in interface OrientExtendedGraphid - Optional, can contains the Vertex's class name by prefixing with "class:"prop - Fields must be a odd pairs of key/value or a single object as Map containing entries as key/value pairspublic OrientVertex addVertex(String iClassName, String iClusterName)
iClassName - Vertex class nameiClusterName - Vertex cluster namepublic OrientVertex addTemporaryVertex(String iClassName, Object... prop)
addTemporaryVertex in interface OrientExtendedGraphiClassName - Vertex's class nameprop - Fields must be a odd pairs of key/value or a single object as Map containing entries as key/value pairspublic OrientEdge addEdge(Object id, com.tinkerpop.blueprints.Vertex outVertex, com.tinkerpop.blueprints.Vertex inVertex, String label)
addEdge in interface com.tinkerpop.blueprints.Graphid - Optional, can contains the Edge's class name by prefixing with "class:"outVertex - Source vertexinVertex - Destination vertexlabel - Edge's labelpublic OrientVertex getVertex(Object id)
getVertex in interface com.tinkerpop.blueprints.Graphid - Can by a String, ODocument or an OIdentifiable object.public void declareIntent(OIntent iIntent)
OrientExtendedGraphdeclareIntent in interface OrientExtendedGraphdeclareIntent in class OrientConfigurableGraphpublic void removeVertex(com.tinkerpop.blueprints.Vertex vertex)
removeVertex in interface com.tinkerpop.blueprints.Graphvertex - Vertex to removepublic Iterable<com.tinkerpop.blueprints.Vertex> getVertices()
getVertices in interface com.tinkerpop.blueprints.Graphpublic Iterable<com.tinkerpop.blueprints.Vertex> getVertices(boolean iPolymorphic)
iPolymorphic - If true then get all the vertices of any sub-classpublic Iterable<com.tinkerpop.blueprints.Vertex> getVerticesOfClass(String iClassName)
iClassName - Vertex class name to filterpublic Iterable<com.tinkerpop.blueprints.Vertex> getVerticesOfClass(String iClassName, boolean iPolymorphic)
iClassName - Vertex class name to filteriPolymorphic - If true consider also Vertex iClassName sub-classespublic Iterable<com.tinkerpop.blueprints.Vertex> getVertices(String iKey, Object iValue)
Iterable resultset =
getVertices("name", "Jay"); getVertices in interface com.tinkerpop.blueprints.GraphiKey - Field nameiValue - Field value@Deprecated public com.tinkerpop.blueprints.Vertex getVertexByKey(String iKey, Object iValue)
Vertex v = getVertexByKey("V.name", "name", "Jay"); iKey - Name of the indexed propertyiValue - Field valuegetVertices(String, Object)public Iterable<com.tinkerpop.blueprints.Vertex> getVertices(String label, String[] iKey, Object[] iValue)
Iterable resultset =
getVertices("Person",new String[] {"name","surname"},new Object[] { "Sherlock" ,"Holmes"}); iKey - Fields nameiValue - Fields valuepublic Iterable<com.tinkerpop.blueprints.Edge> getEdges()
getEdges in interface com.tinkerpop.blueprints.Graphpublic Iterable<com.tinkerpop.blueprints.Edge> getEdges(boolean iPolymorphic)
iPolymorphic - If true then get all the edge of any sub-classpublic Iterable<com.tinkerpop.blueprints.Edge> getEdgesOfClass(String iClassName)
iClassName - Edge class name to filterpublic Iterable<com.tinkerpop.blueprints.Edge> getEdgesOfClass(String iClassName, boolean iPolymorphic)
iClassName - Edge class name to filteriPolymorphic - If true consider also iClassName Edge sub-classespublic Iterable<com.tinkerpop.blueprints.Edge> getEdges(String iKey, Object iValue)
Iterable resultset = getEdges("name",
"Jay"); getEdges in interface com.tinkerpop.blueprints.GraphiKey - Field nameiValue - Field valuepublic OrientEdge getEdge(Object id)
getEdge in interface com.tinkerpop.blueprints.Graphid - Can by a String, ODocument or an OIdentifiable object.public void removeEdge(com.tinkerpop.blueprints.Edge edge)
removeEdge in interface com.tinkerpop.blueprints.Graphedge - Edge to removepublic OrientBaseGraph reuse(ODatabaseDocumentTx iDatabase)
iDatabase - Underlying database objectpublic boolean isClosed()
public void shutdown()
shutdown in interface com.tinkerpop.blueprints.Graphpublic void shutdown(boolean closeDb)
public void shutdown(boolean closeDb,
boolean commitTx)
public ODatabaseDocumentTx getRawGraph()
getRawGraph in interface com.tinkerpop.blueprints.MetaGraph<ODatabaseDocumentTx>public void begin()
public void commit()
public void rollback()
public OrientVertexType getVertexBaseType()
getVertexBaseType in interface OrientExtendedGraphpublic OrientVertexType getVertexType(String iTypeName)
getVertexType in interface OrientExtendedGraphiTypeName - Vertex class namepublic OrientVertexType createVertexType(String iClassName)
createVertexType in interface OrientExtendedGraphiClassName - Vertex class namepublic OrientVertexType createVertexType(String iClassName, int clusters)
createVertexType in interface OrientExtendedGraphiClassName - Vertex class nameclusters - The number of clusters to create for the new class. By default the MINIMUMCLUSTERS database setting is used.
In v2.2 and later, the number of clusters are proportioned to the amount of cores found on the machinepublic OrientVertexType createVertexType(String iClassName, String iSuperClassName)
createVertexType in interface OrientExtendedGraphiClassName - Vertex class nameiSuperClassName - Vertex class name to extendpublic OrientVertexType createVertexType(String iClassName, String iSuperClassName, int clusters)
createVertexType in interface OrientExtendedGraphiClassName - Vertex class nameiSuperClassName - Vertex class name to extendclusters - The number of clusters to create for the new class. By default the MINIMUMCLUSTERS database setting is
used. In v2.2 and later, the number of clusters are proportioned to the amount of cores found on the
machinepublic OrientVertexType createVertexType(String iClassName, OClass iSuperClass)
createVertexType in interface OrientExtendedGraphiClassName - Vertex class nameiSuperClass - OClass Vertex to extendpublic OrientVertexType createVertexType(String iClassName, OClass iSuperClass, int clusters)
createVertexType in interface OrientExtendedGraphiClassName - Vertex class nameiSuperClass - OClass Vertex to extendclusters - The number of clusters to create for the new class. By default the MINIMUMCLUSTERS database setting is used. In v2.2
and later, the number of clusters are proportioned to the amount of cores found on the machinepublic void dropVertexType(String iTypeName)
dropVertexType in interface OrientExtendedGraphiTypeName - Vertex class namepublic OrientEdgeType getEdgeBaseType()
getEdgeBaseType in interface OrientExtendedGraphpublic OrientEdgeType getEdgeType(String iTypeName)
getEdgeType in interface OrientExtendedGraphiTypeName - Edge class namepublic OrientEdgeType createEdgeType(String iClassName)
createEdgeType in interface OrientExtendedGraphiClassName - Edge class namepublic OrientEdgeType createEdgeType(String iClassName, int clusters)
iClassName - Edge class nameclusters - The number of clusters to create for the new class. By default the MINIMUMCLUSTERS database setting is used.
In v2.2 and later, the number of clusters are proportioned to the amount of cores found on the machinepublic OrientEdgeType createEdgeType(String iClassName, String iSuperClassName)
createEdgeType in interface OrientExtendedGraphiClassName - Edge class nameiSuperClassName - Edge class name to extendpublic OrientEdgeType createEdgeType(String iClassName, String iSuperClassName, int clusters)
iClassName - Edge class nameiSuperClassName - Edge class name to extendclusters - The number of clusters to create for the new class. By default the MINIMUMCLUSTERS database setting is
used. In v2.2 and later, the number of clusters are proportioned to the amount of cores found on the
machinepublic OrientEdgeType createEdgeType(String iClassName, OClass iSuperClass, int clusters)
createEdgeType in interface OrientExtendedGraphiClassName - Edge class nameiSuperClass - OClass Edge to extendclusters - The number of clusters to create for the new class. By default the MINIMUMCLUSTERS database setting is used.
In v2.2 and later, the number of clusters are proportioned to the amount of cores found on the machinepublic OrientEdgeType createEdgeType(String iClassName, OClass iSuperClass)
createEdgeType in interface OrientExtendedGraphiClassName - Edge class nameiSuperClass - OClass Edge to extendpublic void dropEdgeType(String iTypeName)
dropEdgeType in interface OrientExtendedGraphiTypeName - Edge class namepublic OrientElement detach(OrientElement iElement)
detach in interface OrientExtendedGraphiElement - Graph element to detachattach(OrientElement)public OrientElement attach(OrientElement iElement)
attach in interface OrientExtendedGraphiElement - Graph element to attachdetach(OrientElement)public OrientElement getElement(Object id)
id - Can by a String, ODocument or an OIdentifiable object.public <T extends com.tinkerpop.blueprints.Element> void dropKeyIndex(String key, Class<T> elementClass)
dropKeyIndex in interface com.tinkerpop.blueprints.KeyIndexableGraphkey - Field nameelementClass - Element class as instances of Vertex and Edgepublic <T extends com.tinkerpop.blueprints.Element> void createKeyIndex(String key, Class<T> elementClass, com.tinkerpop.blueprints.Parameter... indexParameters)
createKeyIndex in interface com.tinkerpop.blueprints.KeyIndexableGraphT - the element class specificationkey - the key to create the index forelementClass - the element class that the index is forindexParameters - a collection of parameters for the underlying index implementation: public <T extends com.tinkerpop.blueprints.Element> Set<String> getIndexedKeys(Class<T> elementClass)
getIndexedKeys in interface com.tinkerpop.blueprints.KeyIndexableGraphelementClass - the element class that the index is forpublic <T extends com.tinkerpop.blueprints.Element> Set<String> getIndexedKeys(Class<T> elementClass, boolean includeClassNames)
elementClass - the element class that the index is forincludeClassNames - If true includes also the class name as prefix of fieldspublic com.tinkerpop.blueprints.GraphQuery query()
query in interface com.tinkerpop.blueprints.Graphquery in interface OrientExtendedGraphpublic OTraverse traverse()
traverse in interface OrientExtendedGraphpublic OCommandRequest command(OCommandRequest iCommand)
command in interface OrientExtendedGraphiCommand - Command request between SQL, GREMLIN and SCRIPT commandspublic long countVertices()
countVertices in interface OrientExtendedGraphpublic long countVertices(String iClassName)
countVertices in interface OrientExtendedGraphpublic long countEdges()
countEdges in interface OrientExtendedGraphpublic long countEdges(String iClassName)
countEdges in interface OrientExtendedGraphpublic <RET> RET executeOutsideTx(OCallable<RET,OrientBaseGraph> iCallable, String... iOperationStrings) throws RuntimeException
RuntimeExceptionprotected void autoStartTransaction()
protected void saveIndexConfiguration()
protected void setCurrentGraphInThreadLocal()
protected ODatabaseDocumentTx getDatabase()
protected static void removeEdges(OrientBaseGraph graph, ODocument iVertex, String iFieldName, OIdentifiable iVertexToRemove, boolean iAlsoInverse, boolean useVertexFieldsForEdgeLabels, boolean autoScaleEdgeType, boolean forceReload)
protected static ODocument getDocument(OIdentifiable id, boolean forceReload)
protected static void deleteEdgeIfAny(OIdentifiable iRecord, boolean forceReload)
public OIntent getIntent()
protected OrientVertex getVertexInstance(OIdentifiable id)
protected OrientVertex getVertexInstance(String className, Object... fields)
protected OrientEdge getEdgeInstance(OIdentifiable id)
protected OrientEdge getEdgeInstance(String className, Object... fields)
protected OrientEdge getEdgeInstance(OIdentifiable from, OIdentifiable to, String label)
protected Object setProperty(String iName, Object iValue)
setProperty in class OrientConfigurableGraphprotected Object getProperty(String iName)
getProperty in class OrientConfigurableGraphpublic Map<String,Object> getProperties()
getProperties in class OrientConfigurableGraphCopyright © 2009–2025 OrientDB. All rights reserved.