|
||||||||||
| 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 UjoProperty" 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 UjoProperty<Person,String > NAME = newProperty("name" , String.class); public static final UjoProperty<Person,Boolean> MALE = newProperty("male" , Boolean.class); public static final UjoProperty<Person,Date > BIRTH = newProperty("birth", Date.class); }
Property| Field Summary | |
|---|---|
protected java.util.HashMap<UjoProperty,java.lang.Object> |
data
Object data |
| Constructor Summary | |
|---|---|
|
MapUjo()
Constructor |
protected |
MapUjo(java.util.HashMap<UjoProperty,java.lang.Object> aData)
Constructor |
| Method Summary | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
protected static
|
newListProperty(java.lang.String name,
java.lang.Class<ITEM> type)
A ListProperty Factory Method assigns a next property index. |
||||||||||||||||||||||||
static
|
newProperty(java.lang.String name,
java.lang.Class<VALUE> type)
Returns a new instance of property where the default value is null. |
||||||||||||||||||||||||
protected static
|
newProperty(java.lang.String name,
VALUE value)
A Property Factory Method assigns a next property index. |
||||||||||||||||||||||||
static
|
newProperty(UjoProperty p,
int index)
Returns a new instance of property where the default value is null. |
||||||||||||||||||||||||
protected static
|
newPropertyList(java.lang.String name,
java.lang.Class<ITEM> type)
Deprecated. Use newListProperty(...) instead of. |
||||||||||||||||||||||||
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 |
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
dataprotected final java.util.HashMap<UjoProperty,java.lang.Object> data
MapUjopublic MapUjo()
MapUjoprotected MapUjo(java.util.HashMap<UjoProperty,java.lang.Object> aData)
writeValuepublic void writeValue(UjoProperty property, java.lang.Object value)
readValuepublic java.lang.Object readValue(UjoProperty property)
newPropertypublic static <UJO extends MapUjo,VALUE> Property<UJO,VALUE> newProperty(java.lang.String name, java.lang.Class<VALUE> type)
newPropertyprotected static <UJO extends MapUjo,VALUE> Property<UJO,VALUE> newProperty(java.lang.String name, VALUE value)
newPropertypublic static <UJO extends MapUjo,VALUE> Property<UJO,VALUE> newProperty(UjoProperty p, int index)
newListPropertyprotected static <UJO extends MapUjo,ITEM> ListProperty<UJO,ITEM> newListProperty(java.lang.String name, java.lang.Class<ITEM> type)
newPropertyListprotected static final <UJO extends MapUjo,ITEM> ListProperty<UJO,ITEM> newPropertyList(java.lang.String name, java.lang.Class<ITEM> type)
Copyright © 2009. All Rights Reserved. | ||||||||||||||||||||||