|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mguennewig.pobjsearch.SearchColumn
de.mguennewig.pobjsearch.DefaultSearchColumn
public class DefaultSearchColumn
A search column implementation that uses the persistent object columns directly.
| Constructor Summary | |
|---|---|
DefaultSearchColumn(java.lang.String identifier,
java.lang.String label,
int tableIndex,
Column... selectors)
Creates a new instance of DefaultSearchColumn |
|
| Method Summary | |
|---|---|
void |
addFilter(PClassSearchForm.Condition condition,
Query q)
Adds this filter to the query. |
void |
addOrderBy(Query q,
boolean ascending)
Adds the sorting directives to the query for this column. |
java.lang.String |
formatValue(java.lang.Object value)
Formats the "raw" value got from SearchColumn.getValue(Record[]) for the UI. |
int |
getNumSelectors()
|
Column |
getSelector(int n)
|
int |
getTableIndex()
|
java.lang.Object |
getValue(Record[] row)
Returns the "raw" value for this column in the given row. |
java.lang.Class<?> |
getValueClass()
Returns the class instance of all values for this column. |
boolean |
isEditable()
Returns whether this column is editable. |
void |
pullInReferences(Query q)
Pulls in references that will be required for display. |
void |
setValue(Record[] row,
java.lang.Object value)
Sets the "raw" value for this column in the given row. |
| Methods inherited from class de.mguennewig.pobjsearch.SearchColumn |
|---|
getIdentifier, getLabel, getSearchModel, isFilterable, isLocalized, isRightAligned, isSortable, matcher, matchPattern, setFilterable, setLocalized, setRightAligned, setSortable |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultSearchColumn(java.lang.String identifier,
java.lang.String label,
int tableIndex,
Column... selectors)
identifier - label - | Method Detail |
|---|
public final int getTableIndex()
getTableIndex in class SearchColumnpublic final int getNumSelectors()
public final Column getSelector(int n)
public void addFilter(PClassSearchForm.Condition condition,
Query q)
public void addOrderBy(Query q,
boolean ascending)
This method is only called if SearchColumn.isSortable() yields
true.
The default implementation always throws an exception.
addOrderBy in class SearchColumnpublic java.lang.Class<?> getValueClass()
getValueClass in class SearchColumnTableModel.getColumnClass(int)public java.lang.Object getValue(Record[] row)
getValue in class SearchColumnRecord.get(Column),
PObject.loadIfReference()public boolean isEditable()
isEditable in class SearchColumnSearchColumn.setValue(Record[],Object)
public void setValue(Record[] row,
java.lang.Object value)
throws PObjConstraintException,
PObjSQLException
Note that this method must only be called if SearchColumn.isEditable()
returns true.
setValue in class SearchColumnjava.lang.UnsupportedOperationException - if the corresponding record in the
row is not a PObject.
PObjConstraintException - if a database constraint will be violated.
PObjSQLException - if any other database error occurs.SearchColumn.isEditable(),
Record.set(int,Object)public java.lang.String formatValue(java.lang.Object value)
SearchColumn.getValue(Record[]) for the UI.
formatValue in class SearchColumnType.format(Object)public void pullInReferences(Query q)
pullInReferences in class SearchColumn
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||