public static TablePropertyDefinition[] getDefaultDefinitionsByInheritanceLevel(InheritanceLevel inheritanceLevel) { List<TablePropertyDefinition> resultDefinitions = new ArrayList<TablePropertyDefinition>(); for (TablePropertyDefinition propertyDefinition : DefaultPropertyDefinitions.getDefaultDefinitions()) { if (ArrayUtils.contains(propertyDefinition.getInheritanceLevel(), inheritanceLevel)) { resultDefinitions.add(propertyDefinition); } } return resultDefinitions.toArray(new TablePropertyDefinition[0]); }
/** * Gets the property by its given name * * @param name * @return property definition */ public static TablePropertyDefinition getPropertyByName(String name) { for (TablePropertyDefinition propDefinition : DefaultPropertyDefinitions.getDefaultDefinitions()) { if (propDefinition.getName().equals(name)) { return propDefinition; } } return null; }
/** * Gets list of properties that are marked as system. * * @return list of properties. */ public static List<TablePropertyDefinition> getSystemProperties() { List<TablePropertyDefinition> result = new ArrayList<TablePropertyDefinition>(); for (TablePropertyDefinition propDefinition : DefaultPropertyDefinitions.getDefaultDefinitions()) { if (propDefinition.isSystem()) { result.add(propDefinition); } } return result; }
/** * 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; }
private void initProperties() { TablePropertyDefinition[] propDefinitions = DefaultPropertyDefinitions.getDefaultDefinitions(); for (TablePropertyDefinition propDefinition : propDefinitions) { if (propDefinition.getDeprecation() == null) { TableProperty prop = new TableProperty(propDefinition); properties.add(prop); } } }
private void initProperties() { TablePropertyDefinition[] propDefinitions = DefaultPropertyDefinitions.getDefaultDefinitions(); for (TablePropertyDefinition propDefinition : propDefinitions) { if (propDefinition.getDeprecation() == null) { TableProperty prop = new TableProperty(propDefinition); properties.add(prop); } } }
/** * Gets the name of the property by the given display name * * @param displayName * @return name */ public static String getPropertyName(String displayName) { for (TablePropertyDefinition propDefinition : DefaultPropertyDefinitions.getDefaultDefinitions()) { if (propDefinition.getDisplayName().equals(displayName)) { return propDefinition.getName(); } } return null; }
/** * Gets the display name of the property by the given name * * @param name * @return diplayName */ public static String getPropertyDisplayName(String name) { for (TablePropertyDefinition propDefinition : DefaultPropertyDefinitions.getDefaultDefinitions()) { if (propDefinition.getName().equals(name)) { return propDefinition.getDisplayName(); } } return null; }
public static TablePropertyDefinition[] getDefaultDefinitionsForTable(String tableType, InheritanceLevel inheritanceLevel, boolean ignoreSystem) { List<TablePropertyDefinition> resultDefinitions = new ArrayList<TablePropertyDefinition>(); for (TablePropertyDefinition propertyDefinition : DefaultPropertyDefinitions.getDefaultDefinitions()) { String name = propertyDefinition.getName(); if (PropertiesChecker.isPropertySuitableForTableType(name, tableType) && (inheritanceLevel == null // any // level || ArrayUtils.contains(propertyDefinition.getInheritanceLevel(), inheritanceLevel)) && (!ignoreSystem || (ignoreSystem && !propertyDefinition.isSystem()))) { resultDefinitions.add(propertyDefinition); } } return resultDefinitions.toArray(new TablePropertyDefinition[resultDefinitions.size()]); }
/** * Gets list of properties that must me set for particular table type by * default. TODO: remove this method or fix it (see deprecation comment). * See also DefaultPropertiesLoadingTest * * @param tableType type of the table. see {@link XlsNodeTypes}. * @return list of properties that must me set for particular table type by * default. If <b>tableType</b> is <code>null</code>, returns * {@link #getPropertiesToBeSetByDefault()} * * @deprecated This method is incorrect (because * tableType.equals(propDefinition.getTableType()) compares * objects of inconvertible types). This method is used in unit * test only, that test is incorrect and can be outdated. */ @Deprecated public static List<TablePropertyDefinition> getPropertiesToBeSetByDefault(String tableType) { if (tableType != null) { List<TablePropertyDefinition> result = new ArrayList<TablePropertyDefinition>(); for (TablePropertyDefinition propDefinition : DefaultPropertyDefinitions.getDefaultDefinitions()) { if (propDefinition.getDefaultValue() != null && tableType.equals(propDefinition.getTableType())) { result.add(propDefinition); } } return result; } return getPropertiesToBeSetByDefault(); }
private List<String> getAllPossibleProperties(String tableType) { List<String> possibleProperties = new ArrayList<String>(); TablePropertyDefinition[] propDefinitions = DefaultPropertyDefinitions.getDefaultDefinitions(); for (TablePropertyDefinition propDefinition : propDefinitions) { if (!propDefinition.isSystem()) { String propertyName = propDefinition.getName(); // check if the property can be defined in current type of table // and if property can be defined on TABLE level. if (PropertiesChecker.isPropertySuitableForTableType(propertyName, tableType) && PropertiesChecker.isPropertySuitableForLevel(InheritanceLevel.TABLE, propertyName)) { possibleProperties.add(propDefinition.getName()); } } } return possibleProperties; }
private List<String> getAllPossibleProperties(String tableType) { List<String> possibleProperties = new ArrayList<String>(); TablePropertyDefinition[] propDefinitions = DefaultPropertyDefinitions.getDefaultDefinitions(); for (TablePropertyDefinition propDefinition : propDefinitions) { if (!propDefinition.isSystem()) { String propertyName = propDefinition.getName(); // check if the property can be defined in current type of table // and if property can be defined on TABLE level. if (PropertiesChecker.isPropertySuitableForTableType(propertyName, tableType) && PropertiesChecker.isPropertySuitableForLevel(InheritanceLevel.TABLE, propertyName)) { possibleProperties.add(propDefinition.getName()); } } } return possibleProperties; }
private List<String> getAllPossibleProperties(String tableType) { List<String> possibleProperties = new ArrayList<String>(); TablePropertyDefinition[] propDefinitions = DefaultPropertyDefinitions.getDefaultDefinitions(); for (TablePropertyDefinition propDefinition : propDefinitions) { if (!propDefinition.isSystem()) { String propertyName = propDefinition.getName(); // check if the property can be defined in current type of table // and if property can be defined on TABLE level. if (PropertiesChecker.isPropertySuitableForTableType(propertyName, tableType) && PropertiesChecker.isPropertySuitableForLevel(InheritanceLevel.TABLE, propertyName)) { possibleProperties.add(propDefinition.getName()); } } } return possibleProperties; }
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); } } }
TablePropertyDefinition[] propDefinitions = DefaultPropertyDefinitions.getDefaultDefinitions(); TableSyntaxNode node = getCopyingTable();
/** * During the construction, we take all the properties from DefaultPropertyDefinitions * that must be included in business search */ public BussinesSearchPropertyBean() { TablePropertyDefinition[] propDefinitions = DefaultPropertyDefinitions.getDefaultDefinitions(); for (TablePropertyDefinition propDefinition : propDefinitions) { if(propDefinition.isBusinessSearch()) { Class<?> propertyType = propDefinition.getType() == null ? null : propDefinition.getType() .getInstanceClass(); propForSearch.add( new TableProperty.TablePropertyBuilder(propDefinition.getName(), propertyType) .displayName(propDefinition.getDisplayName()).group(propDefinition.getGroup()) .format(propDefinition.getFormat()).constraints(propDefinition.getConstraints()) .build()); } } //busSearchResBean = new BussinessSearchResultBean(propForSearch); }