|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mguennewig.pobjsearch.SearchColumn
public abstract class SearchColumn
Abstract base class for search result columns.
| Method Summary | |
|---|---|
void |
addOrderBy(Query q,
boolean ascending)
Adds the sorting directives to the query for this column. |
abstract java.lang.String |
formatValue(java.lang.Object value)
Formats the "raw" value got from getValue(Record[]) for the UI. |
java.lang.String |
getIdentifier()
Returns the identifier of this column. |
java.lang.String |
getLabel()
Returns the default label of this column. |
SearchModel |
getSearchModel()
Returns the search model to which this column belongs. |
abstract int |
getTableIndex()
|
abstract java.lang.Object |
getValue(Record[] row)
Returns the "raw" value for this column in the given row. |
abstract java.lang.Class<?> |
getValueClass()
Returns the class instance of all values for this column. |
boolean |
isEditable()
Returns whether this column is editable. |
boolean |
isFilterable()
Returns whether the content of this column is filterable. |
boolean |
isLocalized()
Returns whether the content of this column should be localized. |
boolean |
isRightAligned()
Returns whether the content of this column should be right aligned. |
boolean |
isSortable()
Returns whether the content of this column is sortable. |
static Predicate |
matcher(PClassSearchForm.Condition condition,
Type type,
Term filter)
Returns a matcher Predicate which can be used for
SearchFilter#addFilter(SearchForm.Condition,Query). |
static java.lang.String |
matchPattern(java.lang.String mode,
java.lang.String pattern)
Returns an SQL match pattern for LIKE. |
void |
pullInReferences(Query q)
Pulls in references that will be required for display. |
void |
setFilterable(boolean filterable)
Sets whether the content of this column is filterable. |
void |
setLocalized(boolean localized)
Sets whether the content of this column should be localized. |
void |
setRightAligned(boolean rightAligned)
Sets whether the content of this column should be right aligned. |
void |
setSortable(boolean sortable)
Sets whether the content of this columns is sortable. |
abstract void |
setValue(Record[] row,
java.lang.Object value)
Sets the "raw" value for this column in the given row. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.mguennewig.pobjsearch.SearchFilter |
|---|
addFilter |
| Method Detail |
|---|
public final java.lang.String getIdentifier()
getIdentifier in interface SearchFilterpublic final java.lang.String getLabel()
getLabel in interface SearchFilterpublic final SearchModel getSearchModel()
public abstract int getTableIndex()
public final boolean isFilterable()
public void setFilterable(boolean filterable)
public final boolean isLocalized()
public void setLocalized(boolean localized)
public final boolean isRightAligned()
public void setRightAligned(boolean rightAligned)
public final boolean isSortable()
public void setSortable(boolean sortable)
public void addOrderBy(Query q,
boolean ascending)
This method is only called if isSortable() yields
true.
The default implementation always throws an exception.
java.lang.UnsupportedOperationException - if called.public abstract java.lang.Class<?> getValueClass()
TableModel.getColumnClass(int)public abstract java.lang.Object getValue(Record[] row)
formatValue(Object)public boolean isEditable()
setValue(Record[],Object)
public abstract void setValue(Record[] row,
java.lang.Object value)
throws PObjConstraintException,
PObjSQLException
Note that this method must only be called if isEditable()
returns true.
PObjConstraintException - if a database constraint will be violated.
PObjSQLException - if any other database error occurs.isEditable(),
Record.set(int,Object)public abstract java.lang.String formatValue(java.lang.Object value)
getValue(Record[]) for the UI.
public void pullInReferences(Query q)
public static Predicate matcher(PClassSearchForm.Condition condition,
Type type,
Term filter)
Predicate which can be used for
SearchFilter#addFilter(SearchForm.Condition,Query).
condition - The search form.type - The type declaration of the searched column.filter - The term expression that specifies the filter condition.
java.lang.IllegalArgumentException - if the search mode is unknown.
public static java.lang.String matchPattern(java.lang.String mode,
java.lang.String pattern)
LIKE.
PClassSearchForm.MODE_CONTAINS,
PClassSearchForm.MODE_STARTS_WITH,
PClassSearchForm.MODE_ENDS_WITH
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||