|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujoframework.extensions.Property<UJO,VALUE>
public class Property<UJO extends Ujo,VALUE>
The main implementation of the interface UjoProperty.
AbstractUjo| Constructor Summary | |
|---|---|
protected |
Property()
Protected constructor |
protected |
Property(java.lang.String name,
java.lang.Class<VALUE> type,
int index)
Constructor with an property order |
protected |
Property(java.lang.String name,
VALUE value,
int index)
Constructor with an property order |
| Method Summary | ||
|---|---|---|
protected static int |
_nextSequence()
Returns a next property index by a synchronized method. |
|
|
add(UjoProperty<? extends VALUE,VALUE_PAR> property)
Create new composite (indirect) instance. |
|
int |
compareTo(UjoProperty p)
Compare to another UjoProperty object by a index code. |
|
void |
copy(UJO from,
UJO to)
Copy a value from the first UJO object to second one. |
|
UjoProperty<UJO,VALUE> |
descending()
Create a new instance of the indirect property with a descending direction of order. |
|
boolean |
equals(UJO ujo,
VALUE value)
Returns true, if the property value equals to a parameter value. |
|
VALUE |
getDefault()
Returns a Default property value. |
|
int |
getIndex()
Index of Property |
|
java.lang.String |
getName()
Name of Property |
|
java.lang.Class<VALUE> |
getType()
Type of Property |
|
VALUE |
getValue(UJO ujo)
It is a basic method for getting an appropriate type safe value from an MapUjo object. |
|
char |
charAt(int index)
A char from Name |
|
protected void |
checkAttribs()
Check properties |
|
protected Property<UJO,VALUE> |
init(java.lang.String name,
java.lang.Class<VALUE> type,
VALUE defaultValue,
int index,
java.lang.Boolean lock)
Property initialization. |
|
boolean |
isAscending()
A flag for a direction of sorting. |
|
boolean |
isDefault(UJO ujo)
Indicates whether a parameter value of the ujo "equal to" this default value. |
|
boolean |
isDirect()
Returns a true value, if the property contains more properties. |
|
boolean |
isTypeOf(java.lang.Class type)
Returns true if the property type is a type or subtype of the parameter class. |
|
int |
length()
Length of the Name |
|
static
|
newInstance(java.lang.String name,
java.lang.Class<VALUE> type)
Returns a new instance of property where the default value is null. |
|
static
|
newInstance(java.lang.String name,
java.lang.Class<VALUE> type,
int index)
Returns a new instance of property where the default value is null. |
|
static
|
newInstance(java.lang.String name,
java.lang.Class<VALUE> type,
VALUE value,
int index,
boolean lock)
Returns a new instance of property where the default value is null. |
|
static
|
newInstance(java.lang.String name,
VALUE value)
A Property Factory where a property type is related from from default value. |
|
static
|
newInstance(java.lang.String name,
VALUE value,
int index)
A Property Factory where a property type is related from from default value. |
|
static
|
newInstance(UjoProperty p)
A Property Factory where a property type is related from from default value. |
|
static
|
newInstance(UjoProperty p,
int index)
A Property Factory where a property type is related from from default value. |
|
VALUE |
of(UJO ujo)
A shortcut for the method getValue(Ujo). |
|
void |
setValue(UJO ujo,
VALUE value)
It is a basic method for setting an appropriate type safe value to an MapUjo object. |
|
void |
setValueFromDefault(UJO ujo)
Assing a value from the default value. |
|
java.lang.CharSequence |
subSequence(int start,
int end)
Sub sequence from the Name |
|
java.lang.String |
toString()
Returns a name of Property |
|
|
writeDefault(VALUE value)
Assign a Default value. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Property(java.lang.String name,
java.lang.Class<VALUE> type,
int index)
name - type - index - On order of the property.
protected Property(java.lang.String name,
VALUE value,
int index)
name - index - On order of the property.protected Property()
| Method Detail |
|---|
protected static final int _nextSequence()
protected final Property<UJO,VALUE> init(java.lang.String name,
java.lang.Class<VALUE> type,
VALUE defaultValue,
int index,
java.lang.Boolean lock)
name - Replace the Name of property if the one is NULL.index - Replace index always, the value -1 invoke a next number from the internal sequencer.type - Replace the Type of property if the one is NULL.defaultValue - Replace the Optional default value if the one is NULL.lock - Lock the property.protected void checkAttribs()
public final java.lang.String getName()
getName in interface UjoProperty<UJO extends Ujo,VALUE>public final java.lang.Class<VALUE> getType()
getType in interface UjoProperty<UJO extends Ujo,VALUE>public final int getIndex()
getIndex in interface UjoProperty<UJO extends Ujo,VALUE>ArrayUjo,
UjoManager.readProperties(Class)
public final void setValue(UJO ujo,
VALUE value)
Ujo.writeValue(org.ujoframework.UjoProperty, java.lang.Object)
setValue in interface UjoProperty<UJO extends Ujo,VALUE>Ujo.writeValue(org.ujoframework.UjoProperty, java.lang.Object)public final VALUE getValue(UJO ujo)
Ujo.readValue(org.ujoframework.UjoProperty)
.
getValue in interface UjoProperty<UJO extends Ujo,VALUE>ujo - If a NULL parameter is used then an exception NullPointerException is throwed.
Ujo.readValue(UjoProperty)public final VALUE of(UJO ujo)
of in interface UjoProperty<UJO extends Ujo,VALUE>getValue(Ujo)public VALUE getDefault()
null value in the method Ujo.readValue(...).
If the default value is not modified, returns the null.
- Specified by:
getDefault in interface UjoProperty<UJO extends Ujo,VALUE>
- See Also:
Ujo.readValue(UjoProperty)
public <PROPERTY extends Property> PROPERTY writeDefault(VALUE value)
public void setValueFromDefault(UJO ujo)
public boolean isDefault(UJO ujo)
isDefault in interface UjoProperty<UJO extends Ujo,VALUE>public final boolean isDirect()
isDirect in interface UjoProperty<UJO extends Ujo,VALUE>public boolean isAscending()
isAscending in interface UjoProperty<UJO extends Ujo,VALUE>UjoComparatorpublic UjoProperty<UJO,VALUE> descending()
descending in interface UjoProperty<UJO extends Ujo,VALUE>isAscending(),
UjoComparatorpublic <VALUE_PAR> UjoProperty<UJO,VALUE_PAR> add(UjoProperty<? extends VALUE,VALUE_PAR> property)
add in interface UjoProperty<UJO extends Ujo,VALUE>
public void copy(UJO from,
UJO to)
copy in interface UjoProperty<UJO extends Ujo,VALUE>public boolean isTypeOf(java.lang.Class type)
isTypeOf in interface UjoProperty<UJO extends Ujo,VALUE>
public boolean equals(UJO ujo,
VALUE value)
equals in interface UjoProperty<UJO extends Ujo,VALUE>ujo - A basic Ujo.value - Null value is supported.
public int compareTo(UjoProperty p)
public char charAt(int index)
charAt in interface java.lang.CharSequencepublic int length()
length in interface java.lang.CharSequence
public java.lang.CharSequence subSequence(int start,
int end)
subSequence in interface java.lang.CharSequencepublic final java.lang.String toString()
toString in interface java.lang.CharSequencetoString in interface UjoProperty<UJO extends Ujo,VALUE>toString in class java.lang.Object
public static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newInstance(java.lang.String name,
java.lang.Class<VALUE> type,
VALUE value,
int index,
boolean lock)
public static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newInstance(java.lang.String name,
java.lang.Class<VALUE> type,
int index)
public static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newInstance(java.lang.String name,
java.lang.Class<VALUE> type)
public static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newInstance(java.lang.String name,
VALUE value,
int index)
public static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newInstance(java.lang.String name,
VALUE value)
public static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newInstance(UjoProperty p,
int index)
public static <UJO extends Ujo,VALUE> UjoProperty<UJO,VALUE> newInstance(UjoProperty p)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||