Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKAttrDefIP

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.dkAbstractAttrDef
        |
        +--com.ibm.mm.sdk.common.DKAttrDefIP
All Implemented Interfaces:
dkAttrDef, DKConstant, DKConstantIP, DKMessageId, DKMessageIdIP, java.io.Serializable

public class DKAttrDefIP
extends dkAbstractAttrDef
implements DKConstantIP, DKMessageIdIP, java.io.Serializable

This class defines methods to access attribute information, including data type and size. The valid datatypes for attributes are defined in the DKConstant class.
Note: Formerly, this was referred to as KeyfieldDef.
Note: The ability to create and delete attributes is not supported.

See Also:
DKConstant, Serialized Form

Fields inherited from interface com.ibm.mm.sdk.common.DKConstantIP
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKConstant
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageIdIP
copyright, DK_IP_MSG_API_PROTOCOL_ERROR, DK_IP_MSG_CLIENT_API_NOT_OK, DK_IP_MSG_DATASTORE_READONLY, DK_IP_MSG_DOCIDNOTSET, DK_IP_MSG_FAF_ERROR, DK_IP_MSG_FAF_INTERNAL_ERROR, DK_IP_MSG_FAF_NOT_OK, DK_IP_MSG_FAF_WARNING, DK_IP_MSG_FOLDER_NOT_EMPTY, DK_IP_MSG_HOST_TIMEOUT, DK_IP_MSG_INVALID_CONN_OPTION, DK_IP_MSG_INVALID_DOCTYPE, DK_IP_MSG_INVALID_IODM_RC, DK_IP_MSG_INVALID_PARM, DK_IP_MSG_IODM_FAILURE, DK_IP_MSG_IODM_NOT_AVAILABLE, DK_IP_MSG_LOCKEDBYANOTHER, DK_IP_MSG_MISSING_CONN_OPTION, DK_IP_MSG_MSGID_NOT_FOUND, DK_IP_MSG_PROTOCOL_ERROR
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKAttrDefIP()
          Constructs and initializes an attribute for an ImagePlus/390 entity definition.
DKAttrDefIP(dkDatastore ds)
          Constructs and initializes an attribute for an ImagePlus/390 entity definition.
 
Method Summary
 void add()
          Adds this attribute to become a persistent part of the entity meta-data it belongs to.
 void del()
          Removes this attribute from the persistent part of the entity meta-data it belongs to.
Note: ImagePlus/390 does not support updating entities.
 short getType()
          Return the datatype of this attribute.
 
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractAttrDef
datastoreName, datastoreType, getDatastore, getDescription, getEntity, getEntityName, getMax, getMin, getName, getPrecision, getQualifiedName, getScale, getSize, getStringType, isNullable, isQueryable, isTextSearchable, isUpdatable, parsedQualifiedName, setDatastore, setDescription, setEntity, setEntityName, setMax, setMin, setName, setNullable, setPrecision, setQualifiedName, setQueryable, setScale, setSize, setStringType, setTextSearchable, setType, setUpdatable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DKAttrDefIP

public DKAttrDefIP()
Constructs and initializes an attribute for an ImagePlus/390 entity definition.

DKAttrDefIP

public DKAttrDefIP(dkDatastore ds)
Constructs and initializes an attribute for an ImagePlus/390 entity definition.
Parameters:
ds - the datastore with which the entity definition is associated. The datastore must be of type DKDatastoreIP.
See Also:
DKDatastoreIP
Method Detail

getType

public short getType()
Return the datatype of this attribute.

The possible datatypes are:

  1. DK_CM_LONG (int) - may need to check upper and lower limits.
  2. DK_CM_SHORT (short int) - may need to check upper and lower limits.
  3. DK_CM_FSTRING (char) - fixed size char, get maximum length from getMax() and the minimum size from getMin()
  4. DK_CM_VSTRING (varchar) - get the maximum length from getMax() and the minimum size from getMin()
  5. DK_CM_TIMESTAMP (timestamp) - yyyy-mm-dd-hh.mm.ss.nnnnnn
  6. DK_CM_DATE (date) - yyyy-mm-dd
  7. DK_CM_TIME (time) - 24 hour clock, hh.mm.ss
  8. DK_CM_DECIMAL (decimal) - use the getPrecision(), getScale() methods to determine valid format. Use getSize() to determine display length (accounts for decimal point, etc.)
All the time, date, and timestamp formats are ISO.
Overrides:
getType in class dkAbstractAttrDef
Returns:
int
See Also:
dkAbstractAttrDef.getMin(), dkAbstractAttrDef.getMax(), dkAbstractAttrDef.getSize()

add

public void add()
         throws DKException,
                java.lang.Exception
Adds this attribute to become a persistent part of the entity meta-data it belongs to.
Note: ImagePlus/390 does not support updating entities. A DKUsageError expection will be thrown
Overrides:
add in class dkAbstractAttrDef
Throws:
DKException - - DKUsageError: the ImagePlus/390 datastore does not support adding new attributes to entity definitions.
java.lang.Exception - if an error occurs in the java classes.

del

public void del()
         throws DKException,
                java.lang.Exception
Removes this attribute from the persistent part of the entity meta-data it belongs to.
Note: ImagePlus/390 does not support updating entities. A DKUsageError expection will be thrown
Overrides:
del in class dkAbstractAttrDef
Throws:
DKException - - DKUsageError: the ImagePlus/390 datastore does not support deleting attributes from entity definitions.
java.lang.Exception - if an error occurs in the java classes.

EIP Java APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.