org.ujorm
Interface CriterionProvider<UJO extends Ujo,VALUE>

All Known Subinterfaces:
CompositeProperty<UJO,VALUE>, ListUjoProperty<UJO,ITEM>, UjoProperty<UJO,VALUE>
All Known Implementing Classes:
BeanProperty, BeanPropertyList, FactoryProperty, FieldProperty, FieldPropertyList, ListProperty, PathProperty, Property, RelationToMany, RelationToOne

public interface CriterionProvider<UJO extends Ujo,VALUE>


Method Summary
 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.
 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> property)
          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.
 

Method Detail

where

Criterion<UJO> where(Operator operator,
                     VALUE value)
Create a new Criterion where this property is related to the value along the parameter Operator.

Parameters:
operator - Operator
  • VALUE - the parameter value
  • UjoProperty - reference to a related entity
  • List<TYPE> - list of values (TODO - this type is planned in the future)
Returns:
A new criterion

where

Criterion<UJO> where(Operator operator,
                     UjoProperty<?,VALUE> value)
Create a new Criterion where this property is related to the value along the parameter Operator.

Parameters:
property - UjoProperty
operator - Operator
  • VALUE - the parameter value
  • UjoProperty - reference to a related entity
  • List<TYPE> - list of values (TODO - this type is planned in the future)
Returns:
A new criterion

whereEq

Criterion<UJO> whereEq(VALUE value)
Create a new Criterion where this property equals the value

Parameters:
property - UjoProperty
  • TYPE - parameter value
  • List<TYPE> - list of values
  • UjoProperty - reference to a related entity
Returns:
A the new immutable Criterion

whereEq

Criterion<UJO> whereEq(UjoProperty<UJO,VALUE> property)
Create a new Criterion where this property equals the property

Parameters:
property - UjoProperty can be type a direct of indirect (for a relation) property
Returns:
A the new immutable Criterion

whereIn

Criterion<UJO> whereIn(java.util.Collection<VALUE> list)
Create new Criterion for operator IN to compare value to a list of constants.

Parameters:
property - A direct or indeirect Ujo property
list - A collection of the values. The collection argument can be the EMPTY, the Criterion result will be FALSE in this case.
Returns:
A the new immutable Criterion.

whereNotIn

Criterion<UJO> whereNotIn(java.util.Collection<VALUE> list)
Create new Criterion for operator IN to compare value to a list of constants.

Parameters:
property - A direct or indeirect Ujo property
list - A collection of the values. The collection argument can be the EMPTY, the Criterion result will be TRUE in this case.
Returns:
A the new immutable Criterion.

whereIn

Criterion<UJO> whereIn(VALUE... list)
Create new Criterion for operator IN to compare value to a list of constants

Parameters:
property - A reference to a related entity
list - A collection of the values. The collection argument can be the EMPTY, the Criterion result will be FALSE in this case.
Returns:
A the new immutable Criterion

whereNotIn

Criterion<UJO> whereNotIn(VALUE... list)
Create new Criterion for operator IN to compare value to a list of constants.

Parameters:
property - A property direct or indeirect Ujo property
list - A collection of the values. The collection argument can be the EMPTY, the Criterion result will be TRUE in this case.
Returns:
A the new immutable Criterion.

whereNeq

Criterion<UJO> whereNeq(VALUE value)
Create a new Criterion where this property not equals the value

See Also:
Operator.NOT_EQ

whereGt

Criterion<UJO> whereGt(VALUE value)
Create a new Criterion where this property is great then the value

See Also:
Operator.GT

whereGe

Criterion<UJO> whereGe(VALUE value)
Create a new Criterion where this property is great or equals the value

See Also:
Operator.GE

whereLt

Criterion<UJO> whereLt(VALUE value)
Create a new Criterion where this property is less then the value

See Also:
Operator.LT

whereLe

Criterion<UJO> whereLe(VALUE value)
Create a new Criterion where this property is less or equals than the value

See Also:
Operator.LE

whereNull

Criterion<UJO> whereNull()
Create a new Criterion where this property is 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.

Parameters:
property - UjoProperty
See Also:
#whereNotNull(org.ujorm.UjoProperty), Operator.EQ

whereNotNull

Criterion<UJO> whereNotNull()
Create a new Criterion where this property is not 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.

Parameters:
property - UjoProperty
See Also:
#whereNull(org.ujorm.UjoProperty), Operator.NOT_EQ

forSql

Criterion<UJO> forSql(java.lang.String sqlCondition)
Create a new Criterion for a Native Criterion in SQL statement format. Special features:

Parameters:
property - The parameter is required by Ujorm to location a basic database table and the join relations in case a composed Property
sqlCondition - a SQL condition in the String format, the NULL value or empty string is not accepted
See Also:
Operator.XSQL

forAll

Criterion<UJO> forAll()
Create a new Criterion for this property where all results will be true (the result is independed on the value). The method evaluate(ujo) returns TRUE always.

Parameters:
property - The parameter is required by Ujorm to location a basic database table and the join relations in case a composed Property

forNone

Criterion<UJO> forNone()
Create a new Criterion for this property where all results will be false (the result is independed on the value). The method evaluate(method) returns FALSE always.

Parameters:
property - The parameter is required by Ujorm to location a basic database table and the join relations in case a composed Property


Copyright © 2007-2012 PPonec