|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.datastore.mapping.AbstractPersistentEntity<T>
public abstract class AbstractPersistentEntity<T>
Abstract implementation to be subclasses on a per datastore basis
| Field Summary | |
|---|---|
protected List<Association> |
associations
|
protected MappingContext |
context
|
protected PersistentProperty |
identity
|
protected Class |
javaClass
|
protected Set |
owners
|
protected List<PersistentProperty> |
persistentProperties
|
protected List<String> |
persistentPropertyNames
|
protected Map<String,PersistentProperty> |
propertiesByName
|
| Constructor Summary | |
|---|---|
AbstractPersistentEntity(Class javaClass,
MappingContext context)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
List<Association> |
getAssociations()
A list of the associations for this entity. |
String |
getDecapitalizedName()
|
String |
getDiscriminator()
The discriminator used when persisting subclasses of an inheritance hierarchy |
PersistentProperty |
getIdentity()
Returns the identity of the instance |
Class |
getJavaClass()
|
ClassMapping<T> |
getMapping()
Defines the mapping between this persistent entity and an external form |
MappingContext |
getMappingContext()
Obtains the MappingContext where this PersistentEntity is defined |
String |
getName()
The entity name including any package prefix |
PersistentEntity |
getParentEntity()
Returns the parent entity of this entity |
List<PersistentProperty> |
getPersistentProperties()
A list of properties to be persisted |
List<String> |
getPersistentPropertyNames()
A list of property names that a persistent |
PersistentProperty |
getPropertyByName(String name)
Obtains a PersistentProperty instance by name |
PersistentEntity |
getRootEntity()
Obtains the root entity of an inheritance hierarchy |
int |
hashCode()
|
boolean |
hasProperty(String name,
Class type)
Checks whether an entity has a bean property of the given name and type |
void |
initialize()
Call to initialize the object |
boolean |
isInstance(Object obj)
Tests whether the given instance is an instance of this persistent entity |
boolean |
isOwningEntity(PersistentEntity owner)
Returns whether the specified entity asserts ownership over this entity |
boolean |
isRoot()
Whether this entity is a root entity |
Object |
newInstance()
Constructs a new instance |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Class javaClass
protected List<PersistentProperty> persistentProperties
protected List<Association> associations
protected Map<String,PersistentProperty> propertiesByName
protected MappingContext context
protected PersistentProperty identity
protected List<String> persistentPropertyNames
protected Set owners
| Constructor Detail |
|---|
public AbstractPersistentEntity(Class javaClass,
MappingContext context)
| Method Detail |
|---|
public MappingContext getMappingContext()
PersistentEntity
getMappingContext in interface PersistentEntitypublic void initialize()
Initializable
initialize in interface Initializable
public boolean hasProperty(String name,
Class type)
PersistentEntity
hasProperty in interface PersistentEntityname - The nametype - The type
public PersistentEntity getParentEntity()
PersistentEntity
getParentEntity in interface PersistentEntitypublic String getDiscriminator()
PersistentEntity
getDiscriminator in interface PersistentEntitypublic PersistentEntity getRootEntity()
PersistentEntity
getRootEntity in interface PersistentEntitypublic boolean isRoot()
PersistentEntity
isRoot in interface PersistentEntitypublic boolean isOwningEntity(PersistentEntity owner)
PersistentEntity
isOwningEntity in interface PersistentEntityowner - The owning entity
public String getDecapitalizedName()
getDecapitalizedName in interface PersistentEntitypublic List<String> getPersistentPropertyNames()
PersistentEntity
getPersistentPropertyNames in interface PersistentEntitypublic ClassMapping<T> getMapping()
PersistentEntity
getMapping in interface PersistentEntitypublic Object newInstance()
PersistentEntity
newInstance in interface PersistentEntitypublic String getName()
PersistentEntity
getName in interface PersistentEntitypublic PersistentProperty getIdentity()
PersistentEntity
getIdentity in interface PersistentEntitypublic Class getJavaClass()
getJavaClass in interface PersistentEntitypublic boolean isInstance(Object obj)
PersistentEntity
isInstance in interface PersistentEntityobj - The object
public List<PersistentProperty> getPersistentProperties()
PersistentEntity
getPersistentProperties in interface PersistentEntitypublic List<Association> getAssociations()
PersistentEntityPersistentEntity.getPersistentProperties()
getAssociations in interface PersistentEntitypublic PersistentProperty getPropertyByName(String name)
PersistentEntity
getPropertyByName in interface PersistentEntityname - The name of the property
public int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||