Package guru.mikelue.jdut.decorate
Defines the interface of decoration for
The dependency of
Side effects to
DataGrainThe decoration
The DataGrainDecorator
defines the lambda expression would be used to change data(or schema) of a DataRow.
DataFieldDecorator is a fine-grained extension of decorator for every field.
TableSchemaLoadingDecorator
The dependency of DataConductor, this decorator would load schema of database before a DataRow is going to be operated.
ReplaceFieldDataDecorator
You may replace a value of field with another value by certain condition(the Predicate over DataField).
Default value for null
The predicate of DataFieldPredicates::nullValue could be used as condition for replacing null value.
Side effects to Supplier of field data
If you don't want to evaluate the lambda expression, which provides value of a field, you could uses DataFieldPredicates.nonSupplier(guru.mikelue.jdut.datagrain.DataField<?>) to prevent the evaluation until the real needing for that field.
-
Interface Summary Interface Description DataFieldDecorator LikesDataFieldDecorator, with iteration of data fields.DataGrainDecorator This interface should be used withDataGrain.decorate(guru.mikelue.jdut.decorate.DataGrainDecorator). -
Class Summary Class Description ReplaceFieldDataDecorator TableSchemaLoadingDecorator Loads database schema and validating rows.
To improve performance, this object would cacheSchemaTableby its name, but this class is thread-safe for the caching mechanism.