public abstract class JDBCObject<DBOBJ extends MappedAttributesObject> extends MappedAttributesObject implements java.lang.Comparable<DBOBJ>, JDBCObjectKey<DBOBJ>
Modifier and Type | Field and Description |
---|---|
static java.util.Date |
LOWVAL_RPG_DATE
The *LOWVAL value for an empty date field as used by RPG (01-01-0001).
|
static java.sql.Time |
LOWVAL_RPG_TIME
The *LOWVAL value for an empty time field as used by RPG (00:00:00).
|
private static long |
serialVersionUID
The class' serialization version id.
|
static java.lang.String |
STATUS_ACTIVE
The status code for an active object.
|
static java.lang.String |
STATUS_BLANK
The status code for an active object.
|
static java.lang.String |
STATUS_CANCELED
The status code for a canceled object.
|
static java.lang.String |
STATUS_DELETED
The status code for a deleted object.
|
static java.lang.String |
STATUS_INACTIVE
The status code for an inactive object.
|
static java.lang.String |
STATUS_PENDING
The status code for pending object.
|
ivHashCode, ivHashFlds, ivObjAttrs
Modifier | Constructor and Description |
---|---|
protected |
JDBCObject()
The constructor for the abstract object.
|
protected |
JDBCObject(java.lang.String[] hashflds)
The constructor for the abstract object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
after(DBOBJ obj)
Answers if this object is greater than the given object based on the
object's
compareTo method results. |
boolean |
before(DBOBJ obj)
Answers if this object is less than the given object based on the
object's
compareTo method results. |
int |
compareTo(DBOBJ obj)
Compares this object to the given object and determines if this object is
less than, equal to or greater than the given object.
|
boolean |
equals(java.lang.Object obj)
Compares the given object to this object and determines if the two are
equal.
|
java.lang.String |
fmtStatus()
Returns a formatted string for the status field.
|
java.lang.String |
fmtStatus(java.lang.String fldname)
Returns a formatted string for the given status field name.
|
java.lang.String |
getObjectStatus()
Returns the object's status code.
|
DBOBJ |
hashKey()
Returns a lightweight instance of this object which only contains the
attributes for the hash code fields that were defined in the object's
constructor.
|
void |
setObjectStatus(java.lang.String value)
Sets the object's status code.
|
cloneMapAttributes, formatValue, formatValue, getHashFields, getMapArrayList, getMapAttributes, getMapBigDecimal, getMapBoolean, getMapDate, getMapDouble, getMapInteger, getMapLong, getMapMapped, getMapObject, getMapShort, getMapString, getMapString, getMapStringBuffer, getMapStringBuilder, getMapTime, getMapTimestamp, getMapVector, hashCode, setHashFields, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMapAttributes, setMapObject, setMapTime, setMapTimestamp, toStringArray
private static final long serialVersionUID
public static final java.lang.String STATUS_BLANK
public static final java.lang.String STATUS_ACTIVE
public static final java.lang.String STATUS_CANCELED
public static final java.lang.String STATUS_DELETED
public static final java.lang.String STATUS_INACTIVE
public static final java.lang.String STATUS_PENDING
public static final java.util.Date LOWVAL_RPG_DATE
public static final java.sql.Time LOWVAL_RPG_TIME
protected JDBCObject()
null
. The object's configured db table key fields are used to
determine the object's hash code (db.[tblname].Primary, db.[tblname].Index.0).
If no configured key fields are found, the object's hash code is zero.protected JDBCObject(java.lang.String[] hashflds)
null
.hashflds
- (String[]) The set of field names used to determine
the object's hash code. The field names supplied should match
the fields referenced in the object's equals
method. If
no fields names are supplied, the object's hash code is zero.public int compareTo(DBOBJ obj)
compareTo
in interface java.lang.Comparable<DBOBJ extends MappedAttributesObject>
obj
- (DBOBJ) The object to compare with this object.public DBOBJ hashKey()
hashKey
in interface JDBCObjectKey<DBOBJ extends MappedAttributesObject>
public boolean equals(java.lang.Object obj)
equals
in class MappedAttributesObject
obj
- (Object) The object to compare with this object.true
if the specified object is equal to
this object, otherwise false
.public boolean after(DBOBJ obj)
compareTo
method results.obj
- (DBJOB) The object to compare to this object to.true
if this object is greater than the given
object, otherwise false
.public boolean before(DBOBJ obj)
compareTo
method results.obj
- (DBJOB) The object to compare to this object to.true
if this object is less than the given
object, otherwise false
.public java.lang.String getObjectStatus()
This code is typically used during maintenance routines to temporarily flag an object within a collection of objects with a particular status.
public void setObjectStatus(java.lang.String value)
This code is typically used during maintenance routines to temporarily flag an object within a collection of objects with a particular status.
value
- (String) The object's status code.public java.lang.String fmtStatus()
public java.lang.String fmtStatus(java.lang.String fldname)
fldname
- (String) The name of the status field to format.