FileDocCategorySizeDatePackage
SearchCriteria.javaAPI DocExample2130Mon Aug 28 21:54:08 BST 2000com.imaginary.lwp

SearchCriteria

public class SearchCriteria extends Object implements Serializable

Fields Summary
static final long
serialVersionUID
private ArrayList
bindings
The bindings of searchable attributes and their values.
private ArrayList
preloads
Any attributes that should be preloaded with the query if the data store does not automatically pull out all attributes.
private ArrayList
sorts
The fields by which the results should be sorted.
Constructors Summary
public SearchCriteria()

    
      
        super();
    
public SearchCriteria(String[] pre)

        super();
        for(int i=0; i<pre.length; i++) {
            preloads.add(pre[i]);
        }
    
public SearchCriteria(Iterator pre)

        super();
        while( pre.hasNext() ) {
            preloads.add(pre.next());
        }
    
Methods Summary
public voidaddBinding(SearchBinding sb)

        bindings.add(sb);
    
public voidaddBinding(com.imaginary.lwp.SearchCriteria sc)

        bindings.add(new SearchBinding(sc));
    
public voidaddBinding(java.lang.String fld, java.lang.Object val)

        bindings.add(new SearchBinding(fld, val));
    
public voidaddBinding(SearchBoolean sb, java.lang.String fld, SearchOperator so, java.lang.Object val)

        bindings.add(new SearchBinding(sb, fld, so, val));
    
public voidaddSort(java.lang.String attr)

        sorts.add(attr);
    
public voidaddSorts(java.util.Iterator it)

        while( it.hasNext() ) {
            sorts.add(it.next());
        }
    
public voidaddSorts(java.lang.String[] attrs)

        for(int i=0; i<attrs.length; i++) {
            sorts.add(attrs[i]);
        }
    
public java.util.Iteratorbindings()

        return bindings.iterator();
    
public java.util.Iteratorpreloads()

        return preloads.iterator();
    
public java.util.Iteratorsorts()

        return sorts.iterator();