Spring Data Document

org.springframework.data.document.mongodb.mapping
Class BasicMongoPersistentEntity<T>

java.lang.Object
  extended by org.springframework.data.mapping.BasicPersistentEntity<T,MongoPersistentProperty>
      extended by org.springframework.data.document.mongodb.mapping.BasicMongoPersistentEntity<T>
All Implemented Interfaces:
MongoPersistentEntity<T>, org.springframework.data.mapping.model.PersistentEntity<T,MongoPersistentProperty>, org.springframework.data.mapping.MutablePersistentEntity<T,MongoPersistentProperty>

public class BasicMongoPersistentEntity<T>
extends org.springframework.data.mapping.BasicPersistentEntity<T,MongoPersistentProperty>
implements MongoPersistentEntity<T>

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
 
Fields inherited from class org.springframework.data.mapping.BasicPersistentEntity
associations, idProperty, information, persistentProperties, preferredConstructor
 
Constructor Summary
BasicMongoPersistentEntity(org.springframework.data.util.TypeInformation<T> typeInformation)
          Creates a new BasicMongoPersistentEntity with the given TypeInformation.
 
Method Summary
 String getCollection()
          Returns the collection the entity should be stored in.
 void verify()
           
 
Methods inherited from class org.springframework.data.mapping.BasicPersistentEntity
addAssociation, addPersistentProperty, doWithAssociations, doWithProperties, getAssociations, getIdProperty, getName, getPersistentProperties, getPersistentProperty, getPersistentPropertyNames, getPreferredConstructor, getType, getTypeInformation, setIdProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.data.mapping.model.PersistentEntity
doWithAssociations, doWithProperties, getAssociations, getIdProperty, getName, getPersistentProperties, getPersistentProperty, getPersistentPropertyNames, getPreferredConstructor, getType, getTypeInformation
 

Constructor Detail

BasicMongoPersistentEntity

public BasicMongoPersistentEntity(org.springframework.data.util.TypeInformation<T> typeInformation)
Creates a new BasicMongoPersistentEntity with the given TypeInformation. Will default the collection name to the entities simple type name.

Parameters:
typeInformation -
Method Detail

getCollection

public String getCollection()
Returns the collection the entity should be stored in.

Specified by:
getCollection in interface MongoPersistentEntity<T>
Returns:

verify

public void verify()
Specified by:
verify in interface org.springframework.data.mapping.MutablePersistentEntity<T,MongoPersistentProperty>
Overrides:
verify in class org.springframework.data.mapping.BasicPersistentEntity<T,MongoPersistentProperty>

Spring Data Document

Copyright © 2011. All Rights Reserved.