|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface to a data query. The DataQuery interface provides API that
makes data queries independent from data sources. Separating data queries from data
sources makes it possible to have multiple queries on a single source.
| Method Summary | |
Alias |
addAlias(java.lang.String name)
This will create and add an Alias for this query. |
CalculatedField |
addCalculatedField(java.lang.String name)
This will create a CalculatedField in this query. |
Index |
addIndex(java.lang.String name)
Creates a named indexing object. |
void |
checkIndexName(java.lang.String name)
Checks whether the specified name would be valid as a new Index name. |
Alias |
findAlias(java.lang.String name)
Looks up the alias with the specified name. |
CalculatedField |
findCalculatedField(java.lang.String name)
Looks up the field with the specified name in this query. |
Index |
findIndex(java.lang.String name)
Looks up the index with the specified name. |
Alias |
getAlias(int index)
Returns the alias at the specified index. |
int |
getAliasCount()
Returns the number of aliases for this query. |
CalculatedField |
getCalculatedField(int index)
Returns the calculated field at the specified index. |
int |
getCalculatedFieldCount()
Returns the number of calculated fields in this query. |
java.util.Iterator |
getCalculatedFieldIterator()
Returns an iterator of all the calculated fields in the query. |
Handler |
getDataHandler()
Returns the current data handler. |
int |
getDataHandlerType()
Returns the current data handler type associated with this data query. |
DataRange[] |
getDataRanges()
Returns the DataRanges currently listening to this data query. |
Source |
getDataSource()
Returns the DataSource for this query. |
GrantExpression |
getGrantExpression()
Returns the GrantExpression being used to secure this query. |
Group |
getGroup()
Returns the Group this query belongs to. |
int[] |
getGroupingColumns()
Reuturns the grouping columns. |
java.lang.String |
getIntermediateXmlOption(java.lang.String option)
Returns the value of an option set for intermediate XML generation. |
java.util.Properties |
getIntermediateXmlOptions()
Returns a Properties object filled out with the current
set of options for intermediate XML generation. |
com.f1j.data.query.QueryMetaData |
getMetaData(boolean bUseCache)
Returns a QueryMetaData object that describes the fields and groupings in this query. |
java.lang.String |
getName()
Returns the defined name representing this data query. |
com.f1j.data.query.QueryMetaData |
getRawMetaData(boolean bUseCache)
Returns a QueryMetaData object that describes the fields and groupings in this query directly from the database. |
int |
getRefreshIndex()
Returns the refresh index for this data query. |
int[] |
getSortingColumns()
Deprecated. |
int[] |
getSortingTypes()
Deprecated. |
boolean |
getViewTime()
Returns view-time flag. |
java.util.Iterator |
indexes()
Returns an iterator for the indexes in this query. |
boolean |
isListening(DataRange range)
Returns whether the specified data range is listening to this data query. |
boolean |
isListening(java.lang.String name)
Returns whether a data range with the specified name is listening to this data query. |
boolean |
isParameterRequired(java.lang.String paramName)
Returns whether this query requires the specified report parameter. |
boolean |
isParameterUsed(java.lang.String paramName)
Returns whether this query uses the specified report parameter. |
void |
removeAlias(java.lang.String name)
Removes the alias with the specified name from this query. |
void |
removeCalculatedField(java.lang.String name)
Removes the calculated field with the specified name from this query. |
void |
removeIndex(java.lang.String name)
Removes the index with the specified name from this query. |
CalculatedField |
renameCalculatedField(java.lang.String oldName,
java.lang.String newName)
Renames a Calculated Field in this query. |
void |
setDataHandlerType(int dataType)
Changes the type of data this data query will handle. |
void |
setGrantExpression(GrantExpression expression)
Sets the GrantExpression that should be used to secure this query. |
void |
setGroupingColumns(int[] groupings)
Sets the grouping columns to be used. |
void |
setIntermediateXmlOption(java.lang.String option,
java.lang.String value)
Sets an option that applies to intermediate XML generation. |
void |
setName(java.lang.String sourceName)
Sets the defined name that represents this data query. |
void |
setRefreshIndex(int index)
Sets the refresh index for this data query. |
void |
setViewTime(boolean forceRefreshAtViewTime)
Sets view-time flag. |
| Method Detail |
public int getDataHandlerType()
| Type | Description |
| kJDBCResultSet | JDBC result set type. |
| kDelimitedText | Character-delimited text type. |
| kPositionalText | Positionally delimited text type. |
| kXML | XML data type |
| kInvalid | indicates that an invalid data type was used |
setDataHandlerType(int),
Handlerpublic Handler getDataHandler()
Source.setDataHandler(int)public DataRange[] getDataRanges()
isListening(com.f1j.data.DataRange)public Source getDataSource()
DataRangeCollection.setDataSource(com.f1j.data.DataRange, com.f1j.data.source.Source)public Group getGroup()
public int[] getGroupingColumns()
null
if grouping is not supported for the data query type or if no grouping has been
set.setGroupingColumns(int[])public java.lang.String getIntermediateXmlOption(java.lang.String option)
null if the option doesn't exist. Returns an empty string
("") if the option value is empty.getIntermediateXmlOptions(),
setIntermediateXmlOption(java.lang.String, java.lang.String)public java.util.Properties getIntermediateXmlOptions()
Properties object filled out with the current
set of options for intermediate XML generation.getIntermediateXmlOption(java.lang.String),
setIntermediateXmlOption(java.lang.String, java.lang.String)
public com.f1j.data.query.QueryMetaData getMetaData(boolean bUseCache)
throws java.lang.Exception
public com.f1j.data.query.QueryMetaData getRawMetaData(boolean bUseCache)
throws java.lang.Exception
public int[] getSortingColumns()
null
if sorting is not supported for the data query type or if no sorting has been
set.getSortingTypes()public int[] getSortingTypes()
null
if sorting is not supported for the data query type or if no sorting has been set.getSortingColumns()public java.lang.String getName()
setName(java.lang.String)public int getRefreshIndex()
setRefreshIndex(int)public boolean isListening(DataRange range)
range - the default or defined name of the data range.true/false. true
= specified data range is listening.getDataRanges()public boolean isListening(java.lang.String name)
name - the default or defined name of the data range.true/false. true
= specified data range is listening.getDataRanges()public boolean isParameterUsed(java.lang.String paramName)
true = collection uses the specified parameter.public boolean isParameterRequired(java.lang.String paramName)
true = collection requires the specified parameter.
public void setGroupingColumns(int[] groupings)
throws F1Exception
groupings - an integer array indicating the grouping columns. if the array is null or empty,
there is no grouping.getGroupingColumns()
public void setDataHandlerType(int dataType)
throws F1Exception
dataType - an int indicating a supported data type:
| Type | Description |
| kJDBCResultSet | JDBC result set type. |
| kDelimitedText | Character-delimited text type. |
| kPositionalText | Positionally delimited text type. |
| kXML | XML data type |
| kInvalid | indicates that an invalid data type was used |
Handler,
getDataHandler()
public void setIntermediateXmlOption(java.lang.String option,
java.lang.String value)
throws F1Exception
option - a string representing one of two possible XML generation options
based on the XML schema version:
"900" |
the "old" schema from an earlier release. |
"901" |
the "new" schema from a more current release. |
value - One of the following strings indicating how to process column
labels and table names in XML data and whether to enable data grouping:
| Value | Set to | Description |
IncludeColumnLabel |
"true" or "false" |
Include column labels (if present) from data source in XML. |
IncludeTableName |
"true" or "false" |
Include table names (if present) from data source in XML. |
EnableGrouping |
"true" or "false" |
Allow data grouping. |
TrimStringValues |
"true" or "false" |
Trims leading and trailing whitespace from string values. |
setIntermediateXmlOption("SchemaVersion", com.f1j.data.Constants.INTR_XML_SCHEMA_VERSION_900);
setIntermediateXmlOption("SchemaVersion", com.f1j.data.Constants.INTR_XML_SCHEMA_VERSION_901);
The following three options are only valid if the "SchemaVersion" option is set
to INTR_XML_SCHEMA_VERSION_901.
setIntermediateXmlOption("IncludeTableName", "true");
setIntermediateXmlOption("IncludeTableName", "false");
setIntermediateXmlOption("IncludeColumnLabel", "true");
setIntermediateXmlOption("IncludeColumnLabel", "false");
setIntermediateXmlOption("EnableGrouping", "true");
setIntermediateXmlOption("EnableGrouping", "false");
setIntermediateXmlOption("TrimStringValues", "true");
setIntermediateXmlOption("TrimStringValues", "false");
getIntermediateXmlOption(java.lang.String),
getIntermediateXmlOptions()
public void setName(java.lang.String sourceName)
throws F1Exception
sourceName - a defined name representing the data source.sourceName is a name that already existsgetName()public void setRefreshIndex(int index)
index - an int indicating the data query's location in the refresh order.getRefreshIndex()
public Alias addAlias(java.lang.String name)
throws com.f1j.util.InvalidNameException
name - The name of the alias.Aliaspublic Alias findAlias(java.lang.String name)
name - The name of the alias to be found.Aliaspublic Alias getAlias(int index)
index - The index of the desired alias.Aliaspublic int getAliasCount()
Aliaspublic void removeAlias(java.lang.String name)
name - The name of the alias to be removed.Aliaspublic void setGrantExpression(GrantExpression expression)
expression - The grant expression to be used to secure this query.GrantExpressionpublic GrantExpression getGrantExpression()
GrantExpression
public void checkIndexName(java.lang.String name)
throws com.f1j.util.InvalidNameException
name - The name to give a potential index.Index
public Index addIndex(java.lang.String name)
throws com.f1j.util.InvalidNameException
name - The name to give this index.Indexpublic Index findIndex(java.lang.String name)
name - The name of the index to be found.Indexpublic java.util.Iterator indexes()
Indexpublic void removeIndex(java.lang.String name)
name - The name of the index to be removed.Indexpublic void setViewTime(boolean forceRefreshAtViewTime)
forceRefreshAtViewTime - true to force this data set to refresh at view-time,
or false to allow the refresh manager to determine when to refreshpublic boolean getViewTime()
true to force this data set to refresh at view-time,
or false to allow the refresh manager to determine when to refresh
public CalculatedField addCalculatedField(java.lang.String name)
throws F1Exception
name - The name of the field.CalculatedFieldpublic CalculatedField findCalculatedField(java.lang.String name)
name - The name of the field to be found.CalculatedFieldpublic CalculatedField getCalculatedField(int index)
index - The index of the desired field.CalculatedField
public CalculatedField renameCalculatedField(java.lang.String oldName,
java.lang.String newName)
throws InvalidArgumentException
oldName - Name of the existing CalculatedField.newName - New Name of the CalculatedField.CalculatedFieldpublic int getCalculatedFieldCount()
CalculatedField
public void removeCalculatedField(java.lang.String name)
throws F1Exception
name - The name of the calculated field to be removed.CalculatedFieldpublic java.util.Iterator getCalculatedFieldIterator()
CalculatedField
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||