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

java.lang.Objectorg.ujoframework.extensions.SuperUjo
org.ujoframework.implementation.array.ArrayUjo
public abstract class ArrayUjo
This is a very fast abstract implementation of Ujo.
For implementation define only a "public static final ArrayUjoProperty" constants and a "readPropertyCount()" method in a child class.
The code syntax is Java 1.5 complied.
All properties must be objects (no primitive types) in the current version of UJO Framework.
Features: very good performance, an order of properties from "readProperties()" method is guaranteed and independed on a Java implementation.
import org.ujoframework.implementation.array.*; public class Person extends ArrayUjo { protected static int propertyCount = ArrayUjo.propertyCount; public static final ArrayProperty <Person,String > NAME = newProperty("name" , String.class , propertyCount++); public static final ArrayProperty <Person,Boolean> MALE = newProperty("male" , Boolean.class, propertyCount++); public static final ArrayProperty <Person,Date > BIRTH = newProperty("birth", Date.class , propertyCount++); @Override public int readPropertyCount() { return propertyCount; } }
ArrayProperty| Field Summary | |
|---|---|
protected java.lang.Object[] |
data
Object data |
protected static int |
propertyCount
An Incrementator. |
| Constructor Summary | |
|---|---|
ArrayUjo()
Constructor |
|
| Method Summary | ||
|---|---|---|
protected java.lang.Object[] |
initData()
The method is called from top constructor. |
|
protected static
|
newProperty(java.lang.String name,
java.lang.Class<VALUE> type,
int index)
A Property Factory |
|
protected static
|
newProperty(java.lang.String name,
VALUE value,
int index)
A Property Factory |
|
protected static
|
newPropertyList(java.lang.String name,
java.lang.Class<ITEM> type,
int index)
A PropertyList Factory |
|
abstract int |
readPropertyCount()
Return a count of properties. |
|
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 ArrayProperty.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 ArrayProperty.setValue(Ujo,Object) to an external access for a better type safe. |
|
| Methods inherited from class org.ujoframework.extensions.SuperUjo |
|---|
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 static final int propertyCount
/** An Incrementator. Use a new counter for each subclass. */ protected static int propertyCount = [SuperClass].propertyCount;
protected java.lang.Object[] data
| Constructor Detail |
|---|
public ArrayUjo()
| Method Detail |
|---|
protected java.lang.Object[] initData()
public abstract int readPropertyCount()
public void writeValue(UjoProperty property,
java.lang.Object value)
property - Property must be a direct type only!SuperProperty.setValue(Ujo,Object)public java.lang.Object readValue(UjoProperty property)
property - Property must be a direct type only!
SuperProperty.getValue(Ujo)
protected static <UJO extends Ujo,VALUE> ArrayProperty<UJO,VALUE> newProperty(java.lang.String name,
java.lang.Class<VALUE> type,
int index)
protected static <UJO extends Ujo,VALUE> ArrayProperty<UJO,VALUE> newProperty(java.lang.String name,
VALUE value,
int index)
protected static <UJO extends Ujo,ITEM> ArrayPropertyList<UJO,ITEM> newPropertyList(java.lang.String name,
java.lang.Class<ITEM> type,
int index)
|
UJO Framework release 0.81 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||