T - table reference typepublic class RecordIdentifier<T extends java.io.Serializable>
extends java.lang.Object
implements java.io.Externalizable
Normally, if the initial import is done with FWD, and anyone creating new records always uses the
p2j_id_generator_sequence for new keys, the Long recordID component will unique
identify records by itself (FWD keys are guaranteed to be unique across all tables of a database). Adding
the table component (although redundant in normal execution of FWD) will only make it safer (when
records are created in a non-standard way), even if at a bit performance penalty.
| Modifier and Type | Field and Description |
|---|---|
private int |
hashCode
Cached hash code
|
private java.lang.Long |
recordID
Primary key of a database record
|
private T |
table
Table identifier
|
| Constructor and Description |
|---|
RecordIdentifier()
Default constructor
|
RecordIdentifier(T table,
java.lang.Long recordID)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Overridden equivalence test which takes all data values of this object into account.
|
java.lang.Long |
getRecordID()
Get the record's primary key.
|
T |
getTable()
Get the database table name.
|
int |
hashCode()
Overridden implementation to maintain consistency with overridden
equals(java.lang.Object) method. |
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
java.lang.String |
toString()
Compose a string representation of this object for assistance in debugging and testing.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
private T extends java.io.Serializable table
private java.lang.Long recordID
private int hashCode
public RecordIdentifier()
public RecordIdentifier(T table, java.lang.Long recordID)
table - Table identifier.recordID - Primary key.ErrorConditionException - if any parameter is null.public T getTable()
public java.lang.Long getRecordID()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - Another LockRecord instance to test for equivalence with this instance.true if both instances have the same values for table and record ID, else
false.public int hashCode()
equals(java.lang.Object) method.hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - The output destination to which fields will be saved.java.io.IOException - In case of I/O errors.public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablein - Input source from which fields will be restored.java.io.IOException - In case of I/O errors.java.lang.ClassNotFoundException - If payload can't be instantiated.