Class PipelineAction
java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
com.northconcepts.datapipeline.foundations.core.FoundationObject
com.northconcepts.datapipeline.foundations.pipeline.PipelineObject
com.northconcepts.datapipeline.foundations.pipeline.action.PipelineAction
- All Implemented Interfaces:
DataExceptionContributor,JsonSerializable,RecordSerializable,XmlSerializable,DataReaderAction,SqlSelectGenerator,JavaCodeGenerator,Serializable
- Direct Known Subclasses:
AddFieldsAction,AggregateGroupFieldsAction,CompositePipelineAction,ConvertDateTimeToStringAction,ConvertNullToValueAction,ConvertNumberToStringAction,ConvertStringToBooleanAction,ConvertStringToDateTimeAction,ConvertStringToNumberAction,ConvertValueToStringAction,CopyFieldsAction,DataMappingAction,DecisionTableAction,DecisionTreeAction,FilterFieldExistsAction,FilterFieldMatchesPatternAction,FilterFieldNotNullAction,FilterMatchExpression,RemoveDuplicatesAction,RenameFieldsAction,SelectArrangeFieldsAction,SortFieldsAction,ValidateFieldsExistsAction,ValidateFieldsMatchPatternAction,ValidateFieldsNotNullAction,ValidateMatchExpression
public abstract class PipelineAction
extends PipelineObject
implements DataReaderAction, SqlSelectGenerator
Base class for the steps of a declarative
Pipeline; each action wraps the reader produced by the previous step.- See Also:
-
Field Summary
Fields inherited from class com.northconcepts.datapipeline.foundations.core.FoundationObject
internalId, internalName, log, TIMESTAMP_FORMATFields inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
SERIALIZED_CLASS_NAME, TYPEFields inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
XML_SERIALIZED_CLASS_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPipelineAction(String code, String displayText) Creates an action with the identifier returned bygetCode()and the name returned bygetDisplayText(). -
Method Summary
Modifier and TypeMethodDescriptionstatic StringescapeJavaString(String str) Escapes double quotes so the string can be placed in a generated Java string literal; other characters, such as backslashes, are left as-is.fromRecord(Record source) Loads this instance's state from a record and returnsthis(for fluid API call chaining).fromXmlElement(Element element) voidgenerateJavaCode(JavaCodeBuilder javaCodeBuilder) Appends Java source code representing this object to the given builder.final StringgetCode()Returns the identifier of this kind of action, such as"data-mapping".Returns the human-readable name of this action, such as"Data Mapping".Returns the pipeline this action belongs to, or null if it has not been added to one.setDescription(String description) setPipeline(Pipeline pipeline) Sets the pipeline this action belongs to; called byPipelinewhen the action is added to it.toRecord()Converts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.final StringtoString()Returns a basic JSON representation of this instance.toXmlElement(Document document) Returns an element, created withdocument, describing this object; the default implementation throws aDataException.Methods inherited from class com.northconcepts.datapipeline.foundations.core.FoundationObject
addExceptionProperties, assertValid, assertValid, clone, exception, exception, exception, getInternalId, getInternalName, resetInternalIdMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.DataExceptionContributor
addExceptionPropertiesMethods inherited from interface com.northconcepts.datapipeline.foundations.pipeline.action.DataReaderAction
applyMethods inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
fromJson, fromJson, toJson, toJson, toJsonMethods inherited from interface com.northconcepts.datapipeline.jdbc.sql.select.SqlSelectGenerator
generateSqlSelect
-
Constructor Details
-
PipelineAction
Creates an action with the identifier returned bygetCode()and the name returned bygetDisplayText().
-
-
Method Details
-
getCode
Description copied from interface:DataReaderActionReturns the identifier of this kind of action, such as"data-mapping".- Specified by:
getCodein interfaceDataReaderAction
-
getDisplayText
Description copied from interface:DataReaderActionReturns the human-readable name of this action, such as"Data Mapping".- Specified by:
getDisplayTextin interfaceDataReaderAction
-
getPipeline
Returns the pipeline this action belongs to, or null if it has not been added to one. -
setPipeline
Sets the pipeline this action belongs to; called byPipelinewhen the action is added to it. -
getDescription
-
setDescription
-
escapeJavaString
Escapes double quotes so the string can be placed in a generated Java string literal; other characters, such as backslashes, are left as-is. -
generateJavaCode
Description copied from interface:JavaCodeGeneratorAppends Java source code representing this object to the given builder.- Specified by:
generateJavaCodein interfaceJavaCodeGenerator
-
toString
Description copied from class:BeanReturns a basic JSON representation of this instance. -
toRecord
Description copied from interface:RecordSerializableConverts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.- Specified by:
toRecordin interfaceRecordSerializable- Overrides:
toRecordin classBean
-
fromRecord
Description copied from interface:RecordSerializableLoads this instance's state from a record and returnsthis(for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.- Specified by:
fromRecordin interfaceRecordSerializable- Overrides:
fromRecordin classBean- Parameters:
source-- Returns:
- this instance.
-
toXmlElement
Description copied from interface:XmlSerializableReturns an element, created withdocument, describing this object; the default implementation throws aDataException.- Specified by:
toXmlElementin interfaceXmlSerializable
-
fromXmlElement
- Specified by:
fromXmlElementin interfaceXmlSerializable
-