private Map<String, Object> getSearchProperties() { Map<String, Object> properties = new HashMap<String, Object>(); for (TableProperty prop : this.properties) { Object propValue = prop.getValue(); if (propValue != null) { properties.put(prop.getName(), propValue); } } return properties; }
private Map<String, Object> getSearchProperties() { Map<String, Object> properties = new HashMap<>(); for (TableProperty prop : this.properties) { Object propValue = prop.getValue(); if (propValue != null) { properties.put(prop.getName(), propValue); } } return properties; }
/** * @return Min version that can be set into new copy of original table. */ public Version getMinNextVersion() { TableProperty originalVersion = getVersion(); if (originalVersion != null && StringUtils.isNotEmpty((String) originalVersion.getValue())) { return Version.parseVersion((String) originalVersion.getValue(), 0, ".."); } else { return Version.parseVersion(INIT_VERSION, 0, ".."); } }
/** * Returns <code>true</code> if any property on UI was filled for search. * If none returns <code>false</code>. Put all filled properties to new list. * * @return <code>true</code> if any property on UI was filled for search. * If none returns <code>false</code>. */ public boolean isAnyPropertyFilled() { filledPropsForSearch.clear(); boolean result = false; for(TableProperty prop : propForSearch) { if (prop.getValue() != null && StringUtils.isNotEmpty(prop.getDisplayValue())){ filledPropsForSearch.add(prop); result = true; } } return result; }
/** * @return Min version that can be set into new copy of original table. */ public Version getMinNextVersion() { TableProperty originalVersion = getVersion(); if (originalVersion != null && StringUtils.isNotEmpty((String) originalVersion.getValue())) { return Version.parseVersion((String) originalVersion.getValue(), 0, ".."); } else { return Version.parseVersion(INIT_VERSION, 0, ".."); } }
@Override protected Map<String, Object> buildProperties() { Map<String, Object> newProperties = new LinkedHashMap<String, Object>(); newProperties.putAll(buildSystemProperties()); //TO DO: // validateIfNecessaryPropertiesWereChanged(tableProperties); for (TableProperty property : propertiesManager.getProperties()) { String name = property.getName(); Object value = property.getValue(); if (value == null || (value instanceof String && StringUtils.isEmpty((String)value))) { continue; } else { newProperties.put(name.trim(), value); } } return newProperties; }
/** * @return Min version that can be set into new copy of original table. */ public Version getMinNextVersion() { TableProperty originalVersion = getVersion(); if (originalVersion != null && StringUtils.isNotEmpty((String) originalVersion.getValue())) { return Version.parseVersion((String) originalVersion.getValue(), 0, ".."); } else { return Version.parseVersion(INIT_VERSION, 0, ".."); } }
@Override protected Map<String, Object> buildProperties() { Map<String, Object> resultProperties = new LinkedHashMap<String, Object>(); resultProperties.put("scope", scopeType); if (InheritanceLevel.CATEGORY.getDisplayName().equals(scopeType)) { String categoryName = buildCategoryName(); if (categoryName != null) { resultProperties.put("category", categoryName); } } for (TableProperty property : propertiesManager.getProperties()) { String name = property.getName(); Object value = property.getValue(); if (value == null || (value != null && (value instanceof String && StringUtils.isEmpty((String) value)))) { continue; } else { resultProperties.put(name.trim(), value); } } return resultProperties; }
@Override protected Map<String, Object> buildProperties() { Map<String, Object> resultProperties = new LinkedHashMap<String, Object>(); resultProperties.put("scope", scopeType); if (InheritanceLevel.CATEGORY.getDisplayName().equals(scopeType)) { String categoryName = buildCategoryName(); if (categoryName != null) { resultProperties.put("category", categoryName); } } for (TableProperty property : propertiesManager.getProperties()) { String name = property.getName(); Object value = property.getValue(); if (value != null && (!(value instanceof String) || StringUtils.isNotEmpty((String) value))) { resultProperties.put(name.trim(), value); } } return resultProperties; }
@Override protected Map<String, Object> buildProperties() { Map<String, Object> resultProperties = new LinkedHashMap<String, Object>(); resultProperties.put("scope", scopeType); if (InheritanceLevel.CATEGORY.getDisplayName().equals(scopeType)) { String categoryName = buildCategoryName(); if (categoryName != null) { resultProperties.put("category", categoryName); } } for (TableProperty property : propertiesManager.getProperties()) { String name = property.getName(); Object value = property.getValue(); if (value != null && (!(value instanceof String) || StringUtils.isNotEmpty((String) value))) { resultProperties.put(name.trim(), value); } } return resultProperties; }
/** * Creates new properties. * * @return new properties */ protected Map<String, Object> buildProperties() { Map<String, Object> newProperties = new LinkedHashMap<String, Object>(); if (WebStudioUtils.getWebStudio().isUpdateSystemProperties()) { newProperties.putAll(buildSystemProperties()); } // TODO validateIfNecessaryPropertiesWereChanged(tableProperties); for (TableProperty property : propertiesManager.getProperties()) { String name = property.getName(); Object value = property.getValue(); if (!isEmpty(value)) { newProperties.put(name.trim(), value); } } return newProperties; }
/** * Creates new properties. * * @return new properties */ protected Map<String, Object> buildProperties() { Map<String, Object> newProperties = new LinkedHashMap<String, Object>(); if (WebStudioUtils.getWebStudio().isUpdateSystemProperties()) { newProperties.putAll(buildSystemProperties()); } // TODO validateIfNecessaryPropertiesWereChanged(tableProperties); for (TableProperty property : propertiesManager.getProperties()) { String name = property.getName(); Object value = property.getValue(); if (!isEmpty(value)) { newProperties.put(name.trim(), value); } } return newProperties; }
/** * Initialize the conditions for business search */ public void initBusSearchCond() { if(isAnyPropertyFilled()) { Map<String, Object> mapforSearch = search.getBusSearchCondit().getPropToSearch(); mapforSearch.clear(); for(TableProperty prop : filledPropsForSearch) { mapforSearch.put(prop.getName(), prop.getValue()); } search.getBusSearchCondit().setTablesContains(searchTableContains()); } }
public boolean isChanged() throws Exception { if (propertyRows == null) { return false; } ITableProperties props = getTable().getProperties(); for (PropertyRow row : propertyRows) { if (row.getType().equals(PropertyRowType.PROPERTY)) { TableProperty property = (TableProperty) row.getData(); String name = property.getName(); Object newValue = property.getValue(); Object oldValue = props.getPropertyValue(name); boolean enumArray = property.isEnumArray(); if ((enumArray && !Arrays.equals((Enum<?>[]) oldValue, (Enum<?>[]) newValue)) || (!enumArray && ObjectUtils.notEqual(oldValue, newValue)) || (!props.getAllProperties().containsKey(name))) { return true; } } } for (String propToRemove : propsToRemove) { if (props.getAllProperties().containsKey(propToRemove)) return true; } return false; }
public boolean isChanged() throws Exception { if (propertyRows == null) { return false; } ITableProperties props = getTable().getProperties(); for (PropertyRow row : propertyRows) { if (row.getType().equals(PropertyRowType.PROPERTY)) { TableProperty property = (TableProperty) row.getData(); String name = property.getName(); Object newValue = property.getValue(); Object oldValue = props.getPropertyValue(name); boolean enumArray = property.isEnumArray(); if ((enumArray && !Arrays.equals((Enum<?>[]) oldValue, (Enum<?>[]) newValue)) || (!enumArray && ObjectUtils.notEqual(oldValue, newValue)) || (!props.getAllProperties().containsKey(name))) { return true; } } } for (String propToRemove : propsToRemove) { if (props.getAllProperties().containsKey(propToRemove)) return true; } return false; }
TableProperty property = (TableProperty) row.getData(); String name = property.getName(); Object newValue = property.getValue(); Object oldValue = props.getPropertyValue(name); boolean enumArray = property.isEnumArray();
TableProperty property = (TableProperty) row.getData(); String name = property.getName(); Object newValue = property.getValue(); Object oldValue = props.getPropertyValue(name); boolean enumArray = property.isEnumArray();