public class RecordIdentifier
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private int |
hashCode
Cached hash code
|
private java.io.Serializable |
recordID
Primary key of a database record
|
private java.lang.String |
table
Table name
|
Constructor and Description |
---|
RecordIdentifier(java.lang.String table,
java.io.Serializable 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.io.Serializable |
getRecordID()
Get the record's primary key.
|
java.lang.String |
getTable()
Get the database table name.
|
int |
hashCode()
Overridden implementation to maintain consistency with overridden
equals(java.lang.Object) method. |
java.lang.String |
toString()
Compose a string representation of this object for assistance in
debugging and testing.
|
private final java.lang.String table
private final java.io.Serializable recordID
private final int hashCode
public RecordIdentifier(java.lang.String table, java.io.Serializable recordID)
table
- Table name.recordID
- Primary key.java.lang.NullPointerException
- if any parameter is null
.public java.lang.String getTable()
public java.io.Serializable getRecordID()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- 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.Object
public java.lang.String toString()
toString
in class java.lang.Object