public class FWDDataObject extends java.lang.Object implements TempTableRecord, java.lang.reflect.InvocationHandler
DataObject
instance. This is required to be able to track
before-table changes for a SDO row.Modifier and Type | Field and Description |
---|---|
private java.lang.Long |
dataSourceRowid
The data-source-rowid, as used by
TempRecord._datasourceRowid() . |
private java.lang.Integer |
errorFlag
The error-flag, as used by
TempRecord._errorFlags() . |
private java.lang.String |
errorString
The error-string, as used by
TempRecord._errorString() . |
private boolean |
forceNormalizedFields
When
true , this will force the resolution of normalized field names, as we are within
the FWD runtime, to re-create a row incoming from the remote side (and this always uses normalized
fields). |
private java.lang.Long |
id
The id, as used by
BaseRecord.primaryKey() . |
private boolean |
logging
Flag indicating if changes are being tracked.
|
private boolean |
normalizedExtent
Flag indicating if extents are normalized.
|
private java.lang.Long |
originRowid
The origin-rowid, as used by
TempRecord._originRowid() . |
private java.lang.Long |
peerRowid
The peer-rowid, as used by
TempRecord._peerRowid() . |
private commonj.sdo.DataObject |
row
The wrapped row.
|
private java.lang.Integer |
rowState
The row-state, as used by
TempRecord._rowState() . |
private commonj.sdo.DataObject |
tableMetaData
The source table metadata used to create this
row . |
Constructor and Description |
---|
FWDDataObject() |
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
_datasourceRowid()
Gets the current value of the
DATA_SOURCE_ROWID property for this record. |
void |
_datasourceRowid(java.lang.Long rowid)
Sets the current value of the
DATA_SOURCE_ROWID property for this record. |
java.lang.Integer |
_errorFlags()
Gets the current value of the
__error-flag__ for this record. |
void |
_errorFlags(java.lang.Integer flag)
Sets the current value of the
__error-flag__ for this record. |
java.lang.String |
_errorString()
Gets the current value of the
__error-string__ for this record. |
void |
_errorString(java.lang.String error)
Sets the current value of the
__error-string__ for this record. |
java.lang.Long |
_originRowid()
Gets the current value of the
ORIGIN-ROWID property for this record. |
void |
_originRowid(java.lang.Long rowid)
Sets the current value of the
ORIGIN-ROWID property for this record. |
java.lang.Long |
_peerRowid()
Gets the rowid (as
Long value) of the peer record. |
void |
_peerRowid(java.lang.Long rowid)
Sets the rowid (as
Long value) of the peer record. |
java.lang.Integer |
_rowState()
Gets the current value of the
ROW-STATE property for this record. |
void |
_rowState(java.lang.Integer state)
Sets the value of the
ROW-STATUS property for this record. |
void |
beginLogging()
Start tracking changes in this record.
|
void |
endLogging()
Stop tracking changes in this record.
|
boolean |
equals(java.lang.Object obj)
Check if this instance is the same as the specified
FWDDataObject or
DataObject instance. |
commonj.sdo.DataObject |
getRow()
Get the
row . |
int |
hashCode()
Compute this object's hashcode, the same as the
row 's hashcode. |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Proxy handle which dispatches method calls to the wrapped
row . |
private boolean |
isLogging()
Check if logging is enabled.
|
java.lang.Long |
primaryKey()
Get the identifier (primary key) for this data-object.
|
void |
primaryKey(java.lang.Long id)
Set the identifier (primary key) for this data-object.
|
(package private) void |
rowCreated()
Log an event that this row is newly created.
|
void |
setForceNormalizedFields(boolean forceNormalizedFields)
Set the state of the
forceNormalizedFields flag. |
void |
setRow(commonj.sdo.DataObject row)
Set the
row . |
void |
setTableMetaData(commonj.sdo.DataObject tableMetaData)
Set the source table metadata used to create this
row . |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
toArray
private commonj.sdo.DataObject row
private java.lang.Long id
BaseRecord.primaryKey()
.private java.lang.Long originRowid
TempRecord._originRowid()
.private java.lang.Long dataSourceRowid
TempRecord._datasourceRowid()
.private java.lang.Long peerRowid
TempRecord._peerRowid()
.private java.lang.Integer rowState
TempRecord._rowState()
.private java.lang.String errorString
TempRecord._errorString()
.private java.lang.Integer errorFlag
TempRecord._errorFlags()
.private boolean logging
private commonj.sdo.DataObject tableMetaData
row
.private boolean normalizedExtent
private boolean forceNormalizedFields
true
, this will force the resolution of normalized field names, as we are within
the FWD runtime, to re-create a row incoming from the remote side (and this always uses normalized
fields).
This flag is used only when normalizedExtent
flag is false
(we are in denormalized
extent fields mode), so the FWD runtime can access the extent field directly by their legacy name,
and not in the denormalized mode.
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
row
.
Certain APIs are intercepted to allow tracking changes.
invoke
in interface java.lang.reflect.InvocationHandler
java.lang.Throwable
public void setForceNormalizedFields(boolean forceNormalizedFields)
forceNormalizedFields
flag.forceNormalizedFields
- When true
, normalized field names are assumed always.public void beginLogging()
public void endLogging()
public void setTableMetaData(commonj.sdo.DataObject tableMetaData)
row
.tableMetaData
- The source table metadata.public void setRow(commonj.sdo.DataObject row)
row
.row
- The wrapped DataObject
instance.public commonj.sdo.DataObject getRow()
row
.public java.lang.Long primaryKey()
primaryKey
in interface Persistable
id
.public void primaryKey(java.lang.Long id)
primaryKey
in interface Persistable
id
- Unique identifier to be associated with this object.public java.lang.Long _peerRowid()
Long
value) of the peer record. Exclusively, for a BEFORE-TABLE
record this is the after-rowid
and before-rowid
for AFTER-TABLE record._peerRowid
in interface TempTableRecord
null
if there is none.Buffer.__AFTER_ROWID__
public void _peerRowid(java.lang.Long rowid)
Long
value) of the peer record. Exclusively, for a BEFORE-TABLE
record this is the after-rowid
and before-rowid
for AFTER-TABLE record._peerRowid
in interface TempTableRecord
rowid
- The new long rowid value of the peer record or null
.Buffer.__AFTER_ROWID__
public java.lang.Integer _rowState()
ROW-STATE
property for this record. Valid values
are defined as constants in Buffer
interface. Additionally, null
value is
returned if property is not available._rowState
in interface TempTableRecord
ROW-STATUS
property for this record as
explained above.Buffer.__ROW_STATE__
public void _rowState(java.lang.Integer state)
ROW-STATUS
property for this record. Valid values are defined
as constants in Buffer
interface. Additionally null
value is allowed if
property is not available._rowState
in interface TempTableRecord
state
- The new value of the ROW-STATE
property for this record as explained above.Buffer.__ROW_STATE__
public java.lang.Long _originRowid()
ORIGIN-ROWID
property for this record. This property
of a record in a buffer of a CHANGE DATASET points to original record of the change.
Additionally, null
value is returned if property is not available._originRowid
in interface TempTableRecord
ORIGIN-ROWID
property for this record as
explained above.Buffer.__ORIGIN_ROWID__
public void _originRowid(java.lang.Long rowid)
ORIGIN-ROWID
property for this record. This property
of a record in a buffer of a CHANGE DATASET points to original record of the change.
Additionally, null
value is returned if property is not available._originRowid
in interface TempTableRecord
rowid
- The new value of the ORIGIN-ROWID
property for this record as explained
above.Buffer.__ORIGIN_ROWID__
public java.lang.Long _datasourceRowid()
DATA_SOURCE_ROWID
property for this record. This property of a
record in a buffer of a CHANGE DATASET points to original record of the change. Additionally,
null
value is returned if property is not available._datasourceRowid
in interface TempTableRecord
DATA_SOURCE_ROWID
property for this record as explained above.Buffer.__DATA_SOURCE_ROWID__
public void _datasourceRowid(java.lang.Long rowid)
DATA_SOURCE_ROWID
property for this record. This property of a
record in a buffer of a CHANGE DATASET points to original record of the change. Additionally,
null
value is returned if property is not available._datasourceRowid
in interface TempTableRecord
rowid
- The new value of the DATA_SOURCE_ROWID
property for this record as explained above.Buffer.__DATA_SOURCE_ROWID__
public java.lang.Integer _errorFlags()
__error-flag__
for this record._errorFlags
in interface TempTableRecord
__error-flag__
for this record.Buffer.__ERROR_FLAG__
public void _errorFlags(java.lang.Integer flag)
__error-flag__
for this record._errorFlags
in interface TempTableRecord
flag
- the current value of the __error-flag__
for this record.Buffer.__ERROR_FLAG__
public java.lang.String _errorString()
__error-string__
for this record._errorString
in interface TempTableRecord
__error-string__
for this record.Buffer.__ERROR_STRING__
public void _errorString(java.lang.String error)
__error-string__
for this record._errorString
in interface TempTableRecord
error
- the current value of the __error-string__
for this record.Buffer.__ERROR_STRING__
public boolean equals(java.lang.Object obj)
FWDDataObject
or
DataObject
instance.equals
in class java.lang.Object
obj
- The other instance.public int hashCode()
row
's hashcode.hashCode
in class java.lang.Object
void rowCreated()
private boolean isLogging()
true
if logging
is set and the row is already added to the table.