Class LevelHandle
java.lang.Object
org.eclipse.birt.report.model.api.DesignElementHandle
org.eclipse.birt.report.model.api.ReportElementHandle
org.eclipse.birt.report.model.api.olap.LevelHandle
- All Implemented Interfaces:
org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel
,org.eclipse.birt.report.model.elements.interfaces.ILevelModel
- Direct Known Subclasses:
OdaLevelHandle
,TabularLevelHandle
public abstract class LevelHandle
extends ReportElementHandle
implements org.eclipse.birt.report.model.elements.interfaces.ILevelModel
Represents a level element.
- See Also:
-
Level
-
Field Summary
Fields inherited from class org.eclipse.birt.report.model.api.ReportElementHandle
element
Fields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
module
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel
COMMENTS_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
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.ILevelModel
ACL_EXPRESSION_PROP, ACTION_PROP, ALIGNMENT_PROP, ATTRIBUTES_PROP, DATA_TYPE_PROP, DATE_TIME_FORMAT_PROP, DATE_TIME_LEVEL_TYPE, DEFAULT_VALUE_PROP, FORMAT_PROP, INTERVAL_BASE_PROP, INTERVAL_PROP, INTERVAL_RANGE_PROP, LEVEL_TYPE_PROP, MEMBER_ACL_EXPRESSION_PROP, STATIC_VALUES_PROP, VALUE_ACCESS_CONTROLS_PROP
-
Constructor Summary
ConstructorsConstructorDescriptionLevelHandle
(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Constructs a handle for the given design and design element. -
Method Summary
Modifier and TypeMethodDescriptionReturns the iterator for action defined on this level.Returns the iterator of attributes.Gets the expression handle for theACLExpression
property.Returns a handle to work with the action property, action is a structure that defines a hyperlink.Gets the alignment of the level.Returns the data type of this level.Returns the date-time format of this level.Returns the date-time type of this level.Gets the default value of this level.Gets the format of the level.Returns the interval of this level.Return the interval base property value of this level.double
Returns the interval range of this level.Returns the level type of this level.Gets the expression handle for the ACL expression for any member of this level.Set an action on the level.void
setAlignment
(String alignment) Sets the alignment of the level.void
setDataType
(String dataType) Sets the data type of this level.void
setDateTimeFormat
(String dateTimeFormat) Sets the date-time format of this level.void
setDateTimeLevelType
(String dateTimeType) Sets the date-time type of this level.void
setDefaultValue
(String defaultValue) Sets the default value of this level.void
setFormat
(FormatValue format) Sets the format of the level.void
setInterval
(String interval) Returns the interval of this level.void
setIntervalBase
(String intervalBase) Sets the base of the interval property of this level.IntervalBase, in conjunction with Interval and IntervalRange, determines how data is divided into levels.void
setIntervalRange
(double intervalRange) Returns the interval range of this level.void
setIntervalRange
(String intervalRange) Sets the interval range of this level.void
setLevelType
(String levelType) Sets the level type.Returns the iterator of static values.Returns an iterator for the value access controls.Methods inherited from class org.eclipse.birt.report.model.api.ReportElementHandle
getComments, getCustomXml, getDisplayName, getDisplayNameKey, getElement, getPropertyMask, isValidLayoutForCompoundElement, isValidReferenceForCompoundElement, propertyMaskIterator, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setPropertyMask
Methods inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
add, 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, getPropertyHandle, 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, slotsIterator
-
Constructor Details
-
LevelHandle
public LevelHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Constructs a handle for the given design and design element. The application generally does not create handles directly. Instead, it uses one of the navigation methods available on other element handles.- Parameters:
module
- the moduleelement
- the model representation of the element
-
-
Method Details
-
attributesIterator
Returns the iterator of attributes. The element in the iterator is aLevelAttributeHandle
for TabularLevel. To OdaLevel, each member isOdaLevelAttributeHandle
.- Returns:
- the iterator of attribute string list
-
staticValuesIterator
Returns the iterator of static values. The element in the iterator is instanceofRuleHandle
.- Returns:
- iterator of static values
-
setIntervalBase
Sets the base of the interval property of this level.IntervalBase, in conjunction with Interval and IntervalRange, determines how data is divided into levels.- Parameters:
intervalBase
- interval base property value.- Throws:
SemanticException
- if the property is locked.
-
getIntervalBase
Return the interval base property value of this level.- Returns:
- interval baseF property value of this level.
-
getInterval
Returns the interval of this level. The return value is defined inDesignChoiceConstants
and can be one of:INTERVAL_NONE
INTERVAL_PREFIX
INTERVAL_INTERVAL
- Returns:
- the interval value as a string
-
setInterval
Returns the interval of this level. The input value is defined inDesignChoiceConstants
and can be one of:INTERVAL_NONE
INTERVAL_PREFIX
INTERVAL_INTERVAL
- Parameters:
interval
- the interval value as a string- Throws:
SemanticException
- if the property is locked or the input value is not one of the above.
-
getIntervalRange
public double getIntervalRange()Returns the interval range of this level.- Returns:
- the interval range value as a double
-
setIntervalRange
Returns the interval range of this level.- Parameters:
intervalRange
- the interval range value as a double- Throws:
SemanticException
- if the property is locked.
-
setIntervalRange
Sets the interval range of this level.- Parameters:
intervalRange
- the interval range value as a string.value is locale dependent.- Throws:
SemanticException
- if the property is locked.
-
getLevelType
Returns the level type of this level. The returned value is one of:LEVEL_TYPE_DYNAMIC
LEVEL_TYPE_MIRRORED
- Returns:
- the level type
-
setLevelType
Sets the level type. The input value is defined inDesignChoiceConstants
and can be one of:LEVEL_TYPE_DYNAMIC
LEVEL_TYPE_MIRRORED
- Parameters:
levelType
-- Throws:
SemanticException
-
getDataType
Returns the data type of this level. The possible values are defined inDesignChoiceConstants
, and they are:- COLUMN_DATA_TYPE_ANY
- COLUMN_DATA_TYPE_INTEGER
- COLUMN_DATA_TYPE_STRING
- COLUMN_DATA_TYPE_DATETIME
- COLUMN_DATA_TYPE_DECIMAL
- COLUMN_DATA_TYPE_FLOAT
- COLUMN_DATA_TYPE_STRUCTURE
- COLUMN_DATA_TYPE_TABLE
- Returns:
- the data type of this level.
-
setDataType
Sets the data type of this level. The allowed values are defined inDesignChoiceConstants
, and they are:- COLUMN_DATA_TYPE_ANY
- COLUMN_DATA_TYPE_INTEGER
- COLUMN_DATA_TYPE_STRING
- COLUMN_DATA_TYPE_DATETIME
- COLUMN_DATA_TYPE_DECIMAL
- COLUMN_DATA_TYPE_FLOAT
- COLUMN_DATA_TYPE_STRUCTURE
- COLUMN_DATA_TYPE_TABLE
- Parameters:
dataType
- the data type to set- Throws:
SemanticException
- if the dataType is not in the choice list.
-
valueAccessControlsIterator
Returns an iterator for the value access controls. Each object returned is of typeValueAccessControlHandle
.- Returns:
- the iterator for user accesses defined on this cube.
-
getDateTimeLevelType
Returns the date-time type of this level. The possible values are defined inDesignChoiceConstants
, and they are:- DATE_TIME_LEVEL_TYPE_YEAR
- DATE_TIME_LEVEL_TYPE_MONTH
- DATE_TIME_LEVEL_TYPE_QUARTER
- DATE_TIME_LEVEL_TYPE_WEEK
- DATE_TIME_LEVEL_TYPE_DAY
- DATE_TIME_LEVEL_TYPE_HOUR
- DATE_TIME_LEVEL_TYPE_MINUTE
- DATE_TIME_LEVEL_TYPE_SECOND
- Returns:
- the date-time type of this level.
-
setDateTimeLevelType
Sets the date-time type of this level. The allowed values are defined inDesignChoiceConstants
, and they are:- DATE_TIME_LEVEL_TYPE_YEAR
- DATE_TIME_LEVEL_TYPE_MONTH
- DATE_TIME_LEVEL_TYPE_QUARTER
- DATE_TIME_LEVEL_TYPE_WEEK
- DATE_TIME_LEVEL_TYPE_DAY
- DATE_TIME_LEVEL_TYPE_HOUR
- DATE_TIME_LEVEL_TYPE_MINUTE
- DATE_TIME_LEVEL_TYPE_SECOND
- Parameters:
dateTimeType
- the date-time type to set- Throws:
SemanticException
- if the dateTimeType is not in the choice list.
-
getDateTimeFormat
Returns the date-time format of this level.- Returns:
- the date-time format of this level.
-
setDateTimeFormat
Sets the date-time format of this level.- Parameters:
dateTimeFormat
- the date-time format to set- Throws:
SemanticException
- if the date-time-format is locked
-
setDefaultValue
Sets the default value of this level.- Parameters:
defaultValue
- the default value.- Throws:
SemanticException
-
getDefaultValue
Gets the default value of this level.- Returns:
- the default value.
-
getACLExpression
Gets the expression handle for theACLExpression
property.- Returns:
-
getMemberACLExpression
Gets the expression handle for the ACL expression for any member of this level.- Returns:
-
getActionHandle
Returns a handle to work with the action property, action is a structure that defines a hyperlink.- Returns:
- a handle to the action property, return
null
if the action has not been set on the level. - See Also:
-
setAction
Set an action on the level.- Parameters:
action
- new action to be set on the level, it represents a bookmark link, hyper-link, and drill through etc.- Returns:
- a handle to the action property, return
null
if the action has not been set on the level. - Throws:
SemanticException
- if member of the action is not valid.
-
actionsIterator
Returns the iterator for action defined on this level.- Returns:
- the iterator for
Action
structure list defined on this level
-
getFormat
Gets the format of the level.- Returns:
- the format, or null if not set.
-
setFormat
Sets the format of the level.- Parameters:
format
- the format to set.- Throws:
SemanticException
-
getAlignment
Gets the alignment of the level. The returned value may be one of the following constants defined inDesignChoiceConstants
:
- TEXT_ALIGN_LEFT
- TEXT_ALIGN_CENTER
- TEXT_ALIGN_RIGHT
- TEXT_ALIGN_JUSTIFY
- Returns:
- the alignment of the level.
-
setAlignment
Sets the alignment of the level. The value to set should be one of the following constants defined inDesignChoiceConstants
:
- TEXT_ALIGN_LEFT
- TEXT_ALIGN_CENTER
- TEXT_ALIGN_RIGHT
- TEXT_ALIGN_JUSTIFY
- Parameters:
alignment
- the new alignment to set.- Throws:
SemanticException
-