public class MappingMongoEntityInformation<T,ID extends Serializable> extends AbstractEntityInformation<T,ID> implements MongoEntityInformation<T,ID>
MongoEntityInformation implementation using a MongoPersistentEntity instance to lookup the necessary
information. Can be configured with a custom collection to be returned which will trump the one returned by the
MongoPersistentEntity if given.| Constructor and Description |
|---|
MappingMongoEntityInformation(MongoPersistentEntity<T> entity)
Creates a new
MappingMongoEntityInformation for the given MongoPersistentEntity. |
MappingMongoEntityInformation(MongoPersistentEntity<T> entity,
String customCollectionName)
Creates a new
MappingMongoEntityInformation for the given MongoPersistentEntity and custom
collection name. |
| Modifier and Type | Method and Description |
|---|---|
String |
getCollectionName()
Returns the name of the collection the entity shall be persisted to.
|
ID |
getId(T entity) |
String |
getIdAttribute()
Returns the attribute that the id will be persisted to.
|
Class<ID> |
getIdType() |
getJavaType, isNewclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisNewgetJavaTypepublic MappingMongoEntityInformation(MongoPersistentEntity<T> entity)
MappingMongoEntityInformation for the given MongoPersistentEntity.entity - must not be null.public MappingMongoEntityInformation(MongoPersistentEntity<T> entity, String customCollectionName)
MappingMongoEntityInformation for the given MongoPersistentEntity and custom
collection name.entity - must not be null.customCollectionName - public ID getId(T entity)
getId in interface EntityInformation<T,ID extends Serializable>public Class<ID> getIdType()
getIdType in interface EntityInformation<T,ID extends Serializable>public String getCollectionName()
MongoEntityInformationgetCollectionName in interface MongoEntityInformation<T,ID extends Serializable>public String getIdAttribute()
MongoEntityInformationgetIdAttribute in interface MongoEntityInformation<T,ID extends Serializable>Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.