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 booleanhasIdProperty()True if it contains an id property, false otherwise.PropertyMetadataidProperty()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:EntityMetadataReturns the metadata for all properties in this entity.- Specified by:
propertiesin interfaceEntityMetadata- Returns:
- the property information.
-
hasIdProperty
public boolean hasIdProperty()
Description copied from interface:EntityMetadataTrue if it contains an id property, false otherwise.- Specified by:
hasIdPropertyin interfaceEntityMetadata- Returns:
- true if there is one, false otherwise.
-
idProperty
public PropertyMetadata idProperty()
Description copied from interface:EntityMetadataReturns the metadata for the id property if set, or null otherwise.- Specified by:
idPropertyin interfaceEntityMetadata- Returns:
- the metadata or null.
-
-