org.ujoframework
Interface UjoProperty<UJO extends Ujo,VALUE>

Package class diagram package UjoProperty
All Superinterfaces:
java.lang.CharSequence
All Known Subinterfaces:
ListProperty<UJO,ITEM>, UjoPropertyList<UJO,LIST,ITEM>
All Known Implementing Classes:
ArrayProperty, ArrayPropertyList, BeanProperty, BeanPropertyList, MapProperty, MapPropertyList, PathProperty, SuperProperty, SuperPropertyList

public interface UjoProperty<UJO extends Ujo,VALUE>
extends java.lang.CharSequence

Ujo property is a property of Ujo object. Every real Ujo implementation (ArrayUjo, MapUjo, BeanUjo) have got its special implementation of an UjoProperty interface.
See a general information about current framework or see some implementations.

See Also:
Ujo

Method Summary
 boolean equals(UJO ujo, VALUE value)
          Returns true, if the property value equals to a parameter value.
 VALUE getDefault()
          Method returns a default value for substitution of the null value for the current property.
 int getIndex()
          Returns a property index or value -1 if the property index is not defined.
 java.lang.String getName()
          Returns a name of Property.
 java.lang.Class<VALUE> getType()
          Returns a class of the current property.
 VALUE getValue(UJO ujo)
          It is a basic method for getting an appropriate type safe value from an Ujo object.
 boolean isDirect()
          If the property is the direct property of the related UJO class then method returns the TRUE value.
 VALUE of(UJO ujo)
          An alias for getValue(Ujo) .
 void setValue(UJO ujo, VALUE value)
          It is a basic method for setting an appropriate type safe value to an Ujo object.
 java.lang.String toString()
          Returns a name of Property.
 
Methods inherited from interface java.lang.CharSequence
charAt, length, subSequence
 

Method Detail

getName

java.lang.String getName()
Returns a name of Property.


getType

java.lang.Class<VALUE> getType()
Returns a class of the current property.


setValue

void setValue(UJO ujo,
              VALUE value)
It is a basic method for setting an appropriate type safe value to an Ujo object.
The method calls a method Ujo.writeValue(UjoProperty, Object) allways.

See Also:
Ujo.writeValue(UjoProperty,Object)

getValue

VALUE getValue(UJO ujo)
It is a basic method for getting an appropriate type safe value from an Ujo object.
The method calls a method Ujo.readValue(UjoProperty) allways.

See Also:
Ujo.readValue(UjoProperty)

of

VALUE of(UJO ujo)
An alias for getValue(Ujo) .

See Also:
getValue(Ujo)

getIndex

int getIndex()
Returns a property index or value -1 if the property index is not defined.
The index is reasonable for an implementation an ArrayUjo class and the value is used is used
for a sorting of Properties in a method UjoManager.readProperties(Class type) .

See Also:
ArrayUjo, UjoManager.readProperties(Class)

getDefault

VALUE getDefault()
Method returns a default value for substitution of the null value for the current property. The feature is purposeful only if the default value is not null and a propert value is null .

See Also:
Ujo.readValue(UjoProperty)

equals

boolean equals(UJO ujo,
               VALUE value)
Returns true, if the property value equals to a parameter value. The property value can be null.

Parameters:
ujo - A basic Ujo.
value - Null value is supported.
Returns:
Accordance

isDirect

boolean isDirect()
If the property is the direct property of the related UJO class then method returns the TRUE value. Indirect (composite) properties are excluded from from function Ujo.readProperties() by default and these properties should not be sent to methods Ujo.writeValue() and Ujo.readValue().

Since:
0.81

toString

java.lang.String toString()
Returns a name of Property.

Specified by:
toString in interface java.lang.CharSequence
Overrides:
toString in class java.lang.Object


Copyright © 2007-2008 PPonec