|
i-net Crystal-Clear | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.inet.report.Field
com.inet.report.DatabaseField
public class DatabaseField
This class represents a database field.
A DatabaseField holds the information needed to use a field from a database table.
When a field will be evaluated the data of the field are fetched for each record in the table.
Therefore the full name of the field in the database table is needed, i.e. "People.Phonenumber".
Set it when adding the field to the table source with the method TableSource.addColumn(String, int) in class TableSource or with method setName(String).
The shortname is an alias for the fullname, i.e. Phonenumber.
Adding and removing of a DatabaseField is handled by class TableSource.
You can use the following methods to add a database field to an existing report:
engine.getDatabaseTables().getDataSource(string).getTableSource(int or string).addColumn(String, int).
Getting of a DatabaseField is handled by class Fields.
You can use the following method to get a database field of an existing report:
engine.getFields().getDatabaseField( int or string).
To print the fetched data in the report you have to fill it into a FieldElement or FieldPart.
This class is part of the RDC.
Fields.getDatabaseFieldsCount(),
Fields.getDatabaseField(int),
Fields.getDatabaseField(String),
Fields.removeDatabaseField(int),
FieldElement,
FieldPart,
TableSource.addColumn(String, int),
TableSource.getDatabaseField(String),
TableSource.removeColumn(String),
Serialized Form| Field Summary |
|---|
| Fields inherited from class com.inet.report.Field |
|---|
BINARY, BOOLEAN, CURRENCY, CURSOR, DATABASE_FIELD, DATE, DATETIME, FORMULA_FIELD, GROUP_NAME_FIELD, NUMBER, PARAMETER_FIELD, SORT_FIELD, SPECIAL_FIELD, SQL_FIELD, STRING, SUMMARY_FIELD, TIME, UNKNOWN |
| Method Summary | |
|---|---|
java.lang.String |
getColumnLabel()
Returns the label of this DatabaseField. |
java.lang.String |
getShortName()
Returns the short name of a database field. |
TableSource |
getTableSource()
Returns the table source this database field is based on, will never return null |
boolean |
hasColumnLabel()
Returns whether a column label was set or not. |
void |
setColumnLabel(java.lang.String columnLabel)
Specifies an alias for table columns. |
void |
setName(java.lang.String fullname)
Specifies the name of the database field. |
| Methods inherited from class com.inet.report.Field |
|---|
checkNameExists, duplicate, extractReference, getField, getGroup, getName, getPlaceholderName, getRefName, getType, getValueType, indexOf, paramString, setField, setGroup, setValueType, trimAwayBrackets |
| Methods inherited from interface com.inet.report.parser.NodeParser |
|---|
isDOMParser, parseDOM, parseElement, parseEndElement, parseText |
| Method Detail |
|---|
public void setName(java.lang.String fullname)
throws ReportException
setName in class Fieldfullname - The qualified column name for this database field.
ReportException - If the alias or table name was missing.
java.lang.IllegalArgumentException - If the database field name was emptypublic void setColumnLabel(java.lang.String columnLabel)
columnLabel - Label of the database fieldgetColumnLabel(),
hasColumnLabel()public java.lang.String getColumnLabel()
getColumnLabel(),
hasColumnLabel()public boolean hasColumnLabel()
setColumnLabel(String),
getColumnLabel()public java.lang.String getShortName()
public TableSource getTableSource()
|
i-net Crystal-Clear | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||