/** * Gets the array of properties names that are dimensional. * * @return names of properties that are dimensional. */ public static List<TablePropertyDefinition> getDimensionalTableProperties() { if (dimensionalTableProperties == null) { List<TablePropertyDefinition> dimensionalProperties = new ArrayList<TablePropertyDefinition>(); TablePropertyDefinition[] definitions = DefaultPropertyDefinitions.getDefaultDefinitions(); for (TablePropertyDefinition definition : definitions) { if (definition.isDimensional()) { dimensionalProperties.add(definition); } } dimensionalTableProperties = Collections.unmodifiableList(dimensionalProperties); } return dimensionalTableProperties; }
public List<TablePropertyDefinitionWrapper> getGapOverlapDimensionalProperties() { List<TablePropertyDefinitionWrapper> dimensionalTablePropertyDefinitions = new ArrayList<TablePropertyDefinitionWrapper>(); for (TablePropertyDefinitionWrapper wrapper : wrappers) { if (wrapper.getDefinition().isDimensional()) { String operation = wrapper.getOperation(); if (ContainsMatchingExpression.OPERATION_NAME.equalsIgnoreCase(operation) || EQMatchingExpression.OPERATION_NAME.equalsIgnoreCase(operation)) { dimensionalTablePropertyDefinitions.add(wrapper); } } } return dimensionalTablePropertyDefinitions; }
public List<TablePropertyDefinitionWrapper> getDimensionalProperties(Selector selector) { List<TablePropertyDefinitionWrapper> dimensionalTablePropertyDefinitions = new ArrayList<TablePropertyDefinitionWrapper>(); for (TablePropertyDefinitionWrapper wrapper : wrappers) { if (wrapper.getDefinition().isDimensional() && (selector != null && selector.suits(wrapper))) { dimensionalTablePropertyDefinitions.add(wrapper); } } return dimensionalTablePropertyDefinitions; }
/** * {@inheritDoc} */ public Map<String, Object> getAllDimensionalProperties() { if (allDimensionalProperties == null) { Map<String, Object> tmp = new HashMap<String, Object>(); Map<String, Object> props = getAllProperties(); for (Map.Entry<String, Object> property : props.entrySet()) { String propName = property.getKey(); TablePropertyDefinition propertyDefinition = TablePropertyDefinitionUtils.getPropertyByName(propName); if (propertyDefinition.isDimensional()) { tmp.put(propName, property.getValue()); } } allDimensionalProperties = Collections.unmodifiableMap(tmp); } return allDimensionalProperties; }
private void checkPropertiesExistance() { TablePropertyDefinition[] propDefinitions = DefaultPropertyDefinitions.getDefaultDefinitions(); for (TablePropertyDefinition propDefinition : propDefinitions) { if (propDefinition.isDimensional() && getProperty(propDefinition.getName()) == null) { TableProperty property = new TableProperty(propDefinition); getPropertiesManager().addProperty(property); } } }
private void checkPropertiesExistance() { TablePropertyDefinition[] propDefinitions = DefaultPropertyDefinitions.getDefaultDefinitions(); for (TablePropertyDefinition propDefinition : propDefinitions) { if (propDefinition.isDimensional() && getProperty(propDefinition.getName()) == null) { TableProperty property = new TableProperty(propDefinition); getPropertiesManager().addProperty(property); } } }
public TableProperty(TablePropertyDefinition propDefinition) { this.name = propDefinition.getName(); this.displayName = propDefinition.getDisplayName(); this.type = propDefinition.getType() == null ? String.class : propDefinition.getType().getInstanceClass(); this.group = propDefinition.getGroup(); this.format = propDefinition.getFormat(); this.deprecation = propDefinition.getDeprecation(); this.constraints = propDefinition.getConstraints(); this.description = propDefinition.getDescription(); this.system = propDefinition.isSystem(); this.dimensional = propDefinition.isDimensional(); }
public TableProperty(TablePropertyDefinition propDefinition) { this.name = propDefinition.getName(); this.displayName = propDefinition.getDisplayName(); this.type = propDefinition.getType() == null ? String.class : propDefinition.getType().getInstanceClass(); this.group = propDefinition.getGroup(); this.format = propDefinition.getFormat(); this.deprecation = propDefinition.getDeprecation(); this.constraints = propDefinition.getConstraints(); this.description = propDefinition.getDescription(); this.system = propDefinition.isSystem(); this.dimensional = propDefinition.isDimensional(); }
private void initProperties() { List<TableProperty> definedProperties = new ArrayList<TableProperty>(); ITableProperties tableProperties = table.getProperties(); for (String possiblePropertyName : propertiesManager.getPossibleToAddProperties()) { TablePropertyDefinition propDefinition = TablePropertyDefinitionUtils.getPropertyByName(possiblePropertyName); if (propDefinition != null && !propDefinition.isSystem() && propDefinition.getDeprecation() == null) { Object propertyValue = tableProperties.getPropertyValue(possiblePropertyName) != null ? tableProperties.getPropertyValue(possiblePropertyName) : null; if (tableProperties.getTableProperties().containsKey(possiblePropertyName)) { Class<?> propertyType = null; if (propDefinition.getType() != null) { propertyType = propDefinition.getType().getInstanceClass(); } String displayName = propDefinition.getDisplayName(); String format = propDefinition.getFormat(); boolean dimensional = propDefinition.isDimensional(); TableProperty tableProperty = new TableProperty.TablePropertyBuilder(possiblePropertyName, propertyType).value( propertyValue).displayName(displayName).format(format).dimensional(dimensional).build(); definedProperties.add(tableProperty); } } } propertiesManager.setProperties(definedProperties); }
private void initProperties() { List<TableProperty> definedProperties = new ArrayList<TableProperty>(); ITableProperties tableProperties = table.getProperties(); for (String possiblePropertyName : propertiesManager.getPossibleToAddProperties()) { TablePropertyDefinition propDefinition = TablePropertyDefinitionUtils.getPropertyByName(possiblePropertyName); if (propDefinition != null && !propDefinition.isSystem() && propDefinition.getDeprecation() == null) { Object propertyValue = tableProperties.getPropertyValue(possiblePropertyName) != null ? tableProperties.getPropertyValue(possiblePropertyName) : null; if (tableProperties.getTableProperties().containsKey(possiblePropertyName)) { Class<?> propertyType = null; if (propDefinition.getType() != null) { propertyType = propDefinition.getType().getInstanceClass(); } String displayName = propDefinition.getDisplayName(); String format = propDefinition.getFormat(); boolean dimensional = propDefinition.isDimensional(); TableProperty tableProperty = new TableProperty.TablePropertyBuilder(possiblePropertyName, propertyType).value( propertyValue).displayName(displayName).format(format).dimensional(dimensional).build(); definedProperties.add(tableProperty); } } } propertiesManager.setProperties(definedProperties); }