public class EntityFactory extends Object
| Constructor and Description |
|---|
EntityFactory(MetaData metadata)
Constructs a new
EntityFactory driven by the specified MetaData. |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
newObject(Class<T> clarse)
Constructs a new instance of the specified class using the same logic as the graph model factory methods.
|
<T> T |
newObject(ClassInfo classInfo)
Constructs a new object based on the
ClassInfo. |
<T> T |
newObject(NodeModel nodeModel)
Constructs a new object based on the class mapped to the labels on the given
NodeModel. |
<T> T |
newObject(RelationshipModel edgeModel)
Constructs a new object based on the class mapped to the type in the given
RelationshipModel. |
public EntityFactory(MetaData metadata)
EntityFactory driven by the specified MetaData.metadata - The mapping MetaDatapublic <T> T newObject(NodeModel nodeModel)
NodeModel. In the
case of multiple labels, only the one that identifies a class in the domain will be used, and if there
are any ambiguities in which label to use then an exception will be thrown.nodeModel - The NodeModel from which to determine the typenullMappingException - if it's not possible to resolve or instantiate a class from the given argumentpublic <T> T newObject(RelationshipModel edgeModel)
RelationshipModel.edgeModel - The RelationshipModel from which to determine the typenullMappingException - if it's not possible to resolve or instantiate a class from the given argumentpublic <T> T newObject(ClassInfo classInfo)
ClassInfo.classInfo - The ClassInfo from which to determine the typenullMappingException - if it's not possible to resolve or instantiate a class from the given argumentpublic <T> T newObject(Class<T> clarse)
clarse - The class to instantiateClassMappingException - if it's not possible to instantiate the given class for any reasonCopyright © 2015 Neo Technology, Inc.. All rights reserved.