Class ReflectionBasedEntityMetadata

java.lang.Object
com.couchbase.client.java.repository.mapping.ReflectionBasedEntityMetadata
All Implemented Interfaces:
EntityMetadata

public class ReflectionBasedEntityMetadata
extends Object
implements EntityMetadata
Reflection based implementation for entity metadata.
Since:
2.2.0
Author:
Michael Nitschinger
  • Constructor Details

    • ReflectionBasedEntityMetadata

      public ReflectionBasedEntityMetadata​(Class<?> sourceEntity)
  • Method Details

    • properties

      public List<PropertyMetadata> properties()
      Description copied from interface: EntityMetadata
      Returns the metadata for all properties in this entity.
      Specified by:
      properties in interface EntityMetadata
      Returns:
      the property information.
    • hasIdProperty

      public boolean hasIdProperty()
      Description copied from interface: EntityMetadata
      True if it contains an id property, false otherwise.
      Specified by:
      hasIdProperty in interface EntityMetadata
      Returns:
      true if there is one, false otherwise.
    • idProperty

      public PropertyMetadata idProperty()
      Description copied from interface: EntityMetadata
      Returns the metadata for the id property if set, or null otherwise.
      Specified by:
      idProperty in interface EntityMetadata
      Returns:
      the metadata or null.