|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
jimm.datavision.Expression
jimm.datavision.UserColumn
public class UserColumn
A user column is an arbitrary expression inserted into the SQL query and retrieved as a column value. It may contain database column values, parameters, special values, strings, or numbers. It can't contain formulas because their values may be undefined when the query is run.
When used by a query, the following substitutions are made withing the userString of a user column:
| Field Summary | |
|---|---|
static int |
MAX_DISPLAY_NAME_LENGTH
|
| Fields inherited from class jimm.datavision.Expression |
|---|
exceptAfter, expr, id, name, observedContents, report |
| Constructor Summary | |
|---|---|
UserColumn(java.lang.Long id,
Report report,
java.lang.String name)
Constructor. |
|
UserColumn(java.lang.Long id,
Report report,
java.lang.String name,
java.lang.String evalString)
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
designLabel()
|
java.lang.String |
dragString()
Returns the string used to identify the object when dragging it. |
java.lang.String |
fieldTypeString()
Returns the string used to create a field of the appropriate type. |
java.lang.String |
formulaString()
|
java.lang.String |
getDisplayName()
|
java.lang.String |
getSelectString(SQLQuery query)
Returns the string used by a SQL query to select this object. |
java.lang.String |
getSortString(SQLQuery query)
Returns the string used as the name/value of this selectable in a SQL ORDER BY clause. |
Table |
getTable()
Returns the table to which this selectable belongs; may be null. |
java.lang.Object |
getValue(Report report)
Returns the current value. |
Selectable |
reloadInstance(DataSource dataSource)
Returns a (possibly new) instance of this selectable object. |
java.lang.String |
toString()
Returns this user column's SQL text as entered by the user. |
void |
writeXML(XMLWriter out)
Writes this expression as an XML tag. |
| Methods inherited from class jimm.datavision.Expression |
|---|
columnsUsed, displayToExpression, expressionToDisplay, finalize, getEditableExpression, getExpression, getId, getName, refersTo, refersTo, refersTo, setEditableExpression, setExpression, setName, startObservingContents, stopObservingContents, update, userColumnsUsed, writeAdditionalAttributes, writeXML |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jimm.datavision.Selectable |
|---|
getId |
| Field Detail |
|---|
public static final int MAX_DISPLAY_NAME_LENGTH
| Constructor Detail |
|---|
public UserColumn(java.lang.Long id,
Report report,
java.lang.String name)
id - the unique identifier for the new user column; if
null, generate a new idreport - the report containing this user columnname - the user column name
public UserColumn(java.lang.Long id,
Report report,
java.lang.String name,
java.lang.String evalString)
null, generates a new id number.
This number is one higher than any previously-seen id number. This does
not guarantee that no later user column will be created manually
with the same id number.
id - the unique identifier for the new user column; if
null, generate a new idreport - the report containing this user columnname - the user column nameevalString - the string to evaulate at runtime.| Method Detail |
|---|
public java.lang.Object getValue(Report report)
Selectable
getValue in interface Selectablereport - a report
public java.lang.String fieldTypeString()
Selectable
fieldTypeString in interface SelectableField.createField.create(java.lang.Long, jimm.datavision.Report, jimm.datavision.Section, java.lang.String, java.lang.Object, boolean)public java.lang.String getSelectString(SQLQuery query)
Selectable
getSelectString in interface Selectablepublic java.lang.String getSortString(SQLQuery query)
SelectablegetSelectString.
getSortString in interface SelectableSelectable.getSelectString(jimm.datavision.source.sql.SQLQuery)public Table getTable()
Selectablenull.
getTable in interface Selectablenullpublic java.lang.String getDisplayName()
getDisplayName in interface Selectablepublic java.lang.String dragString()
Draggable
dragString in interface DraggabledragString in class Expressionpublic java.lang.String designLabel()
designLabel in class Expressionpublic java.lang.String formulaString()
formulaString in class Expressionpublic Selectable reloadInstance(DataSource dataSource)
Selectable
reloadInstance in interface Selectablepublic java.lang.String toString()
toString in class java.lang.Objectpublic void writeXML(XMLWriter out)
Expression
writeXML in interface WriteablewriteXML in class Expressionout - a writer that knows how to write XML
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||