Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 6.0sp2 API Reference

## weblogic.db.jdbc
Class KeyDef

    java.lang.Object
      |
      +--weblogic.db.jdbc.KeyDef

public class KeyDef
extends java.lang.Object

A KeyDef object defines the fields in a TableDataSet object that will be used in updates and deletes. A KeyDef is used to construct the WHERE clause of an SQL UPDATE or DELETE statement to uniquely manipulate a record. The attributes associated with a KeyDef object should correspond to a unique key in the database table. A KeyDef's attributes are accessible by name or index position.

For implementation and usage see the Developers Guide.

Author:
  Copyright (c) 1995-98 by WebLogic, Inc. All Rights Reserved., Copyright (c) 1999 by BEA WebXpress. All Rights Reserved.
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  `TableDataSet`

Constructor Summary
`KeyDef()` Constructor initializes a KeyDef object with no attributes in key.

Method Summary
`KeyDef` | `addAttrib(java.lang.String str)` Adds attributes to an existing KeyDef object.
`boolean` | `containsAttrib(java.lang.String colname)` Determines whether a KeyDef contains an attribute name.
`java.lang.String` | `getAttrib(int pos)` Returns the attribute name at the specified 1-based index position.
`int` | `size()` Returns the number of attributes in a KeyDef object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### KeyDef

    public KeyDef()

  Constructor initializes a KeyDef object with no attributes in key.

Method Detail

### size

    public int size()

  Returns the number of attributes in a KeyDef object.

  Returns:
    Number of attributes

### addAttrib

    public KeyDef addAttrib(java.lang.String str)
                     throws DataSetException

  Adds attributes to an existing KeyDef object.

  Parameters:
    `str` - Column name
  Returns:
    KeyDef KeyDef object
  Throws:
    DataSetException - if an attempt to add an attribute is made after the KeyDef has been assigned to the DataSet

### getAttrib

    public java.lang.String getAttrib(int pos)

  Returns the attribute name at the specified 1-based index position.

  Parameters:
    `pos` - 1-based index into a KeyDef's attributes
  Returns:
    String

### containsAttrib

    public boolean containsAttrib(java.lang.String colname)

  Determines whether a KeyDef contains an attribute name.

  Parameters:
    `colname` - Name of a column
  Returns:
    True if the KeyDef contains a matching attribute

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs60
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD