Package org.neo4j.ogm.utils
Class EntityUtils
java.lang.Object
org.neo4j.ogm.utils.EntityUtils
The utility methods here will all throw a
NullPointerException
if invoked with null
.- Author:
- Luanne Misquitta
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Long
Return native id of given node or relationship entity.static Collection<String>
Returns the full set of labels, both static and dynamic, if any, to apply to a node.static Long
nextRef()
static void
setIdentity
(Object entity, Long identity, MetaData metaData)
-
Constructor Details
-
EntityUtils
public EntityUtils()
-
-
Method Details
-
nextRef
-
identity
Return native id of given node or relationship entity. If the id field is null the field is set to unique negative refId, which is then returned. You most likely want to useMappingContext.nativeId(Object)
- Parameters:
entity
- entitymetaData
- metadata- Returns:
- native id or refId
-
setIdentity
-
labels
Returns the full set of labels, both static and dynamic, if any, to apply to a node.- Parameters:
entity
- entity to get the labels formetaData
- metadata- Returns:
- collection of labels
-