/** * @return `@RooJpaEntity` `entityFormatMessage` value */ public String getEntityFormatMessage() { return this.annotationValues.getEntityFormatMessage(); }
/** * Generates the Springlets `@EntityFormat` annotation to be applied to the entity * * @return AnnotationMetadata */ private AnnotationMetadata getEntityFormatAnnotation() { AnnotationMetadata entityFormatAnnotation = getTypeAnnotation(SpringletsJavaType.SPRINGLETS_ENTITY_FORMAT); if (entityFormatAnnotation == null) { return null; } String expressionAttribute = this.annotationValues.getEntityFormatExpression(); String messageAttribute = this.annotationValues.getEntityFormatMessage(); final AnnotationMetadataBuilder entityFormatBuilder = new AnnotationMetadataBuilder(entityFormatAnnotation); // Check for each attribute individually if (StringUtils.isNotBlank(expressionAttribute)) { entityFormatBuilder.addStringAttribute("value", expressionAttribute); } if (StringUtils.isNotBlank(messageAttribute)) { entityFormatBuilder.addStringAttribute("message", messageAttribute); } entityFormatAnnotation = entityFormatBuilder.build(); return entityFormatAnnotation; }
/** * @return `@RooJpaEntity` `entityFormatMessage` value */ public String getEntityFormatMessage() { return this.annotationValues.getEntityFormatMessage(); }
/** * Generates the Springlets `@EntityFormat` annotation to be applied to the entity * * @return AnnotationMetadata */ private AnnotationMetadata getEntityFormatAnnotation() { AnnotationMetadata entityFormatAnnotation = getTypeAnnotation(SpringletsJavaType.SPRINGLETS_ENTITY_FORMAT); if (entityFormatAnnotation == null) { return null; } String expressionAttribute = this.annotationValues.getEntityFormatExpression(); String messageAttribute = this.annotationValues.getEntityFormatMessage(); final AnnotationMetadataBuilder entityFormatBuilder = new AnnotationMetadataBuilder(entityFormatAnnotation); // Check for each attribute individually if (StringUtils.isNotBlank(expressionAttribute)) { entityFormatBuilder.addStringAttribute("value", expressionAttribute); } if (StringUtils.isNotBlank(messageAttribute)) { entityFormatBuilder.addStringAttribute("message", messageAttribute); } entityFormatAnnotation = entityFormatBuilder.build(); return entityFormatAnnotation; }