org.springframework.data.document.mongodb.repository
Class SimpleMongoEntityInformation<T,ID extends java.io.Serializable>
java.lang.Object
org.springframework.data.document.mongodb.repository.SimpleMongoEntityInformation<T,ID>
- All Implemented Interfaces:
- MongoEntityInformation<T,ID>
class SimpleMongoEntityInformation<T,ID extends java.io.Serializable>
- extends
- implements MongoEntityInformation<T,ID>
Expects the domain class to contain a field with a name out of the following
.
- Author:
- Oliver Gierke
Field Summary |
private java.lang.reflect.Field |
field
|
private static java.util.List<java.lang.String> |
FIELD_NAMES
|
Method Summary |
java.lang.String |
getCollectionName()
Returns the name of the collection the entity shall be persisted to. |
ID |
getId(java.lang.Object entity)
|
java.lang.String |
getIdAttribute()
Returns the attribute that the id will be persisted to. |
java.lang.Class<ID> |
getIdType()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FIELD_NAMES
private static final java.util.List<java.lang.String> FIELD_NAMES
field
private java.lang.reflect.Field field
SimpleMongoEntityInformation
public SimpleMongoEntityInformation(java.lang.Class<T> domainClass)
- Creates a new
SimpleMongoEntityInformation
.
- Parameters:
domainClass
-
getCollectionName
public java.lang.String getCollectionName()
- Description copied from interface:
MongoEntityInformation
- Returns the name of the collection the entity shall be persisted to.
- Specified by:
getCollectionName
in interface MongoEntityInformation<T,ID extends java.io.Serializable>
- Returns:
getIdAttribute
public java.lang.String getIdAttribute()
- Description copied from interface:
MongoEntityInformation
- Returns the attribute that the id will be persisted to.
- Specified by:
getIdAttribute
in interface MongoEntityInformation<T,ID extends java.io.Serializable>
- Returns:
getId
public ID getId(java.lang.Object entity)
getIdType
public java.lang.Class<ID> getIdType()