Package com.activeviam.copper
Class MeasureMetadata
- java.lang.Object
-
- com.activeviam.copper.MeasureMetadata
-
- All Implemented Interfaces:
IClone<MeasureMetadata>,Cloneable
public class MeasureMetadata extends Object implements IClone<MeasureMetadata>
Contains the additional information required to publish a measure into a cube.- Author:
- ActiveViam
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMeasureMetadata.UserSpecificFlags for user-specified metadata.
-
Constructor Summary
Constructors Constructor Description MeasureMetadata()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MeasureMetadataclone()This method is very similar to the one used by Object except that it returns the real class.static MeasureMetadatacopyOnlyType(MeasureMetadata metadata)Returns a newMeasureMetadatacontaining only the type of the given metadata.StringgetDescription()Gets this measure's description.booleangetExecuteInDataCube()Returns true if the measure should be executed in the data cube.StringgetFolder()Gets the folder for a measure.StringgetFormatter()Gets the formatter of this measure.StringgetMeasureGroup()Gets this measure's group.StringgetName()Gets the name of this measure.IntegergetType()Deprecated, for removal: This API element is subject to removal in a future version.the type will be stored in the Copper Measure instance in the futureintgetXmlaAggregator()Gets this measure's xmla aggregator.booleanhasUserSpecification()Checks if the user has specified something.booleanisUserSpecified(MeasureMetadata.UserSpecific userSpecifiedMetadata)Gets whether the user has specified the given metadata.BooleanisVisible()Returns whether the measure is visible.voidsetDescription(String description)Sets this measure's description.voidsetExecuteInDataCube(boolean executeInDataCube)Activates the execution of the measure in the data cube if the setup is distributed.voidsetFolder(String folder)Changes the folder.voidsetFormatter(String formatter)Sets the formatter of this measure.voidsetMeasureGroup(String measureGroup)Sets this measure's group.voidsetName(String name)Sets the name of this measure.voidsetType(int type)Deprecated, for removal: This API element is subject to removal in a future version.the type will be stored in the Copper Measure instance in the futurevoidsetUserSpecifiedMetadata(MeasureMetadata.UserSpecific userSpecifiedMetadata)Marks the metadata item as specified by the user.voidsetVisible(boolean visible)Changes the visibility.voidsetXmlaAggregator(int aggregator)Sets this measure's xmla aggregator.StringtoString()voidunsetName()Marks the metadata name as NOT specified by the user.voidunsetUserSpecifiedMetadata(MeasureMetadata.UserSpecific userSpecifiedMetadata)Marks the metadata item as NOT specified by the user.
-
-
-
Method Detail
-
setVisible
public void setVisible(boolean visible)
Changes the visibility.- Parameters:
visible- whether the measure should be visible
-
isVisible
public Boolean isVisible()
Returns whether the measure is visible. Ifnull, it means the user didn't change it.- Returns:
trueif the measure is visible,falseotherwise
-
setFolder
public void setFolder(String folder)
Changes the folder.- Parameters:
folder- the new folder to use- See Also:
getFolder()
-
getFolder
public String getFolder()
Gets the folder for a measure.- Returns:
- the folder of the measure
- See Also:
IMeasureMemberDescription.getFolder()
-
setFormatter
public void setFormatter(String formatter)
Sets the formatter of this measure.- Parameters:
formatter- the formatter
-
getFormatter
public String getFormatter()
Gets the formatter of this measure.- Returns:
- the formatter
-
setName
public void setName(String name)
Sets the name of this measure.- Parameters:
name- the name
-
getName
public String getName()
Gets the name of this measure.- Returns:
- the name
-
setType
@DeprecatedApi(forRemoval="6.1.0") @Deprecated(since="6.0.6", forRemoval=true) public void setType(int type)
Deprecated, for removal: This API element is subject to removal in a future version.the type will be stored in the Copper Measure instance in the futureSets the type of this measure.- Parameters:
type- the type
-
getType
@DeprecatedApi(forRemoval="6.1.0") @Deprecated(since="6.0.6", forRemoval=true) public Integer getType()
Deprecated, for removal: This API element is subject to removal in a future version.the type will be stored in the Copper Measure instance in the futureGets the type of this measure.- Returns:
- the type
-
setMeasureGroup
public void setMeasureGroup(String measureGroup)
Sets this measure's group.- Parameters:
measureGroup- the group
-
getMeasureGroup
public String getMeasureGroup()
Gets this measure's group.- Returns:
- the group
-
setDescription
public void setDescription(String description)
Sets this measure's description.- Parameters:
description- the description
-
getDescription
public String getDescription()
Gets this measure's description.- Returns:
- the description
-
setXmlaAggregator
public void setXmlaAggregator(int aggregator)
Sets this measure's xmla aggregator.- Parameters:
aggregator- the xmla aggregator
-
getXmlaAggregator
public int getXmlaAggregator()
Gets this measure's xmla aggregator.- Returns:
- the xmla aggregator
-
setExecuteInDataCube
public void setExecuteInDataCube(boolean executeInDataCube)
Activates the execution of the measure in the data cube if the setup is distributed. By default, the measures described in Copper are executed in the query cube.
-
getExecuteInDataCube
public boolean getExecuteInDataCube()
Returns true if the measure should be executed in the data cube.
-
setUserSpecifiedMetadata
public void setUserSpecifiedMetadata(MeasureMetadata.UserSpecific userSpecifiedMetadata)
Marks the metadata item as specified by the user.- Parameters:
userSpecifiedMetadata- the metadata specified by the user
-
unsetUserSpecifiedMetadata
public void unsetUserSpecifiedMetadata(MeasureMetadata.UserSpecific userSpecifiedMetadata)
Marks the metadata item as NOT specified by the user.- Parameters:
userSpecifiedMetadata- the specified metadata to unset
-
isUserSpecified
public boolean isUserSpecified(MeasureMetadata.UserSpecific userSpecifiedMetadata)
Gets whether the user has specified the given metadata.- Parameters:
userSpecifiedMetadata- the metadata- Returns:
trueif the user has specified the given metadata,falseotherwise
-
hasUserSpecification
public boolean hasUserSpecification()
Checks if the user has specified something.- Returns:
trueif the user has specified something,falseotherwise
-
unsetName
public void unsetName()
Marks the metadata name as NOT specified by the user.
-
clone
public MeasureMetadata clone()
Description copied from interface:ICloneThis method is very similar to the one used by Object except that it returns the real class.- Specified by:
clonein interfaceIClone<MeasureMetadata>- Returns:
- a clone of the object
-
copyOnlyType
public static MeasureMetadata copyOnlyType(MeasureMetadata metadata)
Returns a newMeasureMetadatacontaining only the type of the given metadata.- Parameters:
metadata- the given metadata we want to copy the type of- Returns:
- aforementioned new MeasureMetadata
-
-