|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.inet.report.Field
public abstract class Field
Field is the superclass of the different types of fields which can be used in a report. It summarizes the properties shared by all fields. A field is dynamic content in a report, it
will be evaluated at runtime and deliver static content (text, picture, ...) for each record to the element that uses the field. I.e. if you want to insert a dynamic label into your report, you
have to use a FieldElement or a Text with a FieldPart. Both FieldElement and FieldPart get their content from a
Field. For each kind of source there is a specialized subclass. There are SpecialField s for contents like 'page number' and 'current date/time',
DatabaseField s for content that comes from a database, PromptField s for content that the user will be asked for at runtime, FormulaField s for content
that is calculated by a formula, ... .
All fields are collected within the class Fields, so you can not create an instance of Field or subclasses.
If you want to instantiate a field by name, the name of the field should start with a special character:
DatabaseFieldSqlExprFieldSummaryFieldFormulaFieldPromptField
Fields,
FieldElement,
FieldPart,
Serialized Form| Field Summary | |
|---|---|
static int |
BINARY
The constant that identifies a Binary value. |
static int |
BOOLEAN
The constant that identifies a Boolean value. |
static int |
CURRENCY
The constant that identifies a Currency value. |
static int |
CURSOR
The constant that identifies a Cursor value. |
static int |
DATABASE_FIELD
Field is a database field. |
static int |
DATE
The constant that identifies a Date value. |
static int |
DATETIME
The constant that identifies a DateTime value. |
static int |
FORMULA_FIELD
Field is a formula field. |
static int |
GROUP_NAME_FIELD
Field is a group name field. |
static int |
NUMBER
The constant that identifies a Number value. |
static int |
PARAMETER_FIELD
Field is a parameter field. |
static int |
SORT_FIELD
Field is a sort field. |
static int |
SPECIAL_FIELD
Field is a special field. |
static int |
SQL_FIELD
Field is a sql field. |
static int |
STRING
The constant that identifies a String value. |
static int |
SUMMARY_FIELD
Field is a summary field. |
static int |
TIME
The constant that identifies a Time value. |
static int |
UNKNOWN
The constant that identifies an unspecific type. |
| Method Summary | |
|---|---|
boolean |
checkNameExists(java.lang.String nameToCheck)
Checks whether the string name is the property 'name' of the field. |
Field |
duplicate(java.lang.String name)
Duplicates this field with all its settings and returns the created Field with the given name. |
protected void |
extractReference(org.xml.sax.Attributes atts)
extracts the referenced field and sets it for this Field object |
Field |
getField()
Gets the field definition element (for example, database field element, prompt field element). |
Group |
getGroup()
Returns the group this field is associated with. |
java.lang.String |
getName()
Returns the value of the property 'name'. |
java.lang.String |
getPlaceholderName()
Returns the placeholder of this field including its brackets, required to use the field in formulas and sql statements. |
java.lang.String |
getRefName()
Returns the value of the property 'name' with a type marker. |
int |
getType()
Returns the value of the property 'type'. |
int |
getValueType()
Returns the value type (or return type) of the field. |
int |
indexOf()
Returns the index of the field in the fields set. |
java.lang.String |
paramString()
Returns a prettified output of this field's name and type. |
void |
setField(Field newField)
Sets the field definition element (for example, DatabaseField element, prompt field element). |
void |
setGroup(Group group)
Sets the group this field should associated with. |
abstract void |
setName(java.lang.String newValue)
Sets the value of the property 'name'. |
void |
setValueType(int newValue)
Sets the value of the property 'value type'. |
protected java.lang.String |
trimAwayBrackets(java.lang.String refname)
trims away "{" before and after string, e.g. |
| Methods inherited from interface com.inet.report.parser.NodeParser |
|---|
isDOMParser, parseDOM, parseElement, parseEndElement, parseText |
| Field Detail |
|---|
public static final int NUMBER
public static final int CURRENCY
public static final int BOOLEAN
public static final int DATE
public static final int TIME
public static final int STRING
public static final int BINARY
public static final int DATETIME
public static final int CURSOR
public static final int UNKNOWN
public static final int DATABASE_FIELD
public static final int FORMULA_FIELD
public static final int SUMMARY_FIELD
public static final int SPECIAL_FIELD
public static final int GROUP_NAME_FIELD
public static final int PARAMETER_FIELD
public static final int SORT_FIELD
public static final int SQL_FIELD
| Method Detail |
|---|
public java.lang.String paramString()
public java.lang.String getPlaceholderName()
public java.lang.String getName()
setName(java.lang.String),
getRefName()
public abstract void setName(java.lang.String newValue)
throws ReportException
newValue - newValue The new value of the property 'name'.
ReportException - will thrown if the name already exists or is not allowed.public java.lang.String getRefName()
getName(),
getType()public Field getField()
Field The current value of the 'field' property.public void setField(Field newField)
newField - The new field element of the property 'field'.public int getType()
DATABASE_FIELD,
FORMULA_FIELD,
SUMMARY_FIELD,
SPECIAL_FIELD,
GROUP_NAME_FIELD,
PARAMETER_FIELD,
SORT_FIELD,
SQL_FIELD,
DatabaseField,
FormulaField,
SummaryField,
SpecialField,
GroupField,
PromptField,
SortField,
SQLFieldpublic Group getGroup()
null.SummaryField,
GroupField,
Grouppublic void setGroup(Group group)
group - The reference to the group of this field.SummaryField,
GroupField,
Grouppublic int getValueType()
java.lang.IllegalStateException - if the field is in a state where the value type can not be determinedNUMBER,
CURRENCY,
BOOLEAN,
DATE,
TIME,
STRING,
DATETIMEpublic void setValueType(int newValue)
newValue - The new value of the property 'value type'.
java.lang.IllegalArgumentException - If newValue is not one of the types below (NUMBER, CURRENCY, ...):NUMBER,
CURRENCY,
BOOLEAN,
DATE,
TIME,
STRING,
DATETIME,
CURSOR,
BINARYpublic int indexOf()
Fields.removeDatabaseField(int),
Fields.removeFormulaField(int),
Fields.removePromptField(int),
Fields.removeSummaryField(int),
Fields.removeSQLField(int),
Fields.removeSortField(int),
Fields.getDatabaseField(int),
Fields.getFormulaField(int),
Fields.getPromptField(int),
Fields.getSummaryField(int),
Fields.getSQLExpressionField(int),
Fields.getSortField(int)public boolean checkNameExists(java.lang.String nameToCheck)
nameToCheck - Name to be checked
protected void extractReference(org.xml.sax.Attributes atts)
throws ReportException
atts - XML attributes containing "name" and "value"
ReportException - If there are problems setting the fieldprotected java.lang.String trimAwayBrackets(java.lang.String refname)
refname - name to trim
public Field duplicate(java.lang.String name)
name - the name the created field should have.
java.lang.IllegalArgumentException - if an field with the given name already exists .
java.lang.UnsupportedOperationException - if a field which is not a FormulaField, PromptField,
SQLField, or SummaryField is attempted to be duplicated
|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||