public abstract class DataObject extends Object
| Modifier and Type | Field and Description |
|---|---|
protected long |
id |
static Logger |
log |
protected String |
name |
protected static SimpleDateFormat |
TIMESTAMP_FORMAT |
| Constructor and Description |
|---|
DataObject() |
| Modifier and Type | Method and Description |
|---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this object's current state to a
DataException. |
DataException |
exception(String message)
Creates an exception with the specified message and containing this endpoint's properties (name-value pairs).
|
DataException |
exception(String message,
Throwable exception)
Converts an exception to a
DataException, prefixing the original message with the specified text
and adding this endpoint's properties (name-value pairs). |
DataException |
exception(Throwable exception)
Converts an exception to a
DataException and adds this endpoint's properties (name-value pairs). |
long |
getId()
The auto numbered ID of this instance.
|
String |
getName()
The name of this instance (
|
static long |
resetID() |
String |
toString() |
public static final Logger log
protected static final SimpleDateFormat TIMESTAMP_FORMAT
protected final long id
protected final String name
public static long resetID()
public final long getId()
public final String getName()
public DataException addExceptionProperties(DataException exception)
DataException. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.public DataException exception(String message, Throwable exception)
DataException, 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 a DataException. In either case the result message will contain the new prefix along
with this endpoint properties.
public DataException exception(Throwable exception)
DataException and 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 a DataException. In either case the result message will contain this endpoint properties.
public DataException exception(String message)
The returned exception can then be thrown in the normal way.
Copyright (c) 2006-2025 North Concepts Inc. All Rights Reserved.