Class RankingFilter
java.lang.Object
com.gooddata.sdk.model.executeafm.afm.filter.RankingFilter
- All Implemented Interfaces:
CompatibilityFilter,ExtendedFilter,Serializable
public class RankingFilter
extends Object
implements ExtendedFilter, CompatibilityFilter, Serializable
Represents a ranking filter applied on an insight.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRankingFilter(List<Qualifier> measures, List<Qualifier> attributes, RankingFilterOperator operator, Integer value) Creates a newRankingFilterinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns all the qualifiers used by the ranking filter.Get operator as an enum constant for easier programmatic access.Get operator as a string representation of theRankingFilterOperatorenum constant as it was parsed from the JSON.getValue()inthashCode()toString()withObjUriQualifiers(ObjQualifierConverter objQualifierConverter) Copy itself using the given object qualifier converter in case whenIdentifierObjQualifierinstances are used in the object otherwise the original object is returned.
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
RankingFilter
public RankingFilter(List<Qualifier> measures, List<Qualifier> attributes, String operator, Integer value) Creates a newRankingFilterinstance.- Parameters:
measures- measures on which is the ranking applied. Must not be null.attributes- attributes that define ranking granularity. Optional, can be null.operator- operator that defines the type of ranking.value- number of requested ranked records.- Throws:
NullPointerException- thrown when required parameter is not provided.
-
RankingFilter
-
-
Method Details
-
getObjQualifiers
Returns all the qualifiers used by the ranking filter.This information comes handy if it is necessary, for example, to convert the ranking filter 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 ranking filter uses
-
withObjUriQualifiers
Copy itself using the given object qualifier converter in case whenIdentifierObjQualifierinstances 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
IdentifierObjQualifiertype 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
IdentifierObjQualifierwere used, otherwise original object is returned. - Throws:
IllegalArgumentException- The exception is thrown when conversion for the identifier qualifier used by this ranking filter could not be made by the provided converter or when provided converter is null.
-
getMeasures
- Returns:
- measures on which is the ranking applied
-
getAttributes
- Returns:
- granularity of the ranking
-
getOperator
Get operator as an enum constant for easier programmatic access.- Returns:
- ranking operator constant
-
getOperatorAsString
Get operator as a string representation of theRankingFilterOperatorenum constant as it was parsed from the JSON.- Returns:
- string operator provided at the time of the filter instance creation
-
getValue
- Returns:
- number of ranked records
-
equals
-
hashCode
public int hashCode() -
toString
-