org.springframework.datastore.mapping
Class AbstractPersistentProperty

java.lang.Object
  extended by org.springframework.datastore.mapping.AbstractPersistentProperty
All Implemented Interfaces:
PersistentProperty
Direct Known Subclasses:
Association, Identity, Simple

public abstract class AbstractPersistentProperty
extends Object
implements PersistentProperty

Abstract implementation of the PersistentProperty interface that uses the PropertyDescriptor instance to establish name and type

Since:
1.0

Field Summary
protected  MappingContext context
           
protected  String name
           
protected  PersistentEntity owner
           
protected  Class type
           
 
Constructor Summary
AbstractPersistentProperty(PersistentEntity owner, MappingContext context, PropertyDescriptor descriptor)
           
AbstractPersistentProperty(PersistentEntity owner, MappingContext context, String name, Class type)
           
 
Method Summary
 String getCapitilizedName()
          The name with the first letter in upper case as per Java bean conventions
 String getName()
          The name of the property
 PersistentEntity getOwner()
          Obtains the owner of this persistent property
 Class getType()
          The type of the property
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.datastore.mapping.PersistentProperty
getMapping
 

Field Detail

owner

protected PersistentEntity owner

context

protected MappingContext context

name

protected String name

type

protected Class type
Constructor Detail

AbstractPersistentProperty

public AbstractPersistentProperty(PersistentEntity owner,
                                  MappingContext context,
                                  PropertyDescriptor descriptor)

AbstractPersistentProperty

public AbstractPersistentProperty(PersistentEntity owner,
                                  MappingContext context,
                                  String name,
                                  Class type)
Method Detail

getName

public String getName()
Description copied from interface: PersistentProperty
The name of the property

Specified by:
getName in interface PersistentProperty
Returns:
The property name

getCapitilizedName

public String getCapitilizedName()
Description copied from interface: PersistentProperty
The name with the first letter in upper case as per Java bean conventions

Specified by:
getCapitilizedName in interface PersistentProperty
Returns:
The capitilized name

getType

public Class getType()
Description copied from interface: PersistentProperty
The type of the property

Specified by:
getType in interface PersistentProperty
Returns:
The property type

getOwner

public PersistentEntity getOwner()
Description copied from interface: PersistentProperty
Obtains the owner of this persistent property

Specified by:
getOwner in interface PersistentProperty
Returns:
The owner

toString

public String toString()
Overrides:
toString in class Object