com.trg.search
Class ExampleOptions

java.lang.Object
  extended by com.trg.search.ExampleOptions

public class ExampleOptions
extends java.lang.Object

Use this class to pass options to find by example functionality.

Author:
dwolverton

Field Summary
static int ANYWHERE
           
static int END
           
static int EXACT
           
static int START
           
 
Constructor Summary
ExampleOptions()
           
 
Method Summary
 ExampleOptions excludeProp(java.lang.String property)
          Add a property to the excludeProps collection
 java.util.Collection<java.lang.String> getExcludeProps()
           
 int getLikeMode()
           
 boolean isExcludeNulls()
           
 boolean isExcludeZeros()
           
 boolean isIgnoreCase()
           
 ExampleOptions setExcludeNulls(boolean excludeNulls)
          If this is true, all properties with null values will be ignored.
 ExampleOptions setExcludeProps(java.util.Collection<java.lang.String> excludeProps)
          This is a list of properties to exclude.
 ExampleOptions setExcludeZeros(boolean excludeZeros)
          If this is true, all properties with the value 0 will be ignored.
 ExampleOptions setIgnoreCase(boolean ignoreCase)
          If this is true, case is ignored when comparing string values.
 ExampleOptions setLikeMode(int likeMode)
          This options describes how all string values are compared.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXACT

public static final int EXACT
See Also:
Constant Field Values

START

public static final int START
See Also:
Constant Field Values

END

public static final int END
See Also:
Constant Field Values

ANYWHERE

public static final int ANYWHERE
See Also:
Constant Field Values
Constructor Detail

ExampleOptions

public ExampleOptions()
Method Detail

excludeProp

public ExampleOptions excludeProp(java.lang.String property)
Add a property to the excludeProps collection


getExcludeProps

public java.util.Collection<java.lang.String> getExcludeProps()

setExcludeProps

public ExampleOptions setExcludeProps(java.util.Collection<java.lang.String> excludeProps)

This is a list of properties to exclude. For example if a person object is as an example and it is not desirable to filter on the person's parents, the mother and father properties can be excluded by setting this list to contain the strings "mother" and "father".

Default: <none>


isExcludeNulls

public boolean isExcludeNulls()

setExcludeNulls

public ExampleOptions setExcludeNulls(boolean excludeNulls)

If this is true, all properties with null values will be ignored.

Default: true


isExcludeZeros

public boolean isExcludeZeros()

setExcludeZeros

public ExampleOptions setExcludeZeros(boolean excludeZeros)

If this is true, all properties with the value 0 will be ignored.

Default: false


isIgnoreCase

public boolean isIgnoreCase()

setIgnoreCase

public ExampleOptions setIgnoreCase(boolean ignoreCase)

If this is true, case is ignored when comparing string values.

Default: true


getLikeMode

public int getLikeMode()

setLikeMode

public ExampleOptions setLikeMode(int likeMode)

This options describes how all string values are compared. The options are:

Default: EXACT



Copyright © 2008-2010 eBM WebSourcing. All Rights Reserved.