javax.rad.model.condition
Interface ICondition

All Superinterfaces:
Cloneable
All Known Implementing Classes:
And, BaseCondition, CompareCondition, Equals, Greater, GreaterEquals, Less, LessEquals, Like, LikeIgnoreCase, LikeReverse, LikeReverseIgnoreCase, Not, OperatorCondition, Or

public interface ICondition
extends Cloneable

The ICondition specifies the interface for all Condition's. It also supports combine ICondition's to handle grouped logical operations. like "a AND (b or c)"

Example:

 ... in Memory
 ICondition filter = new Equals("ID", 15).and(new Equals("NAME", "a").or(new Equals("NAME", "b")));
 System.out.println(new SQLSupport(filter) + "= " + filter.isFulfilled(dbMemDataBook.getRow(0)));

 ... with a RemoteDataBook e.g. for Database
 DataRow drFilter = dbStorageDataBook.createEmptyRow();
 drFilter.setDataCellValue("ADRESSE", "z*");
 drFilter.setDataCellValue("PLZ", "1010");
 
 ICondtion cFilter = new LikeIgnoreCase(drFilter, "ADRESSE").and(new Equals(drFilter, "PLZ")); 
 dbStorageDataBook.setFilter(filter);
 

See Also:
IDataBook, IDataRow

Method Summary
 And and(ICondition pCondition)
          It connects with an logic AND the specified ICondition.
 ICondition clone()
          Return a clone of the specific ICondition.
 boolean isFulfilled(IDataRow pDataRow)
          Returns true, if the ICondition is fulfilled.
 Or or(ICondition pCondition)
          It connects with an logic OR the specified ICondition.
 

Method Detail

isFulfilled

boolean isFulfilled(IDataRow pDataRow)
Returns true, if the ICondition is fulfilled.

Parameters:
pDataRow - the IDataRow to use for the check of this ICondition.
Returns:
true, if the ICondition is fulfilled.

and

And and(ICondition pCondition)
It connects with an logic AND the specified ICondition.

Parameters:
pCondition - the ICondition to add
Returns:
this ICondition itself as result.

or

Or or(ICondition pCondition)
It connects with an logic OR the specified ICondition.

Parameters:
pCondition - the ICondition to add
Returns:
this ICondition itself as result.

clone

ICondition clone()
Return a clone of the specific ICondition.

Returns:
a clone of the specific ICondition.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.