Package org.neo4j.ogm.session
Interface EntityInstantiator
- All Known Implementing Classes:
ReflectionEntityInstantiator
public interface EntityInstantiator
Interface to be implemented to override entity instances creation.
This is mainly designed for SDN, Spring data commons having some infrastructure code to do fancy
object instantiation using persistence constructors and ASM low level bytecode generation.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
createInstance
(Class<T> clazz, Map<String, Object> propertyValues) Creates an instance of a given class.<T> T
createInstanceWithConstructorArgs
(Class<T> clazz, Map<String, Object> propertyValues) Creates an instance of a given class and populates the constructor fields, if needed/possible.
-
Field Details
-
NEO4J_INTERNAL_NODE_MODEL
- See Also:
-
-
Method Details
-
createInstance
Creates an instance of a given class. Ignores the provided propertyValues for compatibility reasons.- Type Parameters:
T
- Type to create- Parameters:
clazz
- The class to materialize.propertyValues
- Properties of the object (unused!)- Returns:
- The created instance.
-
createInstanceWithConstructorArgs
Creates an instance of a given class and populates the constructor fields, if needed/possible.- Type Parameters:
T
- Type to create- Parameters:
clazz
- The class to maerialize.propertyValues
- Properties of the object (needed for constructors with args)- Returns:
- New instance.
-