|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.pimento.metadata.PropertyMetadata
public class PropertyMetadata
The metadata for a single property of a persistent entity.
| Constructor Summary | |
|---|---|
PropertyMetadata()
Creates a new instance. |
|
PropertyMetadata(String name,
PropertyType type,
Property property)
Creates a new instance |
|
| Method Summary | |
|---|---|
Object |
convertValue(Object value)
Converts the value of this property so that it can be applied to an entity. |
String |
getName()
Returns the name of the property. |
Object |
getValue(Object entity)
Retrieve the value of this property for the specified entity. |
Object |
getValueForSnapshot(Object entity,
IoContext context,
FetchMode fetchMode)
Reads the specified property from the given entity and returns it in a form suitable for inclusion in an entity snapshot. |
boolean |
isReadOnly()
Checks whether this property was marked as read-only. |
boolean |
isRefreshable()
Checks whether this property was marked as refreshable. |
Object |
prepareValueFromSnapshot(Object entity,
Object value,
IoContext context,
boolean createChangeSet)
Prepares the specified property value, performing all necessary conversions, but without actually applying it to the specified entity. |
void |
readExternal(DataInput input)
Restores the content of this object from the DataInput instance. |
void |
setValue(Object entity,
Object value)
Sets the specified property value of the given entity. |
void |
writeExternal(DataOutput output)
Saves the content of this object to the DataOutput instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyMetadata(String name,
PropertyType type,
Property property)
name - the name of the propertytype - the type of the propertyproperty - the reflection instancepublic PropertyMetadata()
| Method Detail |
|---|
public String getName()
public Object getValue(Object entity)
entity - the entity to retrieve the value for
public Object convertValue(Object value)
value - the value to convert
public Object getValueForSnapshot(Object entity,
IoContext context,
FetchMode fetchMode)
entity - the entity to extract the property value fromcontext - the active IoContextfetchMode - the fetch mode to use
public Object prepareValueFromSnapshot(Object entity,
Object value,
IoContext context,
boolean createChangeSet)
entity - the entity to prepare the property forvalue - the new value for the propertycontext - the active IoContextcreateChangeSet - whether a change set is being created
public void setValue(Object entity,
Object value)
entity - the entity to set the property forvalue - the new value for the propertypublic boolean isRefreshable()
public boolean isReadOnly()
public void readExternal(DataInput input)
Externalizable
readExternal in interface Externalizableinput - the AMF3 data to read frompublic void writeExternal(DataOutput output)
Externalizable
writeExternal in interface Externalizableoutput - the output to write to
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||