Class Star

java.lang.Object
com.invirgance.convirgance.olap.Star

public class Star extends Object
Provides support for the central star schema to manage relationships among Dimensions, Metrics, and aggregated Measures.
Author:
jbanes
  • Constructor Details

    • Star

      public Star()
      Initializes am empty Star object with no assigned attributes.
    • Star

      public Star(Table fact)
      Creates a new Star object with the specified table as the fact table.
      Parameters:
      fact - The fact table.
  • Method Details

    • getFact

      public Table getFact()
      Returns the fact table of the Star.
      Returns:
      the fact table.
    • setFact

      public void setFact(Table fact)
      Sets the provided Table as the fact table for this Star object.
      Parameters:
      fact - the table to be set as the fact table.
    • getDimension

      public Dimension getDimension(String name)
      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

      public List<Dimension> getDimensions()
      Returns all Dimensions contained in the Star.
      Returns:
      A list of Dimensions.
    • addDimension

      public void addDimension(Dimension dimension)
      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

      public void setDimensions(List<Dimension> dimensions)
      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

      public List<Metric> getMetrics()
      Returns all Metrics contained in the Star.
      Returns:
      the list of Metrics.
    • setMetrics

      public void setMetrics(List<Metric> metrics)
      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

      public Measure getMeasure(String name)
      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

      public List<Measure> getMeasures()
      Returns all Measures contained in the Star.
      Returns:
      the list of Measures.
    • addMeasure

      public void addMeasure(Measure measure)
      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

      public void setMeasures(List<Measure> measures)
      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.