Package com.invirgance.convirgance.olap
Class Star
java.lang.Object
com.invirgance.convirgance.olap.Star
Provides support for the central star schema to manage
relationships among Dimensions, Metrics, and aggregated Measures.
- Author:
- jbanes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDimension
(Dimension dimension) Adds the passed in Dimension object to the list of Dimensions in the Star.void
addMeasure
(Measure measure) Adds the passed in Measure object to the list of Measures contained in the Star.getDimension
(String name) Returns the requested Dimension from the Star or null if no such Dimension found.Returns all Dimensions contained in the Star.getFact()
Returns the fact table of the Star.getMeasure
(String name) Returns the requested Measure from the Star or null if no such Measure found.Returns all Measures contained in the Star.Returns all Metrics contained in the Star.void
setDimensions
(List<Dimension> dimensions) Assigns the passed in List of Dimensions to this Star object.void
Sets the provided Table as the fact table for this Star object.void
setMeasures
(List<Measure> measures) Assigns the passed in List of Measures to this Star object.void
setMetrics
(List<Metric> metrics) Assigns the passed in List of Metrics to this Star object.
-
Constructor Details
-
Star
public Star()Initializes am empty Star object with no assigned attributes. -
Star
Creates a new Star object with the specified table as the fact table.- Parameters:
fact
- The fact table.
-
-
Method Details
-
getFact
Returns the fact table of the Star.- Returns:
- the fact table.
-
setFact
Sets the provided Table as the fact table for this Star object.- Parameters:
fact
- the table to be set as the fact table.
-
getDimension
Returns the requested Dimension from the Star or null if no such Dimension found.- Parameters:
name
- the String with the Dimension's name.- Returns:
- The requested Dimension object or null.
-
getDimensions
Returns all Dimensions contained in the Star.- Returns:
- A list of Dimensions.
-
addDimension
Adds the passed in Dimension object to the list of Dimensions in the Star. Sets this Star to be associated with the Dimension added.- Parameters:
dimension
- The Dimension to add.
-
setDimensions
Assigns the passed in List of Dimensions to this Star object. Also associates this Star object with every Dimension in the list by adding the reference to the Star within each Dimension.- Parameters:
dimensions
- The list of Dimensions.
-
getMetrics
Returns all Metrics contained in the Star.- Returns:
- the list of Metrics.
-
setMetrics
Assigns the passed in List of Metrics to this Star object. Also associates this Star object with every Metric in the list by adding the reference to the Star within each Metric.- Parameters:
metrics
- The list of Metrics.
-
getMeasure
Returns the requested Measure from the Star or null if no such Measure found.- Parameters:
name
- the String representing the Measure to be returned.- Returns:
- the requested Measure object.
-
getMeasures
Returns all Measures contained in the Star.- Returns:
- the list of Measures.
-
addMeasure
Adds the passed in Measure object to the list of Measures contained in the Star. Also associates this Star to the Measure.- Parameters:
measure
- The Measure object to be added
-
setMeasures
Assigns the passed in List of Measures to this Star object. Associated every Measure with this Star by including the reference to Star for each Measure in the list.- Parameters:
measures
- The list of Measures to be assigned.
-