Class Neo4JDriver

  • All Implemented Interfaces:
    org.orienteer.transponder.IDriver

    public class Neo4JDriver
    extends Object
    implements org.orienteer.transponder.IDriver
    Transponder IDriver for Neo4J
    • Constructor Detail

      • Neo4JDriver

        public Neo4JDriver​(org.neo4j.graphdb.GraphDatabaseService database)
        Creates IDriver which 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)
        Creates IDriver which associated with provided Neo4J database and transaction
        Parameters:
        database - Neo4J database instance to associate driver with
        externalTransaction - external transaction to associate with
    • Method Detail

      • createType

        public void createType​(String typeName,
                               boolean isAbstract,
                               Class<?> mainWrapperClass,
                               String... superTypes)
        Specified by:
        createType in interface org.orienteer.transponder.IDriver
      • createProperty

        public void createProperty​(String typeName,
                                   String propertyName,
                                   Type propertyType,
                                   String referencedType,
                                   int order,
                                   AnnotatedElement annotations)
        Specified by:
        createProperty in interface org.orienteer.transponder.IDriver
      • setupRelationship

        public void setupRelationship​(String type1Name,
                                      String property1Name,
                                      String type2Name,
                                      String property2Name)
        Specified by:
        setupRelationship in interface org.orienteer.transponder.IDriver
      • createIndex

        public void createIndex​(String typeName,
                                String indexName,
                                String indexType,
                                AnnotatedElement annotations,
                                String... properties)
        Specified by:
        createIndex in interface org.orienteer.transponder.IDriver
      • getPropertyValue

        public Object getPropertyValue​(Object wrapper,
                                       String property,
                                       Type type)
        Specified by:
        getPropertyValue in interface org.orienteer.transponder.IDriver
      • setPropertyValue

        public void setPropertyValue​(Object wrapper,
                                     String property,
                                     Object value,
                                     Type type)
        Specified by:
        setPropertyValue in interface org.orienteer.transponder.IDriver
      • newEntityInstance

        public <T> T newEntityInstance​(Class<T> proxyClass,
                                       String type)
        Specified by:
        newEntityInstance in interface org.orienteer.transponder.IDriver
      • saveEntityInstance

        public void saveEntityInstance​(Object wrapper)
        Specified by:
        saveEntityInstance in interface org.orienteer.transponder.IDriver
      • wrapEntityInstance

        public <T> T wrapEntityInstance​(Class<T> proxyClass,
                                        Object seed)
        Specified by:
        wrapEntityInstance in interface org.orienteer.transponder.IDriver
      • getDefaultEntityBaseClass

        public Class<?> getDefaultEntityBaseClass()
        Specified by:
        getDefaultEntityBaseClass in interface org.orienteer.transponder.IDriver
      • getEntityMainClass

        public Class<?> getEntityMainClass​(Object seed)
        Specified by:
        getEntityMainClass in interface org.orienteer.transponder.IDriver
      • isSeedClass

        public boolean isSeedClass​(Class<?> seedClass)
        Specified by:
        isSeedClass in interface org.orienteer.transponder.IDriver
      • toSeed

        public Object toSeed​(Object wrapped)
        Specified by:
        toSeed in interface org.orienteer.transponder.IDriver
      • getDialect

        public String getDialect()
        Specified by:
        getDialect in interface org.orienteer.transponder.IDriver
      • replaceSeed

        public void replaceSeed​(Object wrapper,
                                Object newSeed)
        Specified by:
        replaceSeed in interface org.orienteer.transponder.IDriver
      • getDatabase

        public org.neo4j.graphdb.GraphDatabaseService getDatabase()
        Returns:
        associated Neo4J GraphDatabaseService instance