Package org.orienteer.transponder.neo4j
Class Neo4JDriver
- java.lang.Object
-
- org.orienteer.transponder.neo4j.Neo4JDriver
-
- All Implemented Interfaces:
org.orienteer.transponder.IDriver
public class Neo4JDriver extends Object implements org.orienteer.transponder.IDriver
TransponderIDriverfor Neo4J
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classNeo4JDriver.TransactionHolder
-
Field Summary
Fields Modifier and Type Field Description static StringDIALECT_NEO4Jstatic StringTYPE_CUSTOM_TRANSPONDER_WRAPPER
-
Constructor Summary
Constructors Constructor Description Neo4JDriver(org.neo4j.graphdb.GraphDatabaseService database)CreatesIDriverwhich associated with provided Neo4J databaseNeo4JDriver(org.neo4j.graphdb.GraphDatabaseService database, org.neo4j.graphdb.Transaction externalTransaction)CreatesIDriverwhich associated with provided Neo4J database and transaction
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateIndex(String typeName, String indexName, String indexType, AnnotatedElement annotations, String... properties)voidcreateProperty(String typeName, String propertyName, Type propertyType, String referencedType, int order, AnnotatedElement annotations)voidcreateType(String typeName, boolean isAbstract, Class<?> mainWrapperClass, String... superTypes)org.neo4j.graphdb.GraphDatabaseServicegetDatabase()Class<?>getDefaultEntityBaseClass()StringgetDialect()Class<?>getEntityMainClass(Object seed)ObjectgetPropertyValue(Object wrapper, String property, Type type)booleanisSeedClass(Class<?> seedClass)<T> TnewEntityInstance(Class<T> proxyClass, String type)List<Object>query(String language, String query, Map<String,Object> params)voidreplaceSeed(Object wrapper, Object newSeed)voidsaveEntityInstance(Object wrapper)voidsetPropertyValue(Object wrapper, String property, Object value, Type type)voidsetupRelationship(String type1Name, String property1Name, String type2Name, String property2Name)ObjecttoSeed(Object wrapped)<T> TwrapEntityInstance(Class<T> proxyClass, Object seed)
-
-
-
Field Detail
-
DIALECT_NEO4J
public static final String DIALECT_NEO4J
- See Also:
- Constant Field Values
-
TYPE_CUSTOM_TRANSPONDER_WRAPPER
public static final String TYPE_CUSTOM_TRANSPONDER_WRAPPER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Neo4JDriver
public Neo4JDriver(org.neo4j.graphdb.GraphDatabaseService database)
CreatesIDriverwhich associated with provided Neo4J database- Parameters:
database- Neo4J database instance to associate driver with
-
Neo4JDriver
public Neo4JDriver(org.neo4j.graphdb.GraphDatabaseService database, org.neo4j.graphdb.Transaction externalTransaction)CreatesIDriverwhich associated with provided Neo4J database and transaction- Parameters:
database- Neo4J database instance to associate driver withexternalTransaction- external transaction to associate with
-
-
Method Detail
-
createType
public void createType(String typeName, boolean isAbstract, Class<?> mainWrapperClass, String... superTypes)
- Specified by:
createTypein interfaceorg.orienteer.transponder.IDriver
-
createProperty
public void createProperty(String typeName, String propertyName, Type propertyType, String referencedType, int order, AnnotatedElement annotations)
- Specified by:
createPropertyin interfaceorg.orienteer.transponder.IDriver
-
setupRelationship
public void setupRelationship(String type1Name, String property1Name, String type2Name, String property2Name)
- Specified by:
setupRelationshipin interfaceorg.orienteer.transponder.IDriver
-
createIndex
public void createIndex(String typeName, String indexName, String indexType, AnnotatedElement annotations, String... properties)
- Specified by:
createIndexin interfaceorg.orienteer.transponder.IDriver
-
getPropertyValue
public Object getPropertyValue(Object wrapper, String property, Type type)
- Specified by:
getPropertyValuein interfaceorg.orienteer.transponder.IDriver
-
setPropertyValue
public void setPropertyValue(Object wrapper, String property, Object value, Type type)
- Specified by:
setPropertyValuein interfaceorg.orienteer.transponder.IDriver
-
newEntityInstance
public <T> T newEntityInstance(Class<T> proxyClass, String type)
- Specified by:
newEntityInstancein interfaceorg.orienteer.transponder.IDriver
-
saveEntityInstance
public void saveEntityInstance(Object wrapper)
- Specified by:
saveEntityInstancein interfaceorg.orienteer.transponder.IDriver
-
wrapEntityInstance
public <T> T wrapEntityInstance(Class<T> proxyClass, Object seed)
- Specified by:
wrapEntityInstancein interfaceorg.orienteer.transponder.IDriver
-
getDefaultEntityBaseClass
public Class<?> getDefaultEntityBaseClass()
- Specified by:
getDefaultEntityBaseClassin interfaceorg.orienteer.transponder.IDriver
-
getEntityMainClass
public Class<?> getEntityMainClass(Object seed)
- Specified by:
getEntityMainClassin interfaceorg.orienteer.transponder.IDriver
-
isSeedClass
public boolean isSeedClass(Class<?> seedClass)
- Specified by:
isSeedClassin interfaceorg.orienteer.transponder.IDriver
-
toSeed
public Object toSeed(Object wrapped)
- Specified by:
toSeedin interfaceorg.orienteer.transponder.IDriver
-
query
public List<Object> query(String language, String query, Map<String,Object> params)
- Specified by:
queryin interfaceorg.orienteer.transponder.IDriver
-
getDialect
public String getDialect()
- Specified by:
getDialectin interfaceorg.orienteer.transponder.IDriver
-
replaceSeed
public void replaceSeed(Object wrapper, Object newSeed)
- Specified by:
replaceSeedin interfaceorg.orienteer.transponder.IDriver
-
getDatabase
public org.neo4j.graphdb.GraphDatabaseService getDatabase()
- Returns:
- associated Neo4J
GraphDatabaseServiceinstance
-
-