if (!isLengthValid(component, newValue)) { IntegrityException ie = new IntegrityException( "[" + getName() + "] value (" + propertyValueAsString + ") is too long on [" + component + "].") { propertyValueAsString)) { IntegrityException ie = new IntegrityException( "[" + getName() + "] value (" + propertyValueAsString + ") does not match pattern [" + getRegexpPatternSample() + "] on [" + component + "].") {
private void completeWithComputedNlsDescriptors(IPropertyDescriptor rawDescriptor) { String barePropertyName = rawDescriptor.getName(); if (barePropertyName.endsWith(RAW_SUFFIX)) { barePropertyName = barePropertyName.substring(0, barePropertyName.length() - RAW_SUFFIX.length()); } BasicStringPropertyDescriptor nlsDescriptor = (BasicStringPropertyDescriptor) rawDescriptor.clone(); nlsDescriptor.setName(barePropertyName + NLS_SUFFIX); nlsDescriptor.setDelegateWritable(true); nlsDescriptor.setComputed(true); if (!isPurelyAbstract()) { nlsDescriptor.setSqlName("(SELECT T.TRANSLATED_VALUE FROM {tableName}_T T WHERE T." + "T_{tableName}_ID = ID AND T.LANGUAGE = :JspressoSessionGlobals.language AND " + "T.PROPERTY_NAME = '" + barePropertyName + "')"); } BasicStringPropertyDescriptor rawOrNlsDescriptor = (BasicStringPropertyDescriptor) rawDescriptor.clone(); rawOrNlsDescriptor.setName(barePropertyName); rawOrNlsDescriptor.setDelegateWritable(true); rawOrNlsDescriptor.setComputed(true); if (!isPurelyAbstract()) { rawOrNlsDescriptor.setSqlName( "CASE WHEN " + nlsDescriptor.getSqlName() + " IS NULL THEN " + ((BasicPropertyDescriptor) rawDescriptor) .getSqlName() + " ELSE " + nlsDescriptor.getSqlName() + " END"); } propertyDescriptorsMap.put(nlsDescriptor.getName(), nlsDescriptor); propertyDescriptorsMap.put(rawOrNlsDescriptor.getName(), rawOrNlsDescriptor); }
queryDescriptor.setName(defaultQueryDescriptor.getName()); queryDescriptor.setI18nNameKey(defaultQueryDescriptor.getI18nNameKey()); queryDescriptor.setDescription(defaultQueryDescriptor.getDescription());