Class OverPeriodMeasureDefinition

java.lang.Object
com.gooddata.sdk.model.executeafm.afm.DerivedMeasureDefinition
com.gooddata.sdk.model.executeafm.afm.OverPeriodMeasureDefinition
All Implemented Interfaces:
MeasureDefinition, java.io.Serializable

public class OverPeriodMeasureDefinition
extends DerivedMeasureDefinition
Definition of the period over period measure that is used for the Same period last year and Same period 2 years back comparisons.
See Also:
Serialized Form
  • Constructor Details

    • OverPeriodMeasureDefinition

      public OverPeriodMeasureDefinition​(java.lang.String measureIdentifier, java.util.List<OverPeriodDateAttribute> dateAttributes)
      Create a new instance of OverPeriodMeasureDefinition.
      Parameters:
      measureIdentifier - The local identifier of the measure this PoP measure refers to. The parameter must not be null.
      dateAttributes - The date attributes that defines how this measure will be shifted in time. The parameter must not be null.
      Throws:
      java.lang.IllegalArgumentException - Thrown when dateAttributes list is empty or required parameter is null.
  • Method Details

    • getObjQualifiers

      public java.util.Collection<ObjQualifier> getObjQualifiers()
      Description copied from interface: MeasureDefinition
      Returns all the qualifiers used by the measure definition and its encapsulated objects.

      This information comes handy if it is necessary, for example, to convert the measure definition to use just the URI object qualifiers instead of the identifier object qualifiers. It can be used to gather these for a conversion service.

      Returns:
      all the qualifiers the measure definition uses, even in its encapsulated objects (apart from the measure filters)
    • withObjUriQualifiers

      public MeasureDefinition withObjUriQualifiers​(ObjQualifierConverter objQualifierConverter)
      Description copied from interface: MeasureDefinition
      Copy itself using the given object qualifier converter in case when IdentifierObjQualifier instances are used in the object otherwise the original object is returned.

      The provided converter must be able to handle the conversion for the qualifiers that are of the IdentifierObjQualifier type that are used by this object or its encapsulated child objects.

      Parameters:
      objQualifierConverter - The function that converts identifier qualifiers to the matching URI qualifiers. In case when the object uses the identifier qualifiers, it will return a new copy of itself or its encapsulated objects that used URI qualifiers, otherwise the original object is returned. The parameter must not be null.
      Returns:
      copy of itself with replaced qualifiers in case when some IdentifierObjQualifier were used, otherwise original object is returned.
    • isAdHoc

      public boolean isAdHoc()
      Determine if measure is ad-hoc, i.e., if it does not exist in the catalog and was created on fly.
      Returns:
      always true (OverPeriodMeasureDefinition is always ad-hoc)
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class DerivedMeasureDefinition
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class DerivedMeasureDefinition
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • getDateAttributes

      public java.util.List<OverPeriodDateAttribute> getDateAttributes()
      The date attributes that defines how this measure will be shifted in time.
      Returns:
      The list of date attributes.