public SimplePriorityRuleWrapper(String priorityRule, String operationName, String propertyName) { super(priorityRule); this.operationName = operationName; this.propertyName = propertyName; propertyType = TablePropertyDefinitionUtils.getPropertyTypeByPropertyName(propertyName); }
@SuppressWarnings({ "unchecked", "rawtypes" }) public IDomainAdaptor getGatheredDomain() { IDomainAdaptor result = null; if (!arrayEnumProperties.isEmpty()) { Class<?> propertyType = TablePropertyDefinitionUtils.getPropertyTypeByPropertyName(propertyToSearch); Class<?> componentType = propertyType.getComponentType(); Object[] resultArray = (Object[])Array.newInstance(componentType, arrayEnumProperties.size()); EnumDomain enumDomain = new EnumDomain(arrayEnumProperties.toArray(resultArray)); result = new EnumDomainAdaptor(enumDomain); } else { // all values from enum will be used as domain. } return result; }
@SuppressWarnings({ "unchecked", "rawtypes" }) public IDomainAdaptor getGatheredDomain() { IDomainAdaptor result = null; if (!enumProp.isEmpty()) { Class<?> propertyType = TablePropertyDefinitionUtils.getPropertyTypeByPropertyName(propertyToSearch); Object[] resultArray = (Object[])Array.newInstance(propertyType, enumProp.size()); EnumDomain enumDomain = new EnumDomain(enumProp.toArray(resultArray)); result = new EnumDomainAdaptor(enumDomain); } else { // all values from enum will be used as domain. } return result; } }
private void checkVersionPropertyExistance(){ TableProperty versionProperty = super.getVersion(); if(versionProperty == null){ //property "version" is absent in base table versionProperty = new TablePropertyBuilder(VERSION_PROP_NAME, TablePropertyDefinitionUtils.getPropertyTypeByPropertyName(VERSION_PROP_NAME)) .displayName(TablePropertyDefinitionUtils.getPropertyDisplayName(VERSION_PROP_NAME)) .value(INIT_VERSION).build(); getPropertiesManager().addProperty(versionProperty); } }
private void checkPropertiesExistance() { TableProperty versionProperty = super.getVersion(); if (versionProperty == null) { // Property "version" is absent in base table versionProperty = new TablePropertyBuilder(VERSION_PROP_NAME, TablePropertyDefinitionUtils.getPropertyTypeByPropertyName(VERSION_PROP_NAME)) .displayName(TablePropertyDefinitionUtils.getPropertyDisplayName(VERSION_PROP_NAME)) .value(getOriginalVersion().toString()).build(); getPropertiesManager().addProperty(versionProperty); } }
private void checkPropertiesExistance() { TableProperty versionProperty = super.getVersion(); if (versionProperty == null) { // Property "version" is absent in base table versionProperty = new TablePropertyBuilder(VERSION_PROP_NAME, TablePropertyDefinitionUtils.getPropertyTypeByPropertyName(VERSION_PROP_NAME)) .displayName(TablePropertyDefinitionUtils.getPropertyDisplayName(VERSION_PROP_NAME)) .value(getOriginalVersion().toString()).build(); getPropertiesManager().addProperty(versionProperty); } }