public final class SqlGraph extends Object implements com.tinkerpop.blueprints.ThreadedTransactionalGraph, com.tinkerpop.blueprints.KeyIndexableGraph
| Constructor and Description |
|---|
SqlGraph(org.apache.commons.configuration.Configuration configuration)
Instantiates a new SQL graph configured from the provided configuration object.
|
SqlGraph(DataSource dataSource) |
SqlGraph(DataSource dataSource,
org.apache.commons.configuration.Configuration configuration) |
SqlGraph(Map<String,Object> configuration) |
| Modifier and Type | Method and Description |
|---|---|
SqlEdge |
addEdge(Object id,
com.tinkerpop.blueprints.Vertex outVertex,
com.tinkerpop.blueprints.Vertex inVertex,
String label) |
com.tinkerpop.blueprints.Vertex |
addVertex(Object id) |
void |
commit() |
<T extends com.tinkerpop.blueprints.Element> |
createKeyIndex(String key,
Class<T> elementClass,
com.tinkerpop.blueprints.Parameter... indexParameters) |
void |
createSchemaIfNeeded() |
<T extends com.tinkerpop.blueprints.Element> |
dropKeyIndex(String key,
Class<T> elementClass) |
SqlEdge |
getEdge(Object id) |
Iterable<com.tinkerpop.blueprints.Edge> |
getEdges() |
com.tinkerpop.blueprints.CloseableIterable<com.tinkerpop.blueprints.Edge> |
getEdges(String key,
Object value) |
com.tinkerpop.blueprints.Features |
getFeatures() |
<T extends com.tinkerpop.blueprints.Element> |
getIndexedKeys(Class<T> elementClass) |
SqlVertex |
getVertex(Object id) |
com.tinkerpop.blueprints.CloseableIterable<com.tinkerpop.blueprints.Vertex> |
getVertices() |
com.tinkerpop.blueprints.CloseableIterable<com.tinkerpop.blueprints.Vertex> |
getVertices(String key,
Object value) |
com.tinkerpop.blueprints.TransactionalGraph |
newTransaction() |
SqlGraphQuery |
query() |
void |
removeEdge(com.tinkerpop.blueprints.Edge edge) |
void |
removeVertex(com.tinkerpop.blueprints.Vertex vertex) |
void |
rollback() |
void |
shutdown() |
void |
stopTransaction(com.tinkerpop.blueprints.TransactionalGraph.Conclusion conclusion) |
String |
toString() |
public SqlGraph(org.apache.commons.configuration.Configuration configuration)
throws Exception
sql.datasource.class - the name of the datasource class from some JDBC driver on the
classpathsql.datasource.* - any properties of the datasource can be passed using this prefix.
E.g. sql.datasource.portNumber, sql.datasource.serverName, etc. See the documentation
of the datasource for the list of available properties.sql.verticesTable - the name of the vertices table. Defaults to "vertices".sql.edgesTable - the name of the edges table. Defaults to "edges".sql.vertexPropertiesTable - the name of the table for vertex properties. Defaults to
"vertex_properties".sql.edgePropertiesTable - the name of the table for edge properties. Defaults to
"edge_properties".configuration - the configuration to useExceptionpublic SqlGraph(DataSource dataSource)
public SqlGraph(DataSource dataSource, org.apache.commons.configuration.Configuration configuration) throws Exception
Exceptionpublic void createSchemaIfNeeded()
throws SQLException,
IOException
SQLExceptionIOExceptionpublic com.tinkerpop.blueprints.TransactionalGraph newTransaction()
newTransaction in interface com.tinkerpop.blueprints.ThreadedTransactionalGraphpublic void stopTransaction(com.tinkerpop.blueprints.TransactionalGraph.Conclusion conclusion)
stopTransaction in interface com.tinkerpop.blueprints.TransactionalGraphpublic void commit()
commit in interface com.tinkerpop.blueprints.TransactionalGraphpublic void rollback()
rollback in interface com.tinkerpop.blueprints.TransactionalGraphpublic com.tinkerpop.blueprints.Features getFeatures()
getFeatures in interface com.tinkerpop.blueprints.Graphpublic com.tinkerpop.blueprints.Vertex addVertex(Object id)
addVertex in interface com.tinkerpop.blueprints.Graphpublic SqlVertex getVertex(Object id)
getVertex in interface com.tinkerpop.blueprints.Graphpublic void removeVertex(com.tinkerpop.blueprints.Vertex vertex)
removeVertex in interface com.tinkerpop.blueprints.Graphpublic com.tinkerpop.blueprints.CloseableIterable<com.tinkerpop.blueprints.Vertex> getVertices()
getVertices in interface com.tinkerpop.blueprints.Graphpublic com.tinkerpop.blueprints.CloseableIterable<com.tinkerpop.blueprints.Vertex> getVertices(String key, Object value)
getVertices in interface com.tinkerpop.blueprints.Graphpublic SqlEdge addEdge(Object id, com.tinkerpop.blueprints.Vertex outVertex, com.tinkerpop.blueprints.Vertex inVertex, String label)
addEdge in interface com.tinkerpop.blueprints.Graphpublic SqlEdge getEdge(Object id)
getEdge in interface com.tinkerpop.blueprints.Graphpublic void removeEdge(com.tinkerpop.blueprints.Edge edge)
removeEdge in interface com.tinkerpop.blueprints.Graphpublic Iterable<com.tinkerpop.blueprints.Edge> getEdges()
getEdges in interface com.tinkerpop.blueprints.Graphpublic com.tinkerpop.blueprints.CloseableIterable<com.tinkerpop.blueprints.Edge> getEdges(String key, Object value)
getEdges in interface com.tinkerpop.blueprints.Graphpublic SqlGraphQuery query()
query in interface com.tinkerpop.blueprints.Graphpublic void shutdown()
shutdown in interface com.tinkerpop.blueprints.Graphpublic <T extends com.tinkerpop.blueprints.Element> void createKeyIndex(String key, Class<T> elementClass, com.tinkerpop.blueprints.Parameter... indexParameters)
createKeyIndex in interface com.tinkerpop.blueprints.KeyIndexableGraphpublic <T extends com.tinkerpop.blueprints.Element> void dropKeyIndex(String key, Class<T> elementClass)
dropKeyIndex in interface com.tinkerpop.blueprints.KeyIndexableGraphpublic <T extends com.tinkerpop.blueprints.Element> Set<String> getIndexedKeys(Class<T> elementClass)
getIndexedKeys in interface com.tinkerpop.blueprints.KeyIndexableGraphCopyright © 2015–2016 Red Hat, Inc.. All rights reserved.