Filtering Results

Specify test criteria for dynamic queries.

You can specify how your results are filtered by using the Query.having(com.sybase.persistence.TestCriteria) method. For example, limit your results to id attribute values that are greater than or equal to 0 using:

Query query1 = new Query();
//other code for query1

AttributeTest ts2 = new AttributeTest();
ts2.Attribute = "id";
ts2.Value = "0";
ts2.SetOperator(AttributeTest.GREATER_EQUAL);
query1.Having(ts2);