Class EntityUtils

java.lang.Object
org.neo4j.ogm.utils.EntityUtils

public class EntityUtils extends Object
The utility methods here will all throw a NullPointerException if invoked with null.
Author:
Luanne Misquitta
  • Constructor Details

    • EntityUtils

      public EntityUtils()
  • Method Details

    • nextRef

      public static Long nextRef()
    • identity

      public static Long identity(Object entity, MetaData metaData)
      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 use MappingContext.nativeId(Object)
      Parameters:
      entity - entity
      metaData - metadata
      Returns:
      native id or refId
    • setIdentity

      public static void setIdentity(Object entity, Long identity, MetaData metaData)
    • labels

      public static Collection<String> labels(Object entity, MetaData metaData)
      Returns the full set of labels, both static and dynamic, if any, to apply to a node.
      Parameters:
      entity - entity to get the labels for
      metaData - metadata
      Returns:
      collection of labels