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(Edge edgeModel)
Constructs a new object based on the class mapped to the type in the given
Edge. |
<T> T |
newObject(Node nodeModel)
Constructs a new object based on the class mapped to the labels on the given
Node. |
public EntityFactory(MetaData metadata)
EntityFactory driven by the specified MetaData.metadata - The mapping MetaDatapublic <T> T newObject(Node nodeModel)
Node. 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.T - The class of object to returnnodeModel - The Node from which to determine the typenullMappingException - if it's not possible to resolve or instantiate a class from the given argumentpublic <T> T newObject(Edge edgeModel)
Edge.T - The class of object to returnedgeModel - The Edge 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.T - The class of object to returnclassInfo - 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)
T - The class of object to returnclarse - The class to instantiateClassMappingException - if it's not possible to instantiate the given class for any reasonCopyright © 2016 Neo Technology, Inc.. All rights reserved.