Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.jbo
Class Key

java.lang.Object
  extended by oracle.jbo.Key
All Implemented Interfaces:
AttributeList

public class Key
extends java.lang.Object
implements AttributeList


Field Summary
static java.lang.Class CLASS_INSTANCE
           
 
Constructor Summary
Key(java.lang.Object[] 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, AttributeDef[] keyAttrs)
           
 
Method Summary
 boolean equals(java.lang.Object val)
           
 boolean equalsIgnoreNull(java.lang.Object value)
           
 java.lang.Object getAttribute(int index)
          Selects the attribute at the given index.
 java.lang.Object getAttribute(java.lang.String name)
          Selects the attribute with the given name.
 int getAttributeCount()
          Counts the number of attributes.
 int getAttributeIndexOf(java.lang.String name)
          Finds the index (0-based) of the named attribute.
 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()
           
 java.lang.Object getRowHandle()
          Internal: em>Applications should not invoke this method.
 long getSignature()
          Internal: em>Applications should not invoke this method.
 int hashCode()
           
 boolean isNull()
           
static boolean isNullKeyValues(java.lang.Object[] keyValues)
          Checks if the key values are null.
 void setAttribute(int index, java.lang.Object value)
          Sets the value of an attribute.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Set the value for the named attribute.
 java.lang.String toString()
           
 java.lang.String toStringFormat(boolean bSignature)
          Converts the Key to a String representation.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_INSTANCE

public static final java.lang.Class CLASS_INSTANCE
Constructor Detail

Key

public Key(java.lang.Object[] values)

Key

public Key(java.lang.Object[] keyValues,
           long sig,
           java.lang.Object rowHandle)
Internal: em>Applications should not invoke this method.


Key

public Key(java.lang.String sString,
           AttributeDef[] keyAttrs)
    throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getAttribute

public java.lang.Object getAttribute(int index)
Description copied from interface: AttributeList
Selects the attribute at the given index.

Specified by:
getAttribute in interface AttributeList
Parameters:
index - an integer in the range 0 to getAttributeCount() - 1.
Returns:
the attribute associated with index, or null if index out of range

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Description copied from interface: AttributeList
Selects the attribute with the given name.

Specified by:
getAttribute in interface AttributeList
Parameters:
name - an attribute name.
Returns:
the attribute associated with name, or null if name not found

getAttributeCount

public int getAttributeCount()
Description copied from interface: AttributeList
Counts the number of attributes.

Specified by:
getAttributeCount in interface AttributeList
Returns:
the number of attributes.

getAttributeIndexOf

public int getAttributeIndexOf(java.lang.String name)
Description copied from interface: AttributeList
Finds the index (0-based) of the named attribute.

Specified by:
getAttributeIndexOf in interface AttributeList
Parameters:
name - the attribute's name.
Returns:
an integer in the range 0 to getAttributeCount() - 1. If the named attribute is not found, it returns -1.

getAttributeNames

public java.lang.String[] getAttributeNames()
Description copied from interface: AttributeList
Returns an array of attribute names in this list.

Specified by:
getAttributeNames in interface AttributeList
Returns:
an array of attribute names.

getAttributeValues

public java.lang.Object[] getAttributeValues()
Description copied from interface: AttributeList
Returns an array of attribute values in this list.

Specified by:
getAttributeValues in interface AttributeList
Returns:
an array of attribute values.

setAttribute

public void setAttribute(int index,
                         java.lang.Object value)
Description copied from interface: AttributeList
Sets the value of an attribute.

Specified by:
setAttribute in interface AttributeList
Parameters:
index - the attribute's index.
value - the value to be assigned to the attribute.

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Description copied from interface: AttributeList
Set the value for the named attribute.

Specified by:
setAttribute in interface AttributeList
Parameters:
name - the attribute's name.
value - the value to be assigned to the attribute.

getKeyValues

public java.lang.Object[] getKeyValues()

isNull

public boolean isNull()

isNullKeyValues

public static boolean isNullKeyValues(java.lang.Object[] keyValues)
Checks if the key values are null.

Returns:
true if keyValues is empty or if all its values are null.

equalsIgnoreNull

public boolean equalsIgnoreNull(java.lang.Object value)

equals

public boolean equals(java.lang.Object val)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toStringFormat

public java.lang.String toStringFormat(boolean bSignature)
Converts the Key to a String representation. This is useful in that you can later materialize the Key object via it's string constructor. If bSignature is true, adds the Row handle as well as VO signature to the key string so that if a client connects to the same AM instance, the AM could find out the same VO and same Row based on these ids.


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getSignature

public long getSignature()
Internal: em>Applications should not invoke this method.


getRowHandle

public java.lang.Object getRowHandle()
Internal: em>Applications should not invoke this method.


Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.