|
UJO Framework release 0.85.00 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.ujoframework.extensions.AbstractUjo
org.ujoframework.implementation.map.MapUjo
public abstract class MapUjo
This is a simple abstract implementation of Ujo.
Child implementation can use "public static final MapProperty" constants for its UjoProperties.
The code syntax is Java 1.5 complied.
Features: very simple implementaton and a sufficient performance for common tasks. The architecture is useful for a rare assignment of values in object too.
import org.ujoframework.implementation.map.*; public class Person extends MapUjo { public static final MapProperty <Person,String > NAME = newProperty("name" , String.class); public static final MapProperty <Person,Boolean> MALE = newProperty("male" , Boolean.class); public static final MapProperty <Person,Date > BIRTH = newProperty("birth", Date.class); }
MapProperty| Field Summary | |
|---|---|
protected java.util.HashMap<UjoProperty,java.lang.Object> |
data
Object data |
| Fields inherited from class org.ujoframework.extensions.AbstractUjo |
|---|
_propertyIndex |
| Constructor Summary | |
|---|---|
|
MapUjo()
Constructor |
protected |
MapUjo(java.util.HashMap<UjoProperty,java.lang.Object> aData)
Constructor |
| Method Summary | ||
|---|---|---|
protected static
|
newProperty(java.lang.String name,
java.lang.Class<VALUE> type)
A Property Factory, a default value is null. |
|
protected static
|
newProperty(java.lang.String name,
VALUE value)
A Property Factory Method assigns a next property index. |
|
protected static
|
newPropertyList(java.lang.String name,
java.lang.Class<ITEM> type)
A PropertyList Factory Method assigns a next property index. |
|
java.lang.Object |
readValue(UjoProperty property)
It is a common method for reading all object values, however there is strongly recomended to use a method MapProperty.getValue(Ujo) to an external access for a better type safe. |
|
void |
writeValue(UjoProperty property,
java.lang.Object value)
It is a common method for writing all object values, however there is strongly recomended to use a method MapProperty.setValue(Ujo,Object) to an external access for a better type safe. |
|
| Methods inherited from class org.ujoframework.extensions.AbstractUjo |
|---|
_nextPropertyIndex, clone, equals, readAuthorization, readProperties, readUjoManager, readValueString, toString, writeValueString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final java.util.HashMap<UjoProperty,java.lang.Object> data
| Constructor Detail |
|---|
public MapUjo()
protected MapUjo(java.util.HashMap<UjoProperty,java.lang.Object> aData)
| Method Detail |
|---|
public void writeValue(UjoProperty property,
java.lang.Object value)
property - Property must be a direct type only!AbstractProperty.setValue(Ujo,Object)public java.lang.Object readValue(UjoProperty property)
property - Property must be a direct type only!
AbstractProperty.getValue(Ujo)
protected static <UJO extends Ujo,VALUE> MapProperty<UJO,VALUE> newProperty(java.lang.String name,
java.lang.Class<VALUE> type)
protected static <UJO extends Ujo,VALUE> MapProperty<UJO,VALUE> newProperty(java.lang.String name,
VALUE value)
protected static <UJO extends Ujo,ITEM> MapPropertyList<UJO,ITEM> newPropertyList(java.lang.String name,
java.lang.Class<ITEM> type)
|
UJO Framework release 0.85.00 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||