![JAR search and dependency download from the Maven repository](/logo.png)
org.droitateddb.validation.NotNullValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
droitatedDB is a lightweight framework, which frees you from the burden of dealing with Androids SQLite
database directly if you don't want to
and let's you access it directly if you have to.
The newest version!
package org.droitateddb.validation;
/**
* Implementation of the @NotNull validation annotation.
*
* @author Falk Appel
* @author Alexander Frank
*/
public class NotNullValidator implements CustomValidator {
public static final int ERROR_CODE = 0;
@Override
public ValidationResult onValidate(NotNull annotation, Object toByValidated) {
if (toByValidated == null) {
return ValidationResult.invalid(ERROR_CODE, "The field is not allowed to be null");
}
return ValidationResult.valid();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy