Class DataObject
java.lang.Object
com.northconcepts.datapipeline.core.DataObject
- Direct Known Subclasses:
Endpoint,JmsConnection,JmsSettings,MultiRowPreparedStatementInsert,MultiRowStatementInsert,PreparedStatementInsert
Abstract super-class for classes that work with data and require a consistent error handling mechanism.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final longstatic final Loggerprotected final Stringprotected static final SimpleDateFormat -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExceptionProperties(DataException exception) Adds this object's current state to aDataException.Creates an exception with the specified message and containing this endpoint's properties (name-value pairs).Converts an exception to aDataException, prefixing the original message with the specified text and adding this endpoint's properties (name-value pairs).Converts an exception to aDataExceptionand adds this endpoint's properties (name-value pairs).final longgetId()The auto numbered ID of this instance.final StringgetName()The name of this instance (- ). static longresetID()Restarts the ID sequence shared by all instances, so the next one created gets ID 1.toString()
-
Field Details
-
log
public static final Logger log -
TIMESTAMP_FORMAT
-
id
protected final long id -
name
-
-
Constructor Details
-
DataObject
public DataObject()
-
-
Method Details
-
resetID
public static long resetID()Restarts the ID sequence shared by all instances, so the next one created gets ID 1. -
getId
public final long getId()The auto numbered ID of this instance. -
getName
The name of this instance (- ). -
toString
-
addExceptionProperties
Adds this object's current state to aDataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information. -
exception
Converts an exception to aDataException, prefixing the original message with the specified text and adding this endpoint's properties (name-value pairs).The returned exception can then be thrown in the normal way.
If the supplied exception is an instanceof
DataException, it will be returned, otherwise it will be nested inside aDataException. In either case the result message will contain the new prefix along with this endpoint properties. -
exception
Converts an exception to aDataExceptionand adds this endpoint's properties (name-value pairs).The returned exception can then be thrown in the normal way.
If the supplied exception is an instanceof
DataException, it will be returned, otherwise it will be nested inside aDataException. In either case the result message will contain this endpoint properties. -
exception
Creates an exception with the specified message and containing this endpoint's properties (name-value pairs).The returned exception can then be thrown in the normal way.
-