|
Ujorm release 1.22 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujorm.extensions.PathProperty<UJO,VALUE>
public final class PathProperty<UJO extends Ujo,VALUE>
A PathProperty class is an composite of a UjoProperty objects. The PathProperty class can be used wherever is used UjoProperty - with a one important exception: do not send the PathProperty object to methods Ujo.readValue(...) and Ujo.writeValue(...) !!!
Note that method isDirect() returns a false in this class. For this reason, the property is not included in the list returned by Ujo.readProperties().
| Constructor Summary | |
|---|---|
PathProperty(java.lang.Boolean ascending,
UjoProperty... properties)
Main constructor |
|
PathProperty(java.util.List<UjoProperty> properties)
|
|
PathProperty(UjoProperty... properties)
The main constructor. |
|
| Method Summary | ||
|---|---|---|
|
add(UjoProperty<? extends VALUE,VALUE_PAR> property)
Create new composite (indirect) instance. |
|
int |
compareTo(UjoProperty p)
Compare to another UjoProperty object by the index and name of the property. |
|
void |
copy(UJO from,
UJO to)
Copy a value from the first UJO object to second one. |
|
static
|
create(UjoProperty<UJO,? extends java.lang.Object>... properties)
Create new instance |
|
UjoProperty<UJO,VALUE> |
descending()
Create a new instance of the property with a descending direction of order. |
|
UjoProperty<UJO,VALUE> |
descending(boolean descending)
Create a new instance of the property with a descending direction of order. |
|
boolean |
equals(java.lang.Object property)
Returns true, if the property value equals to a parameter value. |
|
boolean |
equals(UJO ujo,
VALUE value)
Returns true, if the property value equals to a parameter value. |
|
boolean |
equalsName(java.lang.CharSequence name)
Returns true, if the property name equals to the parameter value. |
|
void |
exportProperties(java.util.List<UjoProperty> result)
Export all |
|
Criterion<UJO> |
forAll()
Create a new Criterion for this property where all results will be true (the result is independed on the value). |
|
Criterion<UJO> |
forNone()
Create a new Criterion for this property where all results will be false (the result is independed on the value). |
|
Criterion<UJO> |
forSql(java.lang.String sqlCondition)
Create a new Criterion for a Native Criterion in SQL statement format. |
|
VALUE |
getDefault()
Returns a default value |
|
|
getFirstProperty()
Get the first property of the current object. |
|
int |
getIndex()
Returns a property index or value -1 if the property index is not defined. |
|
|
getLastPartialProperty()
Get the last property of the current object. |
|
|
getLastProperty()
Get the first property of the current object. |
|
java.lang.String |
getName()
Full property name |
|
Ujo |
getSemifinalValue(UJO ujo)
Get a semifinal value from an Ujo object by a chain of properties. |
|
java.lang.Class<VALUE> |
getType()
Property type |
|
VALUE |
getValue(UJO ujo)
Get a value from an Ujo object by a chain of properties. |
|
int |
hashCode()
|
|
char |
charAt(int index)
A char from Name |
|
boolean |
isAscending()
A flag for an ascending direction of order. |
|
boolean |
isDefault(UJO ujo)
Indicates whether a parameter value of the ujo "equal to" this default value. |
|
boolean |
isDirect()
Method returns a false because this is a property of the another UJO class. |
|
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(UjoProperty<UJO1,UJO2> property1,
UjoProperty<UJO2,UJO3> property2,
UjoProperty<UJO3,UJO4> property3,
UjoProperty<UJO4,VALUE> property4)
Create new instance |
|
static
|
newInstance(UjoProperty<UJO1,UJO2> property1,
UjoProperty<UJO2,UJO3> property2,
UjoProperty<UJO3,VALUE> property3)
Create new instance |
|
static
|
newInstance(UjoProperty<UJO1,UJO2> property1,
UjoProperty<UJO2,VALUE> property2)
Quick instance for the direct properrites |
|
static
|
newInstance(UjoProperty<UJO,VALUE> property)
Quick instance for the direct property. |
|
static
|
newInstance(UjoProperty<UJO,VALUE> property,
boolean ascending)
Create a new instance of property with a new sort attribute 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 Ujo object. |
|
static
|
sort(UjoProperty<UJO,VALUE> property,
boolean ascending)
Create a new instance of property with a new sort attribute value. |
|
java.lang.CharSequence |
subSequence(int start,
int end)
Sub sequence from the Name |
|
java.lang.String |
toString()
Returns the name of Property. |
|
Criterion<UJO> |
where(Operator operator,
UjoProperty<?,VALUE> value)
Create a new Criterion where this property is related to the value along the parameter Operator. |
|
Criterion<UJO> |
where(Operator operator,
VALUE value)
Create a new Criterion where this property is related to the value along the parameter Operator. |
|
Criterion<UJO> |
whereEq(UjoProperty<UJO,VALUE> value)
Create a new Criterion where this property equals the property |
|
Criterion<UJO> |
whereEq(VALUE value)
Create a new Criterion where this property equals the value |
|
Criterion<UJO> |
whereGe(VALUE value)
Create a new Criterion where this property is great or equals the value |
|
Criterion<UJO> |
whereGt(VALUE value)
Create a new Criterion where this property is great then the value |
|
Criterion<UJO> |
whereIn(java.util.Collection<VALUE> list)
Create new Criterion for operator IN to compare value to a list of constants. |
|
Criterion<UJO> |
whereIn(VALUE... list)
Create new Criterion for operator IN to compare value to a list of constants |
|
Criterion<UJO> |
whereLe(VALUE value)
Create a new Criterion where this property is less or equals than the value |
|
Criterion<UJO> |
whereLt(VALUE value)
Create a new Criterion where this property is less then the value |
|
Criterion<UJO> |
whereNeq(VALUE value)
Create a new Criterion where this property not equals the value |
|
Criterion<UJO> |
whereNotIn(java.util.Collection<VALUE> list)
Create new Criterion for operator IN to compare value to a list of constants. |
|
Criterion<UJO> |
whereNotIn(VALUE... list)
Create new Criterion for operator IN to compare value to a list of constants. |
|
Criterion<UJO> |
whereNotNull()
Create a new Criterion where this property is not null. |
|
Criterion<UJO> |
whereNull()
Create a new Criterion where this property is null. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PathProperty(java.util.List<UjoProperty> properties)
public PathProperty(UjoProperty... properties)
newInstance(..)
for better performance in some cases.
newInstance(..)
public PathProperty(java.lang.Boolean ascending,
UjoProperty... properties)
| Method Detail |
|---|
public final <UJO_IMPL extends Ujo> UjoProperty<UJO_IMPL,VALUE> getLastPartialProperty()
public final <UJO_IMPL extends Ujo> UjoProperty<UJO_IMPL,VALUE> getLastProperty()
getLastProperty in interface CompositeProperty<UJO extends Ujo,VALUE>public final <UJO_IMPL extends Ujo> UjoProperty<UJO_IMPL,VALUE> getFirstProperty()
getFirstProperty in interface CompositeProperty<UJO extends Ujo,VALUE>public final java.lang.String getName()
getName in interface UjoProperty<UJO extends Ujo,VALUE>public java.lang.Class<VALUE> getType()
getType in interface UjoProperty<UJO extends Ujo,VALUE>public Ujo getSemifinalValue(UJO ujo)
getSemifinalValue in interface CompositeProperty<UJO extends Ujo,VALUE>public VALUE getValue(UJO ujo)
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 void setValue(UJO ujo,
VALUE value)
UjoPropertyUjo.writeValue(org.ujorm.UjoProperty, java.lang.Object)
always.
setValue in interface UjoProperty<UJO extends Ujo,VALUE>Ujo.writeValue(org.ujorm.UjoProperty, java.lang.Object)public final int getIndex()
UjoPropertyArrayUjo class and the value is used is used
UjoManager.readProperties(Class type) .
getIndex in interface UjoProperty<UJO extends Ujo,VALUE>ArrayUjo,
UjoManager.readProperties(Class)public VALUE getDefault()
getDefault in interface UjoProperty<UJO extends Ujo,VALUE>Ujo.readValue(UjoProperty)public boolean isDefault(UJO ujo)
isDefault 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 boolean equalsName(java.lang.CharSequence name)
equalsName in interface UjoProperty<UJO extends Ujo,VALUE>name - The name of a propertypublic boolean equals(java.lang.Object property)
equals in class java.lang.Objectproperty - A basic CujoProperty.value - Null value is supported.public int hashCode()
hashCode in class java.lang.Objectpublic final VALUE of(UJO ujo)
of in interface UjoProperty<UJO extends Ujo,VALUE>getValue(Ujo)public java.lang.String toString()
UjoProperty
toString in interface java.lang.CharSequencetoString in interface UjoProperty<UJO extends Ujo,VALUE>toString in class java.lang.Objectpublic int length()
length in interface java.lang.CharSequencepublic char charAt(int index)
charAt in interface java.lang.CharSequence
public java.lang.CharSequence subSequence(int start,
int end)
subSequence in interface java.lang.CharSequencepublic final boolean isDirect()
isDirect in interface UjoProperty<UJO extends Ujo,VALUE>CompositePropertypublic boolean isAscending()
isAscending in interface UjoProperty<UJO extends Ujo,VALUE>UjoComparatorpublic UjoProperty<UJO,VALUE> descending()
descending in interface UjoProperty<UJO extends Ujo,VALUE>UjoComparatorpublic UjoProperty<UJO,VALUE> descending(boolean descending)
descending in interface UjoProperty<UJO extends Ujo,VALUE>UjoComparatorpublic void exportProperties(java.util.List<UjoProperty> result)
exportProperties in interface CompositeProperty<UJO extends Ujo,VALUE>public <VALUE_PAR> CompositeProperty<UJO,VALUE_PAR> add(UjoProperty<? extends VALUE,VALUE_PAR> property)
add in interface UjoProperty<UJO extends Ujo,VALUE>public int compareTo(UjoProperty p)
compareTo in interface java.lang.Comparable<UjoProperty>compareTo in interface UjoProperty<UJO extends Ujo,VALUE>
public static <UJO extends Ujo,VALUE> PathProperty<UJO,VALUE> sort(UjoProperty<UJO,VALUE> property,
boolean ascending)
public static <UJO extends Ujo,VALUE> PathProperty<UJO,VALUE> newInstance(UjoProperty<UJO,VALUE> property,
boolean ascending)
sort().
sort(..)public static <UJO extends Ujo,VALUE> PathProperty<UJO,VALUE> newInstance(UjoProperty<UJO,VALUE> property)
public static <UJO1 extends Ujo,UJO2 extends Ujo,VALUE> PathProperty<UJO1,VALUE> newInstance(UjoProperty<UJO1,UJO2> property1,
UjoProperty<UJO2,VALUE> property2)
public static <UJO1 extends Ujo,UJO2 extends Ujo,UJO3 extends Ujo,VALUE> PathProperty<UJO1,VALUE> newInstance(UjoProperty<UJO1,UJO2> property1,
UjoProperty<UJO2,UJO3> property2,
UjoProperty<UJO3,VALUE> property3)
public static <UJO1 extends Ujo,UJO2 extends Ujo,UJO3 extends Ujo,UJO4 extends Ujo,VALUE> PathProperty<UJO1,VALUE> newInstance(UjoProperty<UJO1,UJO2> property1,
UjoProperty<UJO2,UJO3> property2,
UjoProperty<UJO3,UJO4> property3,
UjoProperty<UJO4,VALUE> property4)
public static <UJO extends Ujo,VALUE> PathProperty<UJO,VALUE> create(UjoProperty<UJO,? extends java.lang.Object>... properties)
public Criterion<UJO> where(Operator operator,
VALUE value)
Operator.
where in interface CriterionProvider<UJO extends Ujo,VALUE>operator - Operator
public Criterion<UJO> where(Operator operator,
UjoProperty<?,VALUE> value)
Operator.
where in interface CriterionProvider<UJO extends Ujo,VALUE>operator - Operator
public Criterion<UJO> whereEq(VALUE value)
whereEq in interface CriterionProvider<UJO extends Ujo,VALUE>public Criterion<UJO> whereEq(UjoProperty<UJO,VALUE> value)
whereEq in interface CriterionProvider<UJO extends Ujo,VALUE>value - UjoProperty can be type a direct of indirect (for a relation) property
public Criterion<UJO> whereIn(java.util.Collection<VALUE> list)
whereIn in interface CriterionProvider<UJO extends Ujo,VALUE>list - A collection of the values. The collection argument can be the EMPTY, the Criterion result will be FALSE in this case.
public Criterion<UJO> whereNotIn(java.util.Collection<VALUE> list)
whereNotIn in interface CriterionProvider<UJO extends Ujo,VALUE>list - A collection of the values. The collection argument can be the EMPTY, the Criterion result will be TRUE in this case.
public Criterion<UJO> whereIn(VALUE... list)
whereIn in interface CriterionProvider<UJO extends Ujo,VALUE>list - A collection of the values. The collection argument can be the EMPTY, the Criterion result will be FALSE in this case.
public Criterion<UJO> whereNotIn(VALUE... list)
whereNotIn in interface CriterionProvider<UJO extends Ujo,VALUE>list - A collection of the values. The collection argument can be the EMPTY, the Criterion result will be TRUE in this case.
public Criterion<UJO> whereNull()
null.
The method is a shortcut to the next full expression:
Criterin.where(Order.NOTE_PROPERTY, Operator.EQ, (String) null)for the String property type in this case.
whereNull in interface CriterionProvider<UJO extends Ujo,VALUE>#whereNotNull(org.ujorm.UjoProperty),
Operator.EQpublic Criterion<UJO> whereNotNull()
null.
The method is a shortcut to the next full expression:
Criterin.where(Order.NOTE_PROPERTY, Operator.EQ, (String) null)for the String property type in this case.
whereNotNull in interface CriterionProvider<UJO extends Ujo,VALUE>#whereNull(org.ujorm.UjoProperty),
Operator.NOT_EQpublic Criterion<UJO> whereNeq(VALUE value)
whereNeq in interface CriterionProvider<UJO extends Ujo,VALUE>Operator.NOT_EQpublic Criterion<UJO> whereGt(VALUE value)
whereGt in interface CriterionProvider<UJO extends Ujo,VALUE>Operator.GTpublic Criterion<UJO> whereGe(VALUE value)
whereGe in interface CriterionProvider<UJO extends Ujo,VALUE>Operator.GEpublic Criterion<UJO> whereLt(VALUE value)
whereLt in interface CriterionProvider<UJO extends Ujo,VALUE>Operator.LTpublic Criterion<UJO> whereLe(VALUE value)
whereLe in interface CriterionProvider<UJO extends Ujo,VALUE>Operator.LEpublic Criterion<UJO> forSql(java.lang.String sqlCondition)
#evaluate(org.ujorm.Ujo) is not supported and throws UnsupportedOperationException in the run-time
forSql in interface CriterionProvider<UJO extends Ujo,VALUE>sqlCondition - a SQL condition in the String format, the NULL value or empty string is not acceptedOperator.XSQLpublic Criterion<UJO> forAll()
forAll in interface CriterionProvider<UJO extends Ujo,VALUE>public Criterion<UJO> forNone()
forNone in interface CriterionProvider<UJO extends Ujo,VALUE>
|
Ujorm release 1.22 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||