Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.calculation.client.calcBuilder
Class CalcStepStorageHelper

java.lang.Object
  |
  +--oracle.dss.calculation.client.calcBuilder.CalcStepStorageHelper
All Implemented Interfaces:
ErrorHandlerCallback

public class CalcStepStorageHelper
extends java.lang.Object
implements ErrorHandlerCallback

This helper class allows a CalcStep to be saved and loaded using the storage capabilities of MetadataManager and Persistence.


Constructor Summary
CalcStepStorageHelper()
          Constructor that does not specify any arguments.
CalcStepStorageHelper(BuilderContext builderContext)
          Constructor that is based on BuilderContext and is useful if a BuilderContext object such as CalcBuilder already exists.
CalcStepStorageHelper(MetadataManager metadataManager, CalcStep calcStep)
          Constructor that uses a MetadataManager to save the CalcStep.

 

Method Summary
 void addErrorHandler(ErrorHandler errorHandler)
          Adds a single error handler dialog to the bean.
 CalcStep getCalcStep()
          Retrieves the CalcStep object to save.
 ErrorHandler getErrorHandler()
          Retrieve the current error handler.
 MDFolder getMDFolder(CalcStep calcStep)
          Retrieves the MDFolder object that is associated with the specified CalcStep object.
 MDMeasure getMDMeasure()
          Retrieves the saved MDMeasure object.
 MDMeasure getMDMeasure(MDMeasure mdMeasure, CalcStep calcStep)
          Retrieves the MDMeasure object that is associated with the specified CalcStep object.
 MetadataManager getMetadataManager()
          Retrieves the MetadataManager object.
 boolean hasPersistenceConnection(MetadataManager metadataManager)
          Determines whether a persistence connection has been associated with a MetadataManager object.
 boolean isAllowOverwrite()
          Determines whether calculations can be overwritten.
 void removeErrorHandler()
          Removes the error handler dialog from the bean.
 MDObject save()
          Saves the CalcStep object into Persistence and loads the object into the MetadataManager cache.
 MDMeasure saveMDMeasure(MDFolder mdFolder, MDMeasure mdMeasure)
          Saves the specified MDMeasure object.
 void setAllowOverwrite(boolean bAllowOverwrite)
          Specifies whether calculations can be overwritten.
 void setCalcStep(CalcStep calcStep)
          Specifies the CalcStep object to save.
 MDMeasure setMDMeasure(MDMeasure mdMeasure)
          Specifies the MDMeasure object to save.
 void setMetadataManager(MetadataManager metadataManager)
          Specifies the MetadataManager object.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

CalcStepStorageHelper

public CalcStepStorageHelper()
Constructor that does not specify any arguments.

CalcStepStorageHelper

public CalcStepStorageHelper(MetadataManager metadataManager,
CalcStep calcStep)
Constructor that uses a MetadataManager to save the CalcStep.
Parameters:
metadataManager - The MetadataManager object that is used to save the CalcStep object.
calcStep - The CalcStep object to save.

CalcStepStorageHelper

public CalcStepStorageHelper(BuilderContext builderContext)
Constructor that is based on BuilderContext and is useful if a BuilderContext object such as CalcBuilder already exists.
Parameters:
builderContext - A BuilderContext object that is used to retrieve the MetadataManager object and CalcStep object to save.
Method Detail

addErrorHandler

public void addErrorHandler(ErrorHandler errorHandler)
Adds a single error handler dialog to the bean. The bean then calls the error handler with error messages, messages about abnormal situations, and trace messages.
Specified by:
addErrorHandler in interface ErrorHandlerCallback
Parameters:
errorHandler - A ErrorHandler to add.

removeErrorHandler

public void removeErrorHandler()
Removes the error handler dialog from the bean.
Specified by:
removeErrorHandler in interface ErrorHandlerCallback

getErrorHandler

public ErrorHandler getErrorHandler()
Retrieve the current error handler.
Returns:
ErrorHandler which represents the current error handler.

setAllowOverwrite

public void setAllowOverwrite(boolean bAllowOverwrite)
Specifies whether calculations can be overwritten.
Parameters:
bAllowOverwrite - a boolean value that is true when a calculation can be overwritten and false otherwise.

isAllowOverwrite

public boolean isAllowOverwrite()
Determines whether calculations can be overwritten.
Returns:
boolean which is true when calculations can be overwritten, false otherwise.

setMDMeasure

public MDMeasure setMDMeasure(MDMeasure mdMeasure)
Specifies the MDMeasure object to save.
Parameters:
mdMeasure - The MDMeasure value to save.
Returns:
MDMeasure object which was saved.

getMDMeasure

public MDMeasure getMDMeasure()
Retrieves the saved MDMeasure object.
Returns:
MDMeasure object which was saved.

setCalcStep

public void setCalcStep(CalcStep calcStep)
Specifies the CalcStep object to save.
Parameters:
calcStep - The CalcStep value to save.

getCalcStep

public CalcStep getCalcStep()
Retrieves the CalcStep object to save.
Returns:
CalcStep object to save.

setMetadataManager

public void setMetadataManager(MetadataManager metadataManager)
Specifies the MetadataManager object.
Parameters:
metadataManager - The MetadataManager object.

getMetadataManager

public MetadataManager getMetadataManager()
Retrieves the MetadataManager object.
Returns:
The MetadataManager object.

getMDFolder

public MDFolder getMDFolder(CalcStep calcStep)
                     throws javax.naming.NamingException
Retrieves the MDFolder object that is associated with the specified CalcStep object.
Parameters:
calcStep - The CalcStep object to retrieve a folder for.
Returns:
The MDFolder object that represents the folder object, or null.
Throws:
javax.naming.NamingException - If the folder cannot be found or created.

getMDMeasure

public MDMeasure getMDMeasure(MDMeasure mdMeasure,
CalcStep calcStep)
                       throws IllegalArgException,
MetadataManagerException
Retrieves the MDMeasure object that is associated with the specified CalcStep object.
Parameters:
mdMeasure - The MDMeasure object to update. If null, a new MDMeasure object is created.
calcStep - The CalcStep to retrieve the MDMeasure object for.
Returns:
The MDMeasure object that represents the new measure object, or null.
Throws:
MetadataManagerException - If dependent objects cannot be updated.

saveMDMeasure

public MDMeasure saveMDMeasure(MDFolder mdFolder,
MDMeasure mdMeasure)
                        throws MetadataManagerException
Saves the specified MDMeasure object. This operation updates the MetadataManager cache and persists the object.
Parameters:
mdFolder - The MDFolder object where the MDMeasure object will be saved.
mdMeasure - The MDMeasure object to save.
Throws:
MetadataManagerException - If the measure cannot be saved.

save

public MDObject save()
              throws CalcBuilderException
Saves the CalcStep object into Persistence and loads the object into the MetadataManager cache.
Returns:
The MDObject that represents the newly created or modified object, or null.
Throws:
CalcBuilderException - If there are problems saving a newly created MDMeasure object.

hasPersistenceConnection

public boolean hasPersistenceConnection(MetadataManager metadataManager)
                                 throws CalcBuilderException
Determines whether a persistence connection has been associated with a MetadataManager object.
Parameters:
metadataManager - The MetadataManager object that is used to save generated calculations.
Returns:
true if a persistence connection is found and false if it is not.
Throws:
CalcBuilderException - If an invalid argument is encountered.

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.