Class FieldExists
java.lang.Object
com.northconcepts.datapipeline.filter.Filter
com.northconcepts.datapipeline.filter.FieldExists
A filter that checks if all the specified field exists.
See
FieldPath for supported field name expressions.-
Constructor Summary
ConstructorsConstructorDescriptionFieldExists(String name) FieldExists(String... names) Creates a filter that keeps records containing all of the given fields; at least one name is required. -
Method Summary
Modifier and TypeMethodDescriptionaddExceptionProperties(DataException exception) Adds this filter's settings to the given exception and returns it; subclasses override it to add their own.booleanTests whether a record passes this filter.booleangetName()Returns the field name when this filter checks exactly one field, otherwise null.getNames()inthashCode()toString()
-
Constructor Details
-
FieldExists
Creates a filter that keeps records containing all of the given fields; at least one name is required. -
FieldExists
-
-
Method Details
-
getNames
-
getName
Returns the field name when this filter checks exactly one field, otherwise null. -
allow
Description copied from class:FilterTests whether a record passes this filter.Contract for subclasses (see also
docs/authoring/Filter.md):- Return
trueto keep the record. - Return
falseto discard the record (routed to a discard writer if the hostFilteringReaderis configured with one). - Must be a pure decision — do not mutate the record here.
- Throw
DataExceptiononly for unrecoverable filter failures; for ordinary "data fails predicate" cases, returnfalse.
- Return
-
toString
-
addExceptionProperties
Description copied from class:FilterAdds this filter's settings to the given exception and returns it; subclasses override it to add their own.- Overrides:
addExceptionPropertiesin classFilter
-
hashCode
public int hashCode() -
equals
-