protected Property getNamePatternProperty(MetaClass entityClass) { Property namePatternProperty = new StringProperty(); Class<?> javaClass = entityClass.getJavaClass(); NamePattern namePatternAnnotation = javaClass.getAnnotation(NamePattern.class); if (namePatternAnnotation != null) { namePatternProperty.setDefault(namePatternAnnotation.value()); } return namePatternProperty; }
@Override public Property merge(Property property, Map<PropertyId, Object> args) { super.merge(property, args); if (property instanceof UUIDProperty) { final UUIDProperty resolved = (UUIDProperty) property; if (args.containsKey(PropertyId.DEFAULT)) { final String value = PropertyId.DEFAULT.findValue(args); property.setDefault(value); } if (args.containsKey(PropertyId.MIN_LENGTH)) { final Integer value = PropertyId.MIN_LENGTH.findValue(args); resolved.setMinLength(value); } if (args.containsKey(PropertyId.MAX_LENGTH)) { final Integer value = PropertyId.MAX_LENGTH.findValue(args); resolved.setMaxLength(value); } if (args.containsKey(PropertyId.PATTERN)) { final String value = PropertyId.PATTERN.findValue(args); resolved.setPattern(value); } } return property; }
property.setRequired(ann.required()); property.setAccess(ann.access()); property.setDefault(ann.defaultValue()); property.setDescription(ann.description()); model.addProperty(ann.value(), property);
property.setDefault(apiProperty.defaultValue());
property.setDefault(apiProperty.defaultValue());
items.setRequired(param.required()); items.setAccess(param.access()); items.setDefault(param.defaultValue() == null ? null : param.defaultValue()); model.addProperty(param.name(), items);
property.setDefault(ann.defaultValue());
defProperty.setDefault(String.valueOf(propertyDefinition.getDefaultValue()));