|
|||||||||
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 PersistentEntity
public void initialize()
Initializable
initialize
in interface Initializable
public boolean hasProperty(String name, Class type)
PersistentEntity
hasProperty
in interface PersistentEntity
name
- The nametype
- The type
public PersistentEntity getParentEntity()
PersistentEntity
getParentEntity
in interface PersistentEntity
public String getDiscriminator()
PersistentEntity
getDiscriminator
in interface PersistentEntity
public PersistentEntity getRootEntity()
PersistentEntity
getRootEntity
in interface PersistentEntity
public boolean isRoot()
PersistentEntity
isRoot
in interface PersistentEntity
public boolean isOwningEntity(PersistentEntity owner)
PersistentEntity
isOwningEntity
in interface PersistentEntity
owner
- The owning entity
public String getDecapitalizedName()
getDecapitalizedName
in interface PersistentEntity
public List<String> getPersistentPropertyNames()
PersistentEntity
getPersistentPropertyNames
in interface PersistentEntity
public ClassMapping<T> getMapping()
PersistentEntity
getMapping
in interface PersistentEntity
public Object newInstance()
PersistentEntity
newInstance
in interface PersistentEntity
public String getName()
PersistentEntity
getName
in interface PersistentEntity
public PersistentProperty getIdentity()
PersistentEntity
getIdentity
in interface PersistentEntity
public Class getJavaClass()
getJavaClass
in interface PersistentEntity
public boolean isInstance(Object obj)
PersistentEntity
isInstance
in interface PersistentEntity
obj
- The object
public List<PersistentProperty> getPersistentProperties()
PersistentEntity
getPersistentProperties
in interface PersistentEntity
public List<Association> getAssociations()
PersistentEntity
PersistentEntity.getPersistentProperties()
getAssociations
in interface PersistentEntity
public PersistentProperty getPropertyByName(String name)
PersistentEntity
getPropertyByName
in interface PersistentEntity
name
- The name of the property
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |