public class MappingMongoEntityInformation<T,ID extends Serializable> extends PersistentEntityInformation<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.
|
String |
getIdAttribute()
Returns the attribute that the id will be persisted to.
|
getId, getIdType
getJavaType, isNew
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId, getIdType, isNew
getJavaType
public 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
- can be null.public String getCollectionName()
MongoEntityInformation
getCollectionName
in interface MongoEntityInformation<T,ID extends Serializable>
public String getIdAttribute()
MongoEntityInformation
getIdAttribute
in interface MongoEntityInformation<T,ID extends Serializable>
Copyright © 2011-2015–2015 Pivotal Software, Inc.. All rights reserved.