Class EntityInformation<E>
- java.lang.Object
-
- com.alpha.mongodb.entitymanager.entity.info.EntityInformation<E>
-
- Type Parameters:
E
- Entity Type
public class EntityInformation<E> extends Object
Get Entity Information from the Entity class, or the entity object
-
-
Field Summary
Fields Modifier and Type Field Description E
entity
Class<E>
entityClass
-
Constructor Summary
Constructors Constructor Description EntityInformation(E entity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntityConfiguration
getEntityConfiguration()
Get the entity configuration if exists, gets a default configuration otherwise.Object
getId()
Get the entity id from the set entity.Object
getId(Object entity)
Get ID from the objectEntitySchemaInformation<E>
getSchemaInformation()
Object
getVersion()
Get the entity version from the set entity.Object
getVersion(Object entity)
Get version of the entity
-
-
-
Constructor Detail
-
EntityInformation
public EntityInformation(@NonNull E entity)
-
-
Method Detail
-
getId
public Object getId(Object entity)
Get ID from the object- Parameters:
entity
- Entity Object- Returns:
- ID
-
getVersion
public Object getVersion(Object entity)
Get version of the entity- Parameters:
entity
- Entity- Returns:
- Version
-
getId
public Object getId()
Get the entity id from the set entity.- Returns:
- ID
-
getVersion
public Object getVersion()
Get the entity version from the set entity.- Returns:
- version
-
getEntityConfiguration
public EntityConfiguration getEntityConfiguration()
Get the entity configuration if exists, gets a default configuration otherwise.- Returns:
- Entity configuration
-
getSchemaInformation
public EntitySchemaInformation<E> getSchemaInformation()
-
-