|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jbo.Key
A primary, foreign, or composite row identifier.
Users should not modify keys: JDeveloper treats keys as if they are immutable.
Call getKey()
on a row object to get its unique identifier.
Constructor Summary |
Key(byte[] keyBytes)
Internal. |
Key(java.lang.Object[] keyValues)
Constructs a Primary Key from a set of key values. |
Key(java.lang.Object[] keyValues,
long sig,
java.lang.Object rowHandle)
Internal: em>Applications should not invoke this method. |
Key(java.lang.String sString)
Initializes the Key object from it's string representation. |
Key(java.lang.String sString,
AttributeDef[] keyAttrs)
|
Method Summary |
Type | Method |
---|---|
boolean |
equals(java.lang.Object val)
Tests for equality. |
java.lang.Object |
getAttribute(int index)
Gets the value for a selected column. |
java.lang.Object |
getAttribute(java.lang.String p0)
Gets the value of an attribute. |
int |
getAttributeCount()
Counts the number of columns that define the key. |
int |
getAttributeIndexOf(java.lang.String p0)
Gets the index of column identified by name. |
java.lang.Object[] |
getKeyValues()
Internal: em>Applications should not invoke this method. |
java.lang.Object |
getRowHandle()
Internal: em>Applications should not invoke this method. |
long |
getSignature()
Internal: em>Applications should not invoke this method. |
int |
hashCode()
Generates a hashcode for this key. |
boolean |
isNull()
Checks if this key is null . |
static boolean |
isNullKeyValues(java.lang.Object[] keyValues)
Finds if the key values are null . |
void |
setAttribute(int p0,
java.lang.Object p1)
Sets a key value. |
void |
setAttribute(java.lang.String p0,
java.lang.Object p1)
Sets the value of a column identified by name. |
byte[] |
toByteArray()
Internal: em>Applications should not invoke this method. |
byte[] |
toByteArray(boolean bSignature)
Internal: em>Applications should not invoke this method. |
java.lang.String |
toString()
Internal: For debugging only. |
java.lang.String |
toStringFormat()
Converts the Key to a String representation. |
java.lang.String |
toStringFormat(boolean bSignature)
Converts the Key to a String representation. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Key(java.lang.Object[] keyValues)
None of the key values may be null
.
The key values should be ordered as in the metadata defintion for the given row.
keyValues
- an array of key values.public Key(java.lang.Object[] keyValues, long sig, java.lang.Object rowHandle)
public Key(java.lang.String sString, AttributeDef[] keyAttrs) throws java.lang.Exception
public Key(java.lang.String sString) throws java.lang.Exception
public Key(byte[] keyBytes) throws java.io.IOException, java.lang.ClassNotFoundException
Applications should not invoke this method.
Method Detail |
public java.lang.String toStringFormat(boolean bSignature)
public long getSignature()
public java.lang.Object getRowHandle()
public boolean equals(java.lang.Object val)
Keys are considered to be equal if they have the same number of columns, and values in each column are equal.
equals
in class java.lang.Object
val
- a key to be compaired to this
.true
if val
is a key, and is equal
to this
.public static boolean isNullKeyValues(java.lang.Object[] keyValues)
null
.true
if keyValues
is empty or if all its
values are null
.public boolean isNull()
null
.true
if this key's has no values, or if all its
values are null
.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public byte[] toByteArray(boolean bSignature)
public java.lang.Object[] getKeyValues()
public int getAttributeCount()
getAttributeCount
in interface AttributeList
public java.lang.Object getAttribute(int index)
getAttribute
in interface AttributeList
index
- the position of the column, where the leftmost column has
an index of zero.public java.lang.Object getAttribute(java.lang.String p0)
This method is not implemented by this class. It may be implemented by subclasses to allow names to be used to access attributes.
getAttribute
in interface AttributeList
p0
- ignored.InvalidOperException
- a runtime exception, whenever invoked.public void setAttribute(int p0, java.lang.Object p1)
This method is not implemented by this class. It may be implemented by subclasses.
setAttribute
in interface AttributeList
p0
- ignored.p1
- ignored.InvalidOperException
- at runtime, always.public void setAttribute(java.lang.String p0, java.lang.Object p1)
This method is not implemented by this class. It may be implemented by subclasses that allow attributes to be modified, and to be accessed by name.
setAttribute
in interface AttributeList
p0
- ignored.p1
- ignored.InvalidOperException
- a runtime exception, whenever invoked.public int getAttributeIndexOf(java.lang.String p0)
This method is not implemented by this class. It may be implemented by subclasses to allow names to be used to identify attributes.
getAttributeIndexOf
in interface AttributeList
p0
- ignored.InvalidOperException
- a runtime
exception, whenever invoked.public java.lang.String toStringFormat()
public byte[] toByteArray()
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |