Class SearchFieldDTO
java.lang.Object
net.sourceforge.jbizmo.commons.search.dto.SearchFieldDTO
- All Implemented Interfaces:
Serializable,Comparable<SearchFieldDTO>
Data transfer object that represents all information for building query fragments on field level. There are three special properties that must be mentioned: 1) fetchIndex: This index is used to ease reading of resultset data. 2) columnIndex: If a field is visible the value is greater or equal 0. This index is equivalent to the table column index. 3) colOrder: This value represents the column order. Note that this class has a natural ordering (see method compareTo()) that is inconsistent with equals().
Copyright 2010 (C) by Martin Ganserer
- Version:
- 1.0.0
- Author:
- Martin Ganserer
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorSearchFieldDTO(int colDisplayOrder, String colName, String colLabel, SearchFieldDataTypeEnum dataType, int width) ConstructorSearchFieldDTO(SearchFieldTypeEnum type, int colDisplayOrder, String colName, String colLabel, SearchFieldDataTypeEnum dataType, int width) ConstructorSearchFieldDTO(SearchFieldTypeEnum type, int colDisplayOrder, String colName, String colLabel, SearchFieldDataTypeEnum dataType, int width, String lov) Constructor -
Method Summary
Modifier and TypeMethodDescriptionintintintintintintintgetType()booleanbooleanbooleanvoidsetColLabel(String colLabel) Set the column labelvoidsetColName(String colName) Set the column namevoidsetColOrder(int colDisplayOrder) Set the column ordervoidsetColumnIndex(int columnIndex) voidsetColWidth(int colWidth) Set the column widthvoidSet the data type of the columnvoidsetDateTimeFormat(boolean dateTimeFormat) voidsetEnumListValues(Map<String, String> enumListValues) voidsetFetchIndex(int colIndex) Set the column fetch indexvoidsetFilterCriteria(String filterCriteria) Set the filter criteriavoidsetListOfValues(String listOfValues) Set the fully qualified class name of the connected list-of-values dialogvoidsetLovCommand(String lovCommand) voidsetOperator(SearchOperatorDTO operator) Set the search operatorvoidsetOriginalColumnIndex(int originalColumnIndex) voidsetSortIndex(int sortIndex) voidsetSortOrder(SortDirectionEnum sortOrder) Set the sort ordervoidsetType(SearchFieldTypeEnum type) Set the search field typevoidsetVisible(boolean visible) Set the flag that controls if a column is visible
-
Constructor Details
-
SearchFieldDTO
public SearchFieldDTO()Default constructor -
SearchFieldDTO
public SearchFieldDTO(int colDisplayOrder, String colName, String colLabel, SearchFieldDataTypeEnum dataType, int width) Constructor- Parameters:
colDisplayOrder- the display order of the columncolName- the name of property which is used in the select clause of the querycolLabel- the displayed name of the columndataType- the data typewidth- the width of the column
-
SearchFieldDTO
public SearchFieldDTO(SearchFieldTypeEnum type, int colDisplayOrder, String colName, String colLabel, SearchFieldDataTypeEnum dataType, int width) Constructor- Parameters:
type- the field typecolDisplayOrder- the display order of the columncolName- the name of property which is used in the select clause of the querycolLabel- the displayed name of the columndataType- the data typewidth- the width of the column
-
SearchFieldDTO
public SearchFieldDTO(SearchFieldTypeEnum type, int colDisplayOrder, String colName, String colLabel, SearchFieldDataTypeEnum dataType, int width, String lov) Constructor- Parameters:
type- the field typecolDisplayOrder- the display order of the columncolName- the name of property which is used in the select clause of the querycolLabel- the displayed name of the columndataType- the data typewidth- the width of the columnlov- the fully qualified class name of the list of values
-
-
Method Details
-
getListOfValues
- Returns:
- the fully qualified class name of the connected list-of-values dialog
-
setListOfValues
Set the fully qualified class name of the connected list-of-values dialog- Parameters:
listOfValues-
-
compareTo
- Specified by:
compareToin interfaceComparable<SearchFieldDTO>
-
getColOrder
public int getColOrder()- Returns:
- the column order
-
setColOrder
public void setColOrder(int colDisplayOrder) Set the column order- Parameters:
colDisplayOrder-
-
getColWidth
public int getColWidth()- Returns:
- the width of the column
-
setColWidth
public void setColWidth(int colWidth) Set the column width- Parameters:
colWidth-
-
getColLabel
- Returns:
- the column label
-
setColLabel
Set the column label- Parameters:
colLabel-
-
getColName
- Returns:
- the column name
-
setColName
Set the column name- Parameters:
colName-
-
getDataType
- Returns:
- the column data type
-
setDataType
Set the data type of the column- Parameters:
type-
-
isVisible
public boolean isVisible()- Returns:
- true if the column should be visible
-
setVisible
public void setVisible(boolean visible) Set the flag that controls if a column is visible- Parameters:
visible-
-
getFetchIndex
public int getFetchIndex()- Returns:
- the column fetch index
-
setFetchIndex
public void setFetchIndex(int colIndex) Set the column fetch index- Parameters:
colIndex-
-
getOperator
- Returns:
- the operator
-
setOperator
Set the search operator- Parameters:
operator-
-
getFilterCriteria
- Returns:
- the filter criteria
-
setFilterCriteria
Set the filter criteria- Parameters:
filterCriteria-
-
getSortOrder
- Returns:
- the sort order
-
setSortOrder
Set the sort order- Parameters:
sortOrder-
-
getType
- Returns:
- the type of the search field
-
setType
Set the search field type- Parameters:
type-
-
getColumnIndex
public int getColumnIndex()- Returns:
- the column index
-
setColumnIndex
public void setColumnIndex(int columnIndex) - Parameters:
columnIndex- set column index to set
-
getSortIndex
public int getSortIndex()- Returns:
- the sort index
-
setSortIndex
public void setSortIndex(int sortIndex) - Parameters:
sortIndex-
-
getOriginalColumnIndex
public int getOriginalColumnIndex()- Returns:
- the original column index
-
setOriginalColumnIndex
public void setOriginalColumnIndex(int originalColumnIndex) - Parameters:
originalColumnIndex-
-
getEnumListValues
- Returns:
- the hash map of enumeration values
-
setEnumListValues
- Parameters:
enumListValues- the hash map of enumeration values to set
-
getLovCommand
- Returns:
- the list-of-values command string
-
setLovCommand
- Parameters:
lovCommand- the list-of-values command string to set
-
isDateTimeFormat
public boolean isDateTimeFormat()- Returns:
- a flag that determines if a date field is of type date time or date. Fields supplied with a different type should ignore the flag!
-
setDateTimeFormat
public void setDateTimeFormat(boolean dateTimeFormat) - Parameters:
dateTimeFormat- the date time format flag to set
-
hasTemporalDataType
public boolean hasTemporalDataType()- Returns:
- true if the data type represents a date
-