public class KeyValueStoreDimension extends Object implements Dimension
Supports point lookups:
DEFAULT_CATEGORY| Constructor and Description |
|---|
KeyValueStoreDimension(DimensionConfig dimensionConfig)
Constructor.
|
KeyValueStoreDimension(String dimensionName,
String description,
LinkedHashSet<DimensionField> dimensionFields,
KeyValueStore keyValueStore,
SearchProvider searchProvider)
Constructor.
|
KeyValueStoreDimension(String dimensionName,
String description,
LinkedHashSet<DimensionField> dimensionFields,
KeyValueStore keyValueStore,
SearchProvider searchProvider,
boolean isAggregatable)
Constructor.
|
KeyValueStoreDimension(String dimensionName,
String description,
LinkedHashSet<DimensionField> dimensionFields,
KeyValueStore keyValueStore,
SearchProvider searchProvider,
Set<DimensionRow> dimensionRows)
Constructor.
|
KeyValueStoreDimension(String dimensionName,
String longName,
String category,
String description,
LinkedHashSet<DimensionField> dimensionFields,
KeyValueStore keyValueStore,
SearchProvider searchProvider,
LinkedHashSet<DimensionField> defaultDimensionFields,
boolean isAggregatable)
Constructor.
|
KeyValueStoreDimension(String dimensionName,
String longName,
String category,
String description,
LinkedHashSet<DimensionField> dimensionFields,
KeyValueStore keyValueStore,
SearchProvider searchProvider,
LinkedHashSet<DimensionField> defaultDimensionFields,
boolean isAggregatable,
StorageStrategy storageStrategy)
Constructor.
|
KeyValueStoreDimension(String dimensionName,
String longName,
String category,
String description,
LinkedHashSet<DimensionField> dimensionFields,
KeyValueStore keyValueStore,
SearchProvider searchProvider,
Set<DimensionRow> dimensionRows)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAllDimensionRows(Set<DimensionRow> dimensionRows)
Add all dimension rows to the dimension's set of rows.
|
void |
addDimensionRow(DimensionRow dimensionRow)
Add a dimension row to the dimension's set of rows.
|
DimensionRow |
createEmptyDimensionRow(String keyFieldValue)
Create an empty DimensionRow for this dimension.
|
void |
deleteAllDimensionRows()
Internal method for cleaning the dimension rows.
|
boolean |
equals(Object o) |
DimensionRow |
findDimensionRowByKeyValue(String value)
Get a dimension row given an id.
|
String |
getApiName()
Getter for api name.
|
int |
getCardinality()
Get the cardinality of the dimension.
|
String |
getCategory()
Get the category of the dimension.
|
LinkedHashSet<DimensionField> |
getDefaultDimensionFields()
Getter for default dimension fields.
|
String |
getDescription()
Getter for description.
|
LinkedHashSet<DimensionField> |
getDimensionFields()
Getter for dimension fields.
|
DimensionField |
getFieldByName(String name)
Find dimension field by name.
|
DimensionField |
getKey()
Get primary key field for this dimension.
|
org.joda.time.DateTime |
getLastUpdated()
Getter for lastUpdated.
|
String |
getLongName()
Get the long name of the dimension.
|
SearchProvider |
getSearchProvider()
Getter for search provider.
|
StorageStrategy |
getStorageStrategy()
Returns the
StorageStrategy of the dimension. |
int |
hashCode() |
boolean |
isAggregatable()
Return whether this dimension can be aggregated.
|
DimensionRow |
parseDimensionRow(Map<String,String> fieldNameValueMap)
Generate a DimensionRow for this dimension from a field name / value map.
|
void |
setLastUpdated(org.joda.time.DateTime lastUpdated)
Setter for lastUpdated.
|
String |
toString() |
KeyValueStoreDimension |
withStorageStrategy(StorageStrategy storageStrategy)
Constructs a new KeyValueStoreDimension with specified
StorageStrategy. |
public KeyValueStoreDimension(String dimensionName, String longName, String category, String description, @NotNull LinkedHashSet<DimensionField> dimensionFields, @NotNull KeyValueStore keyValueStore, SearchProvider searchProvider, @NotNull LinkedHashSet<DimensionField> defaultDimensionFields, boolean isAggregatable, StorageStrategy storageStrategy)
dimensionName - API Name of the dimensionlongName - Long API Name of the dimensioncategory - Category of the dimensiondescription - Description of the dimensiondimensionFields - Metadata fields of the dimensionkeyValueStore - Metadata store for the dimensionsearchProvider - Search provider over the metadata for the dimensiondefaultDimensionFields - Default fields for the dimensionisAggregatable - Whether the dimension is aggregatablestorageStrategy - Strategy of how dimension is loaded. See
StorageStrategypublic KeyValueStoreDimension(String dimensionName, String longName, String category, String description, @NotNull LinkedHashSet<DimensionField> dimensionFields, @NotNull KeyValueStore keyValueStore, SearchProvider searchProvider, @NotNull LinkedHashSet<DimensionField> defaultDimensionFields, boolean isAggregatable)
dimensionName - API Name of the dimensionlongName - Long API Name of the dimensioncategory - Category of the dimensiondescription - Description of the dimensiondimensionFields - Metadata fields of the dimensionkeyValueStore - Metadata store for the dimensionsearchProvider - Search provider over the metadata for the dimensiondefaultDimensionFields - Default fields for the dimensionisAggregatable - Whether the dimension is aggregatable
StorageStrategypublic KeyValueStoreDimension(String dimensionName, String description, @NotNull LinkedHashSet<DimensionField> dimensionFields, @NotNull KeyValueStore keyValueStore, SearchProvider searchProvider)
It constructs an aggregatable dimension that defaults the Long Api Name to the Api Name and sets the Category to the default category.
dimensionName - API Name of the dimensiondescription - Description of the dimensiondimensionFields - Metadata fields of the dimensionkeyValueStore - Metadata store for the dimensionsearchProvider - Search provider over the metadata for the dimensionpublic KeyValueStoreDimension(String dimensionName, String description, @NotNull LinkedHashSet<DimensionField> dimensionFields, @NotNull KeyValueStore keyValueStore, SearchProvider searchProvider, boolean isAggregatable)
Defaults the Long Api Name to the Api Name and sets the Category to the default category.
dimensionName - API Name of the dimensiondescription - Description of the dimensiondimensionFields - Metadata fields of the dimensionkeyValueStore - Metadata store for the dimensionsearchProvider - Search provider over the metadata for the dimensionisAggregatable - Whether the dimension is aggregatablepublic KeyValueStoreDimension(String dimensionName, String description, @NotNull LinkedHashSet<DimensionField> dimensionFields, @NotNull KeyValueStore keyValueStore, SearchProvider searchProvider, Set<DimensionRow> dimensionRows)
Build an aggregatable dimension that defaults the Long Api Name to the Api Name and sets the Category to the default category.
dimensionName - API Name of the dimensiondescription - Description of the dimensiondimensionFields - Metadata fields of the dimensionkeyValueStore - Metadata store for the dimensionsearchProvider - Search provider over the metadata for the dimensiondimensionRows - Dimension metadata rows for this dimensionpublic KeyValueStoreDimension(String dimensionName, String longName, String category, String description, @NotNull LinkedHashSet<DimensionField> dimensionFields, @NotNull KeyValueStore keyValueStore, SearchProvider searchProvider, Set<DimensionRow> dimensionRows)
dimensionName - API Name of the dimensionlongName - Long API Name of the dimensioncategory - Category of the dimensiondescription - Description of the dimensiondimensionFields - Metadata fields of the dimensionkeyValueStore - Metadata store for the dimensionsearchProvider - Search provider over the metadata for the dimensiondimensionRows - Dimension metadata rows for this dimensionpublic KeyValueStoreDimension(DimensionConfig dimensionConfig)
dimensionConfig - Configuration holder for this dimensionpublic void setLastUpdated(org.joda.time.DateTime lastUpdated)
DimensionsetLastUpdated in interface DimensionlastUpdated - The date and time at which this Dimension was last updatedpublic String getApiName()
DimensiongetApiName in interface Dimensionpublic org.joda.time.DateTime getLastUpdated()
DimensiongetLastUpdated in interface Dimensionpublic String getDescription()
DimensiongetDescription in interface Dimensionpublic String getCategory()
DimensiongetCategory in interface Dimensionpublic String getLongName()
DimensiongetLongName in interface Dimensionpublic StorageStrategy getStorageStrategy()
DimensionStorageStrategy of the dimension.getStorageStrategy in interface Dimensionpublic int getCardinality()
DimensiongetCardinality in interface Dimensionpublic LinkedHashSet<DimensionField> getDimensionFields()
DimensiongetDimensionFields in interface Dimensionpublic LinkedHashSet<DimensionField> getDefaultDimensionFields()
DimensiongetDefaultDimensionFields in interface Dimensionpublic DimensionField getFieldByName(String name)
DimensiongetFieldByName in interface Dimensionname - field namepublic SearchProvider getSearchProvider()
DimensiongetSearchProvider in interface Dimensionpublic void addDimensionRow(DimensionRow dimensionRow)
DimensionaddDimensionRow in interface DimensiondimensionRow - DimensionRow to addpublic void addAllDimensionRows(Set<DimensionRow> dimensionRows)
DimensionaddAllDimensionRows in interface DimensiondimensionRows - Set of DimensionRows to addpublic DimensionRow createEmptyDimensionRow(String keyFieldValue)
DimensioncreateEmptyDimensionRow in interface DimensionkeyFieldValue - String value of the key fieldpublic DimensionRow findDimensionRowByKeyValue(String value)
DimensionfindDimensionRowByKeyValue in interface Dimensionvalue - key valuepublic void deleteAllDimensionRows()
public DimensionField getKey()
Dimensionpublic DimensionRow parseDimensionRow(Map<String,String> fieldNameValueMap)
DimensionparseDimensionRow in interface DimensionfieldNameValueMap - Map of field names to valuespublic boolean isAggregatable()
DimensionisAggregatable in interface Dimensionpublic KeyValueStoreDimension withStorageStrategy(StorageStrategy storageStrategy)
StorageStrategy.storageStrategy - The specified StorageStrategyCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.