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 Summary
Constructors Constructor Description ReflectionBasedEntityMetadata(Class<?> sourceEntity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasIdProperty()
True if it contains an id property, false otherwise.PropertyMetadata
idProperty()
Returns the metadata for the id property if set, or null otherwise.List<PropertyMetadata>
properties()
Returns the metadata for all properties in this entity.
-
-
-
Constructor Detail
-
ReflectionBasedEntityMetadata
public ReflectionBasedEntityMetadata(Class<?> sourceEntity)
-
-
Method Detail
-
properties
public List<PropertyMetadata> properties()
Description copied from interface:EntityMetadata
Returns the metadata for all properties in this entity.- Specified by:
properties
in interfaceEntityMetadata
- 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 interfaceEntityMetadata
- 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 interfaceEntityMetadata
- Returns:
- the metadata or null.
-
-