@Override
public <T> T getRelatedValue2(Resource subject, Resource relation, Object context) throws DatabaseException {
if(Development.DEVELOPMENT) {
- String error = L0Validations.checkValueType(this, subject, relation);
- if(error != null) {
- Logger.defaultLogError(new ValidationException(error));
- //throw new ValidationException(error);
- new ValidationException(error).printStackTrace();
+ if(Development.<Boolean>getProperty(DevelopmentKeys.L0_VALIDATION, Bindings.BOOLEAN)) {
+ String error = L0Validations.checkValueType(this, subject, relation);
+ if(error != null) {
+ Logger.defaultLogError(new ValidationException(error));
+ throw new ValidationException(error);
+ }
}
}
return getValue2(getSingleObject(subject, relation), context);
@Override
public Variant getRelatedVariantValue2(Resource subject, Resource relation, Object context) throws DatabaseException {
if(Development.DEVELOPMENT) {
- String error = L0Validations.checkValueType(this, subject, relation);
- if(error != null) {
- Logger.defaultLogError(new ValidationException(error));
- //throw new ValidationException(error);
- new ValidationException(error).printStackTrace();
- }
+ if(Development.<Boolean>getProperty(DevelopmentKeys.L0_VALIDATION, Bindings.BOOLEAN)) {
+ String error = L0Validations.checkValueType(this, subject, relation);
+ if(error != null) {
+ Logger.defaultLogError(new ValidationException(error));
+ throw new ValidationException(error);
+ }
+ }
}
return getVariantValue2(getSingleObject(subject, relation), context);
}