All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jeaf.ValidationChecks.chk Maven / Gradle / Ivy

There is a newer version: 1.24.1
Show newest version
import uml;
import JMM;

extension java::GeneratorCommons;


// Checks for annotation DecimalMin
context DecimalMin if runChecks() ERROR this.getErrorMessage("9137", {((NamedElement)this.owner).name + "." + name}): minValue.length > 0;
context DecimalMin if runChecks() ERROR this.getErrorMessage("9138", {((NamedElement)this.owner).name + "." + name, "DecimalMin"}): type.isCharSequence() || type.isNumericForAnnotation();

// Checks for annotation DecimalMax
context DecimalMax if runChecks() ERROR this.getErrorMessage("9139", {((NamedElement)this.owner).name + "." + name}): maxValue.length > 0;
context DecimalMax if runChecks() ERROR this.getErrorMessage("9138", {((NamedElement)this.owner).name + "." + name, "DecimalMax"}): type.isCharSequence() || type.isNumericForAnnotation();

// Checks for annotation Min
context Min if runChecks() ERROR this.getErrorMessage("9140", {((NamedElement)this.owner).name + "." + name, "Min"}): type.isNumericForAnnotation();

// Checks for annotation Max
context Max if runChecks() ERROR this.getErrorMessage("9140", {((NamedElement)this.owner).name + "." + name, "Max"}): type.isNumericForAnnotation();

// Checks for annotation Digits
context Digits if runChecks() ERROR this.getErrorMessage("9141", {((NamedElement)this.owner).name + "." + name, integer.toString()}): integer >= 0;
context Digits if runChecks() ERROR this.getErrorMessage("9142", {((NamedElement)this.owner).name + "." + name, fraction.toString()}): fraction >= 0;
context Digits if runChecks() ERROR this.getErrorMessage("9138", {((NamedElement)this.owner).name + "." + name, "Digits"}): type.isCharSequence() || type.isNumericForAnnotation();

// Checks for annotation Negative
context Negative if runChecks() ERROR this.getErrorMessage("9140", {((NamedElement)this.owner).name + "." + name, "Negative"}): type.isNumericForAnnotation();

// Checks for annotation NegativeOrZero
context NegativeOrZero if runChecks() ERROR this.getErrorMessage("9140", {((NamedElement)this.owner).name + "." + name, "NegativeOrZero"}): type.isNumericForAnnotation();

// Checks for annotation PositiveOrZero
context PositiveOrZero if runChecks() ERROR this.getErrorMessage("9140", {((NamedElement)this.owner).name + "." + name, "PositiveOrZero"}): type.isNumericForAnnotation();

// Checks for annotation Positive
context Positive if runChecks() ERROR this.getErrorMessage("9140", {((NamedElement)this.owner).name + "." + name, "Positive"}): type.isNumericForAnnotation();

// Checks for annotation Size
context Size if runChecks() ERROR this.getErrorMessage("9143", {((NamedElement)this.owner).name + "." + name, min.toString()}): min >= -1;
context Size if runChecks() ERROR this.getErrorMessage("9144", {((NamedElement)this.owner).name + "." + name, max.toString()}): max >= -1;
context Size if runChecks() ERROR this.getErrorMessage("9145", {((NamedElement)this.owner).name + "." + name, min.toString(), max.toString()}): max >= min || max == -1;
context Size if runChecks() ERROR this.getErrorMessage("9146", {((NamedElement)this.owner).name + "." + name}): !(max == -1 && min == -1);
context Size if runChecks() ERROR this.getErrorMessage("9147", {((NamedElement)this.owner).name + "." + name, "Size"}): type.isCharSequence() || this.isMultivalued();

// Checks for annotation Pattern
context Pattern if runChecks() ERROR this.getErrorMessage("9148", {((NamedElement)this.owner).name + "." + name}): regexp.length > 0;
context Pattern if runChecks() ERROR this.getErrorMessage("9149", {((NamedElement)this.owner).name + "." + name, "Pattern"}): type.isCharSequence();

// Checks for annotation Email
context Email if runChecks() ERROR this.getErrorMessage("9149", {((NamedElement)this.owner).name + "." + name, "Email"}): type.isCharSequence();

// Checks for annotation NotEmpty
context NotEmpty if runChecks() ERROR this.getErrorMessage("9147", {((NamedElement)this.owner).name + "." + name, "NotEmpty"}): type.isCharSequence() || this.isMultivalued();

// Checks for annotation AssertTrue
context AssertTrue if runChecks() ERROR this.getErrorMessage("9150", {((NamedElement)this.owner).name + "." + name, "AssertTrue"}): type.isBooleanForAnnotation();

// Checks for annotation AssertFalse
context AssertFalse if runChecks() ERROR this.getErrorMessage("9150", {((NamedElement)this.owner).name + "." + name, "AssertFalse"}): type.isBooleanForAnnotation();

// Checks for annotation NotBlank
context NotBlank if runChecks() ERROR this.getErrorMessage("9138", {((NamedElement)this.owner).name + "." + name, "NotBlank"}): type.isCharSequence();

// Checks for annotation Past
context Past if runChecks() ERROR this.getErrorMessage("9151", {((NamedElement)this.owner).name + "." + name, "Past"}): type.isDateForAnnotation();

// Checks for annotation PastOrPresent
context PastOrPresent if runChecks() ERROR this.getErrorMessage("9151", {((NamedElement)this.owner).name + "." + name, "PastOrPresent"}): type.isDateForAnnotation();

// Checks for annotation FutureOrPresent
context FutureOrPresent if runChecks() ERROR this.getErrorMessage("9151", {((NamedElement)this.owner).name + "." + name, "FutureOrPresent"}): type.isDateForAnnotation();

// Checks for annotation Future
context Future if runChecks() ERROR this.getErrorMessage("9151", {((NamedElement)this.owner).name + "." + name, "Future"}): type.isDateForAnnotation();




© 2015 - 2024 Weber Informatics LLC | Privacy Policy