org.pentaho.di.job.entry.validator
Class NotNullValidator
java.lang.Object
org.pentaho.di.job.entry.validator.NotNullValidator
- All Implemented Interfaces:
- JobEntryValidator
public class NotNullValidator
- extends Object
- implements JobEntryValidator
Fails if a field's value is null.
- Author:
- mlowery
INSTANCE
public static final NotNullValidator INSTANCE
NotNullValidator
public NotNullValidator()
validate
public boolean validate(CheckResultSourceInterface source,
String propertyName,
List<CheckResultInterface> remarks,
ValidatorContext context)
- Description copied from interface:
JobEntryValidator
- Using reflection, the validator fetches the field named
propertyName from the bean
source and runs the validation putting any messages into remarks. The return value is
true if the validation passes.
- Specified by:
validate in interface JobEntryValidator
- Parameters:
source - bean to validatepropertyName - property to validateremarks - list to which to add messagescontext - any other information needed to perform the validation
- Returns:
- validation result
getName
public String getName()
- Description copied from interface:
JobEntryValidator
- Returns the name of this validator, unique among all validators.
- Specified by:
getName in interface JobEntryValidator
- Returns:
- name