org.springframework.data.document.mongodb.mapping
Class MongoPersistentEntity<T>
java.lang.Object
org.springframework.data.document.mongodb.mapping.MongoPersistentEntity<T>
public class MongoPersistentEntity<T>
- extends
Mongo specific PersistentEntity
implementation that adds Mongo specific meta-data such as the collection name
and the like.
- Author:
- Jon Brisbin , Oliver Gierke
Field Summary |
protected java.lang.String |
collection
|
Method Summary |
java.lang.String |
getCollection()
Returns the collection the entity should be stored in. |
void |
setCollection(java.lang.String collection)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
collection
protected java.lang.String collection
MongoPersistentEntity
public MongoPersistentEntity(MappingContext mappingContext,
TypeInformation typeInformation)
- Creates a new
MongoPersistentEntity
with the given MappingContext
and TypeInformation
. Will
default the collection name to the entities simple type name.
- Parameters:
mappingContext
- typeInformation
-
getCollection
public java.lang.String getCollection()
- Returns the collection the entity should be stored in.
- Returns:
setCollection
public void setCollection(java.lang.String collection)