public class SearchItem extends KeyValuePairAlpha
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_BOOLEAN |
static int |
TYPE_DATE |
static int |
TYPE_NUMERIC |
static int |
TYPE_TEXT |
Constructor and Description |
---|
SearchItem(java.lang.String displayItem,
AbstractAttribute attribute)
Constructs a new search item with type text.
|
SearchItem(java.lang.String displayItem,
AbstractAttribute attribute,
int type)
Constructs a new search item with type text.
|
SearchItem(java.lang.String displayItem,
java.lang.String searchColumnName)
Constructs a new search item with type text.
|
SearchItem(java.lang.String displayItem,
java.lang.String searchColumnName,
int type)
Constructs a new search item.
|
SearchItem(java.lang.String displayItem,
java.lang.String searchColumnName,
int type,
java.lang.String preamble)
Constructs a new search item.
|
SearchItem(java.lang.String displayItem,
java.lang.String searchColumnName,
java.lang.String preamble)
Constructs a new search item with type text.
|
Modifier and Type | Method and Description |
---|---|
void |
extendWhereCondition(WhereCondition whereCondition,
int combination,
java.lang.String relation,
java.lang.String value)
Extends the specified where condition.
|
void |
extendWhereCondition(WhereCondition whereCondition,
java.lang.String value)
Extends the specified where condition.
|
void |
extendWhereCondition(WhereCondition whereCondition,
java.lang.String relation,
java.lang.String value)
Extends the specified where condition.
|
java.lang.String |
getPreamble()
Returns the preamble before the search fragment to be constructed
|
int |
getType()
Returns the type of this search item.
|
getKey, getValue
public static final int TYPE_TEXT
public static final int TYPE_NUMERIC
public static final int TYPE_BOOLEAN
public static final int TYPE_DATE
public SearchItem(java.lang.String displayItem, AbstractAttribute attribute)
displayItem
- the combo box item to be displayedattribute
- the attribute to look forpublic SearchItem(java.lang.String displayItem, java.lang.String searchColumnName)
displayItem
- the combo box item to be displayedsearchColumnName
- the name of the column associated with the itempublic SearchItem(java.lang.String displayItem, AbstractAttribute attribute, int type)
displayItem
- the combo box item to be displayedattribute
- the attribute to look fortype
- the column typeTYPE_TEXT
,
TYPE_NUMERIC
,
TYPE_DATE
public SearchItem(java.lang.String displayItem, java.lang.String searchColumnName, int type)
displayItem
- the combo box item to be displayedsearchColumnName
- the name of the column associated with the itemtype
- the column typeTYPE_TEXT
,
TYPE_NUMERIC
,
TYPE_DATE
public SearchItem(java.lang.String displayItem, java.lang.String searchColumnName, java.lang.String preamble)
displayItem
- the combo box item to be displayedsearchColumnName
- the name of the column associated with the itempreamble
- the preamble to be placed before the search fragment to be constructed, e.g. "myID in (select foreignID from AnotherTable where " - bracket may be closed automaticallypublic SearchItem(java.lang.String displayItem, java.lang.String searchColumnName, int type, java.lang.String preamble)
displayItem
- the combo box item to be displayedsearchColumnName
- the name of the column associated with the itemtype
- the column typepreamble
- the preamble before the search fragment to be constructed, e.g. "myID in (select foreignID from AnotherTable where " - bracket may be closed automaticallyTYPE_TEXT
,
TYPE_NUMERIC
,
TYPE_BOOLEAN
,
TYPE_DATE
public java.lang.String getPreamble()
public int getType()
TYPE_TEXT
,
TYPE_NUMERIC
,
TYPE_DATE
public void extendWhereCondition(WhereCondition whereCondition, java.lang.String value)
whereCondition
- the where condition to be extendedvalue
- the value to comparepublic void extendWhereCondition(WhereCondition whereCondition, java.lang.String relation, java.lang.String value)
whereCondition
- the where condition to be extendedrelation
- the relation to be used (e.g. =, <>)value
- the value to comparepublic void extendWhereCondition(WhereCondition whereCondition, int combination, java.lang.String relation, java.lang.String value)
whereCondition
- the where condition to be extendedcombination
- the combination WhereConditionStd.AND
or WhereConditionStd.OR
relation
- the relation to be used (e.g. =, <>)value
- the value to compareCopyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de