Package org.neo4j.ogm.context
Class SingleUseEntityMapper
java.lang.Object
org.neo4j.ogm.context.SingleUseEntityMapper
Simple graph-to-entity mapper suitable for ad-hoc, one-off mappings. This doesn't interact with a
mapping context or mandate graph IDs on the target types and is not designed for use in the OGM session.
- Author:
- Adam George, Luanne Misquitta, Michael J. Simons
-
Constructor Summary
ConstructorDescriptionSingleUseEntityMapper
(MetaData mappingMetaData, EntityFactory entityFactory) Compatibility constructor for SDN 5.0 and 5.1SingleUseEntityMapper
(MetaData mappingMetaData, EntityInstantiator entityInstantiator) Constructs a newSingleUseEntityMapper
based on the given mappingMetaData
. -
Method Summary
-
Constructor Details
-
SingleUseEntityMapper
Compatibility constructor for SDN 5.0 and 5.1- Parameters:
mappingMetaData
- TheMetaData
to use for performing mappingsentityFactory
- The entity factory to use.
-
SingleUseEntityMapper
Constructs a newSingleUseEntityMapper
based on the given mappingMetaData
.- Parameters:
mappingMetaData
- TheMetaData
to use for performing mappingsentityInstantiator
- The entity factory to use.
-
-
Method Details
-
map
Maps a row-based result onto a new instance of the specified type.- Type Parameters:
T
- The class of object to return- Parameters:
type
- TheClass
denoting the type of object to createcolumnNames
- The names of the columns in each row of the resultrowModel
- TheRowModel
containing the data to map- Returns:
- A new instance of
T
populated with the data in the specified row model
-
map
-