clearing-utils улучшил читаемость
This commit is contained in:
parent
adf57e7b00
commit
96dc0d0313
5 changed files with 23 additions and 2 deletions
|
|
@ -4,8 +4,9 @@
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>clearing-utils</artifactId>
|
<artifactId>clearing-utils</artifactId> <!-- todo refactor - rename to clearing-validation -->
|
||||||
<name>Clearing-module, dependency version of platform-utils</name>
|
<name>clearing-utils</name>
|
||||||
|
<description>Clearing-module, dependency version of platform-utils</description>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>SPCEX-1.0.0.0</version>
|
<version>SPCEX-1.0.0.0</version>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -99,4 +99,9 @@ public record DictionaryPresentRule<R, D extends AbstractDictionary>(String fiel
|
||||||
}
|
}
|
||||||
return empty();
|
return empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String ruleName() {
|
||||||
|
return getClass().getSimpleName() + "{" + fieldName + " - " + dictionaryName + "}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,4 +69,9 @@ public record EnumPresentRule<R, E extends IEnumKey>(String fieldName,
|
||||||
}
|
}
|
||||||
return of(errorWrongEnumValue, fieldName);
|
return of(errorWrongEnumValue, fieldName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String ruleName() {
|
||||||
|
return getClass().getSimpleName() + "{" + fieldName + "}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,4 +40,9 @@ public record FieldRequiredRule<R, V>(
|
||||||
if (value == null) return of(errorEmptyRequiredValue, fieldName);
|
if (value == null) return of(errorEmptyRequiredValue, fieldName);
|
||||||
return empty();
|
return empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String ruleName() {
|
||||||
|
return getClass().getSimpleName() + "{" + fieldName + "}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,4 +103,9 @@ public record IdPresentRule<R, V extends SpcexObjectBase>(
|
||||||
}
|
}
|
||||||
return empty();
|
return empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String ruleName() {
|
||||||
|
return getClass().getSimpleName() + "{" + fieldName + "}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue