fr.ifremer.allegro
Class SearchParameter

java.lang.Object
  extended by fr.ifremer.allegro.SearchParameter
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CriteriaSearchParameter

public class SearchParameter
extends java.lang.Object
implements java.io.Serializable

Represents a generic search parameter that can be used with property searches.

See Also:
PropertySearch, Serialized Form

Field Summary
static int EQUAL_COMPARATOR
           
static int GREATER_THAN_COMPARATOR
           
static int GREATER_THAN_OR_EQUAL_COMPARATOR
           
static int IN_COMPARATOR
           
static int INSENSITIVE_LIKE_COMPARATOR
           
static int LESS_THAN_COMPARATOR
           
static int LESS_THAN_OR_EQUAL_COMPARATOR
           
static int LIKE_COMPARATOR
           
static int MATCH_ANYWHERE
           
static int MATCH_END
           
static int MATCH_EXACT
           
static int MATCH_START
           
static int NOT_EQUAL_COMPARATOR
           
static int NOT_IN_COMPARATOR
           
static int NOT_INSENSITIVE_LIKE_COMPARATOR
           
static int NOT_LIKE_COMPARATOR
           
static int NOT_NULL_COMPARATOR
           
static int NULL_COMPARATOR
           
static int ORDER_ASC
          Ascending order
static int ORDER_DESC
          Descending order
static int ORDER_UNSET
          Order unset
 
Constructor Summary
SearchParameter(SearchParameter otherBean)
          Copies constructor from other SearchParameter
SearchParameter(java.lang.String name, int comparator)
          Constructor taking name and comparator properties.
SearchParameter(java.lang.String name, java.lang.Object value)
          Constructor taking name and value properties.
SearchParameter(java.lang.String name, java.lang.Object value, int comparator)
          Constructor taking name, value and comparator properties.
SearchParameter(java.lang.String name, java.lang.Object value, int comparator, int match)
          Constructor taking name, value, comparator and order properties.
SearchParameter(java.lang.String name, java.lang.Object value, int comparator, int match, int order)
          Constructor taking name, value, comparator, order and match properties.
SearchParameter(java.lang.String name, java.lang.Object value, int comparator, int match, int order, boolean searchIfNull)
          Constructor taking all properties.
 
Method Summary
 int getComparator()
           
 int getMatch()
          Gets the match attribute which controls how parameter values are matched (anywhere, start, end or exact).
 java.lang.String getName()
           The parameter name in dot notation (i.e.
 int getOrder()
           Order attribute to control if parameter is usedin order by clause.
 java.lang.Object getValue()
          The value of the parameter.
 boolean isSearchIfNull()
          Whether this parameter will be included in the search even if it is null.
 void setComparator(int comparator)
           
 void setMatch(int match)
          Sets the match mode attribute which controls how parameter values are matched (anywhere, start, end or exact).
 void setName(java.lang.String name)
           
 void setOrder(int order)
           
 void setSearchIfNull(boolean searchIfNull)
          Defines whether parameter will be included in the search even if it is null.
 void setValue(java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIKE_COMPARATOR

public static final int LIKE_COMPARATOR
See Also:
Constant Field Values

INSENSITIVE_LIKE_COMPARATOR

public static final int INSENSITIVE_LIKE_COMPARATOR
See Also:
Constant Field Values

EQUAL_COMPARATOR

public static final int EQUAL_COMPARATOR
See Also:
Constant Field Values

GREATER_THAN_OR_EQUAL_COMPARATOR

public static final int GREATER_THAN_OR_EQUAL_COMPARATOR
See Also:
Constant Field Values

GREATER_THAN_COMPARATOR

public static final int GREATER_THAN_COMPARATOR
See Also:
Constant Field Values

LESS_THAN_OR_EQUAL_COMPARATOR

public static final int LESS_THAN_OR_EQUAL_COMPARATOR
See Also:
Constant Field Values

LESS_THAN_COMPARATOR

public static final int LESS_THAN_COMPARATOR
See Also:
Constant Field Values

IN_COMPARATOR

public static final int IN_COMPARATOR
See Also:
Constant Field Values

NOT_EQUAL_COMPARATOR

public static final int NOT_EQUAL_COMPARATOR
See Also:
Constant Field Values

NOT_NULL_COMPARATOR

public static final int NOT_NULL_COMPARATOR
See Also:
Constant Field Values

NULL_COMPARATOR

public static final int NULL_COMPARATOR
See Also:
Constant Field Values

NOT_IN_COMPARATOR

public static final int NOT_IN_COMPARATOR
See Also:
Constant Field Values

NOT_LIKE_COMPARATOR

public static final int NOT_LIKE_COMPARATOR
See Also:
Constant Field Values

NOT_INSENSITIVE_LIKE_COMPARATOR

public static final int NOT_INSENSITIVE_LIKE_COMPARATOR
See Also:
Constant Field Values

ORDER_UNSET

public static final int ORDER_UNSET
Order unset

See Also:
Constant Field Values

ORDER_ASC

public static final int ORDER_ASC
Ascending order

See Also:
Constant Field Values

ORDER_DESC

public static final int ORDER_DESC
Descending order

See Also:
Constant Field Values

MATCH_ANYWHERE

public static final int MATCH_ANYWHERE
See Also:
Constant Field Values

MATCH_START

public static final int MATCH_START
See Also:
Constant Field Values

MATCH_END

public static final int MATCH_END
See Also:
Constant Field Values

MATCH_EXACT

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

SearchParameter

public SearchParameter(java.lang.String name,
                       java.lang.Object value)
Constructor taking name and value properties.


SearchParameter

public SearchParameter(java.lang.String name,
                       int comparator)
Constructor taking name and comparator properties.


SearchParameter

public SearchParameter(java.lang.String name,
                       java.lang.Object value,
                       int comparator)
Constructor taking name, value and comparator properties.


SearchParameter

public SearchParameter(java.lang.String name,
                       java.lang.Object value,
                       int comparator,
                       int match)
Constructor taking name, value, comparator and order properties.


SearchParameter

public SearchParameter(java.lang.String name,
                       java.lang.Object value,
                       int comparator,
                       int match,
                       int order)
Constructor taking name, value, comparator, order and match properties.


SearchParameter

public SearchParameter(java.lang.String name,
                       java.lang.Object value,
                       int comparator,
                       int match,
                       int order,
                       boolean searchIfNull)
Constructor taking all properties.


SearchParameter

public SearchParameter(SearchParameter otherBean)
Copies constructor from other SearchParameter

Method Detail

getName

public java.lang.String getName()

The parameter name in dot notation (i.e. person.firstNAme).


setName

public void setName(java.lang.String name)

getValue

public java.lang.Object getValue()
The value of the parameter.


setValue

public void setValue(java.lang.Object value)

getComparator

public int getComparator()

setComparator

public void setComparator(int comparator)

getOrder

public int getOrder()

Order attribute to control if parameter is usedin order by clause.


setOrder

public void setOrder(int order)

isSearchIfNull

public boolean isSearchIfNull()
Whether this parameter will be included in the search even if it is null.

Returns:
true/false

setSearchIfNull

public void setSearchIfNull(boolean searchIfNull)
Defines whether parameter will be included in the search even if it is null.

Parameters:
searchIfNull - true if the parameter should be included in the search even if it is null, false otherwise.

getMatch

public int getMatch()
Gets the match attribute which controls how parameter values are matched (anywhere, start, end or exact).

Returns:
the match mode

setMatch

public void setMatch(int match)
Sets the match mode attribute which controls how parameter values are matched (anywhere, start, end or exact).



Copyright © 2008-2010 IFREMER. All Rights Reserved.