public abstract class DataSetHandle extends ReportElementHandle implements org.eclipse.birt.report.model.elements.interfaces.IDataSetModel, org.eclipse.birt.report.model.elements.interfaces.ISimpleDataSetModel
A data set has three key parts:
Data transforms that can be defined on a data set include:
The application can use scripts to execute code on certain data set events.
To get a handle for the data source, uses the following example:
DataSetHandle dataHandle = designHandle
findDataSet( "My First Data Set " );
This class works with the static design definition of the data set. Many clients will prefer to work with the TBD class that provides both the static definition and additional design information retrieved from the data provider. For example, a particular data set may not define a result set in the design file if the data provider can provide the result set definition itself. This handle will return null for the result set handle. However, the TBD class will provide the full result set: either by returning the one in the design file, or by obtaining it from the data provider.
SimpleDataSetelementmoduleACL_EXPRESSION_PROP, CACHED_METADATA_PROP, COLUMN_HINTS_PROP, COMPUTED_COLUMNS_PROP, FILTER_PROP, IS_VISIBLE_PROP, LOCALE_PROP, NEEDS_CACHE_PROP, NULLS_ORDERING_PROP, PARAMETERS_PROP, RESULT_SET_HINTS_PROP, RESULT_SET_PROP, ROW_ACL_EXPRESSION_PROP, ROW_FETCH_LIMIT_PROP, SORT_HINTS_PROPAFTER_CLOSE_METHOD, AFTER_OPEN_METHOD, BEFORE_CLOSE_METHOD, BEFORE_OPEN_METHOD, CACHED_ROW_COUNT_PROP, DATA_SET_ROW_LIMIT, DATA_SOURCE_PROP, ON_FETCH_METHOD, PARAM_BINDINGS_PROPCOMMENTS_PROP, CUSTOM_XML_PROP, DISPLAY_NAME_ID_PROP, DISPLAY_NAME_PROP, EVENT_HANDLER_CLASS_PROP, EXTENDS_PROP, FULL_LABEL, ID_SUFFIX, NAME_PROP, NEW_HANDLER_ON_EACH_EVENT_PROP, NO_SLOT, PROPERTY_MASKS_PROP, REF_TEMPLATE_PARAMETER_PROP, SHORT_LABEL, USER_LABEL, USER_PROPERTIES_PROP, VIEW_ACTION_PROP| 构造器和说明 |
|---|
DataSetHandle(org.eclipse.birt.report.model.core.Module module,
org.eclipse.birt.report.model.core.DesignElement element)
Constructs a data set handle with the given design and element.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addFilter(FilterCondition fc)
Adds the filter condition.
|
java.util.Iterator |
columnHintsIterator()
Returns an iterator over column hints.
|
java.util.Iterator |
computedColumnsIterator()
Returns an iterator for the list of computed columns.
|
java.util.Iterator |
filtersIterator()
Returns an iterator over filter.
|
ExpressionHandle |
getACLExpression()
Gets the expression handle for the
ACLExpression property. |
java.lang.String |
getAfterClose()
Returns the code of the afterClose method.
|
java.lang.String |
getAfterOpen()
Returns the code of the afterOpen method.
|
java.lang.String |
getBeforeClose()
Returns the code of the beforeClose method.
|
java.lang.String |
getBeforeOpen()
Returns the code of the beforeOpen method.
|
CachedMetaDataHandle |
getCachedMetaDataHandle()
Return a handle to deal with the cached data set information that include
output column information when it gets from databases, input/output
parameter definitions.
|
int |
getCachedRowCount()
已过时。
by getDataSetRowLimit method
|
int |
getDataSetRowLimit()
已过时。
duplicate with method getRowFetchLimit()
|
DataSourceHandle |
getDataSource()
Returns a handle to the data source for this data set.
|
java.lang.String |
getDataSourceName()
Returns the name of the data source for this data set.
|
com.ibm.icu.util.ULocale |
getLocale()
Gets the locale of this data set element.
|
java.lang.String |
getNullsOrdering()
Gets the ordering of null values.
|
java.lang.String |
getOnFetch()
Returns the code of the onFetch method.
|
PropertyHandle |
getPropertyHandle(java.lang.String propName)
Returns a property handle for a top-level property.
|
ExpressionHandle |
getRowACLExpression()
Gets the expression handle for the ACL expression for one row.
|
int |
getRowFetchLimit()
Returns the max number of rows from data set property value.
|
boolean |
isVisible()
Gets the isVisible property value.
|
boolean |
needsCache()
Determines whether to do some cache when rendering the report.
|
java.util.Iterator |
paramBindingsIterator()
Returns an iterator over the list of parameter bindings.
|
java.util.Iterator |
parametersIterator()
Returns an iterator over the list of output parameter definitions.
|
void |
removeFilter(FilterCondition fc)
Removes the filter condition.
|
java.util.Iterator |
resultSetHintsIterator()
Returns an iterator over hints of the result set columns.
|
java.util.Iterator |
resultSetIterator()
Returns an iterator over the result set columns.
|
void |
setAfterClose(java.lang.String code)
Sets the code for the afterClose method.
|
void |
setAfterOpen(java.lang.String code)
Sets the code for the afterOpen method.
|
void |
setBeforeClose(java.lang.String code)
Sets the code for the beforeClose method.
|
void |
setBeforeOpen(java.lang.String code)
Sets the code for the beforeOpen method.
|
CachedMetaDataHandle |
setCachedMetaData(CachedMetaData metadata)
Set the value for the cached data set information.
|
void |
setCachedRowCount(int count)
已过时。
by setDataSetRowLimit method
|
void |
setDataSetRowLimit(int count)
已过时。
duplicate with method setRowFetchLimit()
|
void |
setDataSource(java.lang.String name)
Sets the name of the data source for this data set.
|
void |
setIsVisible(boolean isVisible)
Sets the isVisible property value.
|
void |
setLocale(com.ibm.icu.util.ULocale locale)
Sets the locale for this data set element.
|
void |
setNeedsCache(boolean needsCache)
Sets whether to do some cache when rendering the report.
|
void |
setNullsOrdering(java.lang.String nullsOrdering)
Sets the ordering of null values.
|
void |
setOnFetch(java.lang.String code)
Sets the code for the onFetch method.
|
void |
setRowFetchLimit(int count)
Sets the max number of rows from data set property value.
|
java.util.Iterator<SortHintHandle> |
sortHintsIterator()
Returns an iterator over sort hints.
|
getComments, getCustomXml, getDisplayName, getDisplayNameKey, getElement, getPropertyMask, isValidLayoutForCompoundElement, isValidReferenceForCompoundElement, propertyMaskIterator, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setPropertyMaskadd, add, addElement, addElement, addListener, addUserPropertyDefn, cachePropertyHandles, canContain, canContain, canContain, canContain, canDrop, canEdit, canTransformToTemplate, clearAllProperties, clearContents, clearProperty, clientsIterator, copy, copyPropertyTo, createTemplateElement, derivedIterator, doSort, drop, drop, drop, dropAndClear, dropAndClear, dropAndClear, dropUserPropertyDefn, findContentSlot, getBooleanProperty, getChoices, getColorProperty, getContainer, getContainerPropertyHandle, getContainerSlotHandle, getContent, getContentCount, getContents, getDefn, getDesign, getDesignHandle, getDimensionProperty, getDisplayLabel, getDisplayLabel, getDisplayProperty, getEffectiveModule, getElementFactory, getElementProperty, getEventHandlerClass, getExpressionProperty, getExtends, getExternalizedValue, getExternalizedValue, getExternalizedValue, getFactoryElementHandle, getFactoryPropertyHandle, getFloatProperty, getFontProperty, getFullName, getHostViewHandle, getID, getIndex, getIntProperty, getListProperty, getListProperty, getMethods, getModule, getModuleHandle, getName, getNumberProperty, getPrivateStyle, getProperty, getPropertyBinding, getPropertyBindingExpression, getPropertyBindings, getPropertyDefn, getPropertyIterator, getQualifiedName, getRoot, getSemanticErrors, getSlot, getStringProperty, getStyle, getUserProperties, getUserPropertyDefnHandle, getXPath, hasLocalProperties, hasSemanticError, initializeSlotHandles, isDirectionRTL, isInTemplateParameter, isTemplateParameterValue, isValid, localize, move, move, moveTo, moveTo, moveTo, moveTo, newHandlerOnEachEvent, paste, paste, paste, paste, removeListener, revertToReportItem, revertToTemplate, semanticCheck, setBooleanProperty, setEncryption, setEventHandlerClass, setExpressionProperty, setExtends, setExtendsElement, setExtendsName, setFloatProperty, setIntProperty, setName, setNewHandlerOnEachEvent, setNumberProperty, setProperties, setProperty, setPropertyBinding, setPropertyBinding, setStringProperty, setStyle, setStyleElement, setStyleName, setValid, shift, showError, slotsIteratorpublic DataSetHandle(org.eclipse.birt.report.model.core.Module module,
org.eclipse.birt.report.model.core.DesignElement element)
module - the moduleelement - the model representation of the elementpublic DataSourceHandle getDataSource()
null if the data
source is not set or is undefined.public java.lang.String getDataSourceName()
setDataSource(String)public void setDataSource(java.lang.String name)
throws SemanticException
name - the data source nameSemanticException - if the data source does not exist in the report design, or
the property if locked.getDataSource()public java.util.Iterator parametersIterator()
DataSetParameterHandle that
represents parameter objects.DataSetParameterpublic java.util.Iterator paramBindingsIterator()
ParamBindingHandle that represents
parameter binding object.ParamBindingpublic java.util.Iterator resultSetIterator()
ResultSetColumnHandle that represents result
set column object.ResultSetColumnpublic java.util.Iterator resultSetHintsIterator()
ResultSetColumnHandle that represents
hints of result set column object.ResultSetColumnpublic java.util.Iterator computedColumnsIterator()
ComputedColumnHandle that represents
computed column object.ComputedColumnpublic java.util.Iterator columnHintsIterator()
ColumnHintHandle that represents column hint object.ColumnHintpublic java.util.Iterator<SortHintHandle> sortHintsIterator()
SortHintHandle that represents sort hint object.SortHintpublic java.util.Iterator filtersIterator()
FilterConditionHandle that represents filter condition
object.FilterConditionpublic java.lang.String getBeforeOpen()
public void setBeforeOpen(java.lang.String code)
throws SemanticException
code - the code for the methodSemanticException - If the method is locked.public java.lang.String getBeforeClose()
public void setBeforeClose(java.lang.String code)
throws SemanticException
code - the code for the methodSemanticException - If the method is locked.public java.lang.String getAfterOpen()
public void setAfterOpen(java.lang.String code)
throws SemanticException
code - the code for the methodSemanticException - If the method is locked.public java.lang.String getAfterClose()
public void setAfterClose(java.lang.String code)
throws SemanticException
code - the code for the methodSemanticException - If the method is locked.public java.lang.String getOnFetch()
public void setOnFetch(java.lang.String code)
throws SemanticException
code - the code for the methodSemanticException - If the method is locked.public CachedMetaDataHandle getCachedMetaDataHandle()
CachedMetaDataHandle to deal with the cached data
set information, return null if the property has not
been set.public CachedMetaDataHandle setCachedMetaData(CachedMetaData metadata) throws SemanticException
metadata - a structure value include output column information ,
input/output parameter definitions.CachedMetaDataHandle to the input
metadata, return null if
metadata is null.SemanticException - the input data is not valid.public PropertyHandle getPropertyHandle(java.lang.String propName)
DesignElementHandlegetPropertyHandle 在类中 DesignElementHandlepropName - the name of the property to getnull if the no property
exists with the given name.PropertyHandlepublic void setDataSetRowLimit(int count)
throws SemanticException
count - SemanticExceptionpublic int getDataSetRowLimit()
public void setCachedRowCount(int count)
throws SemanticException
count - the cached row countSemanticExceptionpublic int getCachedRowCount()
public void setRowFetchLimit(int count)
throws SemanticException
count - the row number to fetch from result setSemanticExceptionpublic int getRowFetchLimit()
public void addFilter(FilterCondition fc) throws SemanticException
fc - the filter condition structureSemanticException - if the expression of filter condition is empty or nullpublic void removeFilter(FilterCondition fc) throws SemanticException
fc - the filter condition structureSemanticException - if the given condition doesn't exist in the filterspublic void setNeedsCache(boolean needsCache)
throws SemanticException
needsCache - true if needs do caching when rendering the report, otherwise
falseSemanticExceptionpublic boolean needsCache()
public ExpressionHandle getACLExpression()
ACLExpression property.public ExpressionHandle getRowACLExpression()
public boolean isVisible()
public void setIsVisible(boolean isVisible)
throws SemanticException
isVisible - SemanticExceptionpublic com.ibm.icu.util.ULocale getLocale()
setLocale(ULocale)public void setLocale(com.ibm.icu.util.ULocale locale)
throws SemanticException
locale - the locale to data setSemanticExceptiongetLocale()public java.lang.String getNullsOrdering()
NULLS_ORDERING_NULLS_LOWEST
NULLS_ORDERING_NULLS_HIGHEST
NULLS_ORDERING_EXCLUDE_NULLS
public void setNullsOrdering(java.lang.String nullsOrdering)
throws SemanticException
NULLS_ORDERING_NULLS_LOWEST
NULLS_ORDERING_NULLS_HIGHEST
NULLS_ORDERING_EXCLUDE_NULLS
nullsOrdering - SemanticExceptionCopyright © 2008 Actuate Corp. All rights reserved.