|
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.SQLValueProvider
com.inet.report.FieldValueProvider
public class FieldValueProvider
The FieldValueProvider takes one or two DatabaseFields and at run time provides the values in the fields as default values. The first DatabaseField is used to fetch the values and the second is used to fetch the default values.
| Field Summary |
|---|
| Fields inherited from class com.inet.report.SQLValueProvider |
|---|
MAX_RECORDS |
| Constructor Summary | |
|---|---|
FieldValueProvider(DatabaseField values,
DatabaseField descriptions,
int sortType)
Creates a FieldValueProvider with the given DatabaseFields. |
|
| Method Summary | |
|---|---|
Datasource |
getDatasource()
Returns the data source the query is to be run on |
DatabaseField |
getDescriptions()
Returns the DatabaseField responsible for fetching the descriptions from. |
java.lang.String |
getFieldRefName()
Returns the name to be used as the SQL reference name in the WHERE part of the query used by a cascading prompt referencing this as its parent. |
protected java.lang.String |
getSQL(java.lang.String where)
Returns the query to be used, using the given String as its WHERE condition |
java.lang.String |
getSQL()
Returns the query which is to be used for fetching the values and optionally descriptions dynamically. |
int |
getSortType()
Returns the SortField constant specifying how the values are to be sorted. |
DatabaseField |
getValues()
Returns the DatabaseField responsible for fetching the values from. |
NodeParser |
parseElement(com.inet.report.parser.XMLTag group,
java.lang.String tag,
org.xml.sax.Attributes atts,
java.util.Map parserMap)
Internal method for reading report XML Parses an XML node with the given information, and returns either a sub-element which was created as a result, or null if no sub-element was created, i.e. the information was applied to the ReportComponent itself. |
void |
setDatasource(Datasource datasource)
Sets the datasource to run the query on. |
void |
setDescriptions(DatabaseField descriptions)
Sets the description DatabaseField. |
void |
setSortType(int sortType)
Sets the sort type, specifying how the values are to be sorted. |
void |
setValues(DatabaseField values)
Sets the DatabaseField for fetching the values from. |
| Methods inherited from class com.inet.report.SQLValueProvider |
|---|
getDefaultValues |
| Methods inherited from interface com.inet.report.parser.NodeParser |
|---|
isDOMParser, parseDOM, parseEndElement, parseText |
| Constructor Detail |
|---|
public FieldValueProvider(DatabaseField values,
DatabaseField descriptions,
int sortType)
values - DatabaseField to use to fetch the values. Must not be null.descriptions - DatabaseField to use to fetch the descriptions. May be null. If not, it must be a String field and its Tablesource
must be the same as the values' TableSourcesortType - The SortField constant to specify how the values are to be sorted.
java.lang.IllegalArgumentException - if values is null, or the table sources of the two fields
are not the same or the table source comes from an SQL querySortField.ASCENDING_ORDER,
SortField.DESCENDING_ORDER,
SortField.ORIGINAL_ORDER| Method Detail |
|---|
protected java.lang.String getSQL(java.lang.String where)
where - WHERE condition to use. If no WHERE condition is to be used, use an empty string.
public java.lang.String getSQL()
getSQL in class SQLValueProviderpublic int getSortType()
SortField.ASCENDING_ORDER,
SortField.DESCENDING_ORDER,
SortField.ORIGINAL_ORDERpublic void setSortType(int sortType)
sortType - SortField constant specifying how to sort the values.SortField.ASCENDING_ORDER,
SortField.DESCENDING_ORDER,
SortField.ORIGINAL_ORDERpublic DatabaseField getDescriptions()
public void setDescriptions(DatabaseField descriptions)
descriptions - DatabaseField for the descriptionspublic DatabaseField getValues()
public void setValues(DatabaseField values)
values - DatabaseField for the values
java.lang.IllegalArgumentException - if values is null or its table source does not match the
description field's table sourcepublic Datasource getDatasource()
getDatasource in class SQLValueProviderpublic void setDatasource(Datasource datasource)
datasource - data source to run the query on.
java.lang.IllegalArgumentException - if datasource is nullpublic java.lang.String getFieldRefName()
reference name = prompt value)".
getFieldRefName in interface CascadingSourceCascadingValueProvider,
SQLValueProvider
public NodeParser parseElement(com.inet.report.parser.XMLTag group,
java.lang.String tag,
org.xml.sax.Attributes atts,
java.util.Map parserMap)
throws FatalParserException
Parses an XML node with the given information, and returns either a sub-element which was created as a result, or null if no sub-element was created, i.e. the information was applied to the ReportComponent itself. Note that the parsing is highly tolerant, i.e. exceptions are intercepted and suppressed if at all possible.
parseElement in interface NodeParsergroup - XMLTag of the current node to be parsed, or null if there is no such current group. An XMLTag is a group
of nodes bundled together, usually it is a Properties node such as CommonProperties, BorderProperties, etc.tag - The XMLTag to be parsedatts - The set of attributes in the current XMLTagparserMap - The map of current Parser.
FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the
reading of the report.
|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||