|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | 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)
Deprecated. Use Key(String, AttributeDefImpl) instead |
|
Key(java.lang.Object[] keyValues)
Constructs a 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)
Deprecated. Use Key(String, AttributeDefImpl) instead |
|
Key(java.lang.String sString,
AttributeDef[] keyAttrs)
|
Method Summary | |
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.String[] |
getAttributeNames()
Returns an array of attribute names in this list. |
java.lang.Object[] |
getAttributeValues()
Returns an array of attribute values in this list. |
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 |
isAnyNull()
Checks if this key has any part that is null . |
static boolean |
isAnyNullKeyValues(java.lang.Object[] keyValues)
Checks if any of the key values is null . |
boolean |
isNull()
Checks if this key is null . |
static boolean |
isNullKeyValues(java.lang.Object[] keyValues)
Checks 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()
Deprecated. Use toByteArray(boolean bSignature) instead |
byte[] |
toByteArray(boolean bSignature)
Internal: em>Applications should not invoke this method. |
java.lang.String |
toString()
Internal: For debugging only. |
java.lang.String |
toStringFormat()
Deprecated. Use toStringFormat(boolean bSignature) instead |
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)
A key may be constructed to identify a row or a set of rows. If it is to identify a unique row, the key values must match the row's key attributes exactly.
A partial key (where some key values are null
) may
be used to locate a set of partially matching rows. This is
applicable only for oracle.jbo.RowIterator's findByKey(Key)
method. See
for details.
oracle.jbo.RowIterator.findByKey(Key)
The key values should be ordered as in the defintion for the given row (that of the Entity or the View Object).
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.
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 static boolean isAnyNullKeyValues(java.lang.Object[] keyValues)
null
.
true
if keyValues
is empty or if any of its
values is null
.public boolean isAnyNull()
null
.
true
if this key has any null part.public int hashCode()
public java.lang.String toString()
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[] getAttributeNames()
AttributeList
getAttributeNames
in interface AttributeList
public java.lang.Object[] getAttributeValues()
AttributeList
getAttributeValues
in interface AttributeList
public java.lang.String toStringFormat()
public byte[] toByteArray()
|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.