Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class dkAbstractAttrDef

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.dkAbstractAttrDef
All Implemented Interfaces:
dkAttrDef, DKMessageId, java.io.Serializable
Direct Known Subclasses:
DKAttrDefDD, DKAttrDefDL, DKAttrDefFed, DKAttrDefIC, DKAttrDefICM, DKAttrDefIP, DKAttrDefV4, DKAttrInventoryDefFed, DKAttrMapDef, DKColumnDefDB2, DKColumnDefDJ, DKColumnDefJDBC, DKFeatureDefQBIC, DKFieldDefDES, DKFieldDefOD

public class dkAbstractAttrDef
extends java.lang.Object
implements dkAttrDef, DKMessageId, java.io.Serializable

This class defines methods to access attribute information.

See Also:
Serialized Form

Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
dkAbstractAttrDef()
          Constructs a new dkAbstractAttrDef class without owner datastore object.
dkAbstractAttrDef(dkDatastore ds)
          Constructs a new dkAbstractAttrDef class with owner datastore object
 
Method Summary
 void add()
          Adds this attribute to become a persistent part of the entity meta-data it belongs to.
 java.lang.String datastoreName()
          Gets the name of this datastore object.
 java.lang.String datastoreType()
          Gets the type for this datastore object
 void del()
          Removes this attribute from the persistent part of the entity meta-data it belongs to.
 dkDatastore getDatastore()
          Gets the reference to the owner datastore object
 java.lang.String getDescription()
          Gets the attribute description
 dkEntityDef getEntity()
          Gets the entity definition object that this attribute is belong to
 java.lang.String getEntityName()
          Gets the parent entity name: index class, table, etc.
 int getMax()
          Gets maximum value for this attribute
 int getMin()
          Gets the minimum value for this attribute
 java.lang.String getName()
          Gets this attribute name
 int getPrecision()
          Gets precision value for this attribute
 java.lang.String getQualifiedName()
          Gets this attribute qualified name.
 int getScale()
          Gets scale value of this attribute if its type is decimal.
 int getSize()
          Gets the display size for this attribute (applicable for String only)
 int getStringType()
          Gets the string type value for this attribute
 short getType()
          Gets type of this attribute
 boolean isNullable()
          Checks if this attribute is nullable.
 boolean isQueryable()
          Checks if this attribute is queryable.
 boolean isTextSearchable()
          Checks if this attribute is text searchable.
 boolean isUpdatable()
          Checks if this attribute is updatable.
 java.lang.String[] parsedQualifiedName(java.lang.String qualifiedName)
          Parses the attribute qualified name.
 void setDatastore(dkDatastore ds)
          Sets the reference to the owner datastore object
 void setDescription(java.lang.String desc)
          Sets the attribute description
 void setEntity(dkEntityDef entityObj)
          Sets the entity meta data object for this attribute
 void setEntityName(java.lang.String entityName)
          Sets the parent entity name
 void setMax(int maxValue)
          Sets the maximum value for this attribute
 void setMin(int minValue)
          Sets the minimum value for this attribute
 void setName(java.lang.String attrName)
          Sets name for this attribute
 void setNullable(boolean nullable)
          Sets whether null value is allowed for this attribute.
 void setPrecision(int precision)
          Sets precision value if this attribute type is decimal
 void setQualifiedName(java.lang.String qualifiedName)
          Sets this attribute qualified name.
 void setQueryable(boolean queryable)
          Sets the queryability of this attribute.
 void setScale(int scale)
          Sets the scale value for this attribute if it's of type decimal
 void setSize(int displaySize)
          Sets the display size for this attribute (applicable for String only)
 void setStringType(int stringType)
          Sets the string type value for this attribute
 void setTextSearchable(boolean textSearchable)
          Sets the text search ability of this attribute.
 void setType(short attrType)
          Sets the type for this attribute
 void setUpdatable(boolean updatable)
          Sets the updatability of this attribute.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

dkAbstractAttrDef

public dkAbstractAttrDef()
Constructs a new dkAbstractAttrDef class without owner datastore object.

dkAbstractAttrDef

public dkAbstractAttrDef(dkDatastore ds)
Constructs a new dkAbstractAttrDef class with owner datastore object
Parameters:
ds - reference to owner datastore object
Method Detail

setDatastore

public void setDatastore(dkDatastore ds)
Sets the reference to the owner datastore object
Specified by:
setDatastore in interface dkAttrDef
Following copied from interface: com.ibm.mm.sdk.common.dkAttrDef
Parameters:
ds - datastore

getDatastore

public dkDatastore getDatastore()
Gets the reference to the owner datastore object
Specified by:
getDatastore in interface dkAttrDef
Returns:
the dkDatastore object

getEntity

public dkEntityDef getEntity()
Gets the entity definition object that this attribute is belong to
Specified by:
getEntity in interface dkAttrDef
Returns:
a dkEntityDef object contain meta data for the entity

setEntity

public void setEntity(dkEntityDef entityObj)
Sets the entity meta data object for this attribute
Specified by:
setEntity in interface dkAttrDef
Parameters:
entityObj - dkEntityDef object

datastoreName

public java.lang.String datastoreName()
                               throws java.lang.Exception
Gets the name of this datastore object.
Specified by:
datastoreName in interface dkAttrDef
Returns:
datastore name

datastoreType

public java.lang.String datastoreType()
                               throws DKException,
                                      java.lang.Exception
Gets the type for this datastore object
Specified by:
datastoreType in interface dkAttrDef
Returns:
datastore type

getEntityName

public java.lang.String getEntityName()
Gets the parent entity name: index class, table, etc.
Specified by:
getEntityName in interface dkAttrDef
Returns:
name of parent entity

setEntityName

public void setEntityName(java.lang.String entityName)
Sets the parent entity name
Specified by:
setEntityName in interface dkAttrDef
Parameters:
entityName - parent entity name

getName

public java.lang.String getName()
Gets this attribute name
Specified by:
getName in interface dkAttrDef
Returns:
name of this attribute

setName

public void setName(java.lang.String attrName)
Sets name for this attribute
Specified by:
setName in interface dkAttrDef
Parameters:
attrName - new name for this attribute

getDescription

public java.lang.String getDescription()
Gets the attribute description
Specified by:
getDescription in interface dkAttrDef
Returns:
attribute description

setDescription

public void setDescription(java.lang.String desc)
Sets the attribute description
Specified by:
setDescription in interface dkAttrDef
Parameters:
desc - attribute description

getType

public short getType()
Gets type of this attribute
Specified by:
getType in interface dkAttrDef
Returns:
attribute type

setType

public void setType(short attrType)
Sets the type for this attribute
Specified by:
setType in interface dkAttrDef
Parameters:
attrType - new attribute type

getSize

public int getSize()
Gets the display size for this attribute (applicable for String only)
Specified by:
getSize in interface dkAttrDef
Returns:
display size

setSize

public void setSize(int displaySize)
Sets the display size for this attribute (applicable for String only)
Specified by:
setSize in interface dkAttrDef
Parameters:
displaySize - new display size to be set.

isNullable

public boolean isNullable()
Checks if this attribute is nullable. Default is true.
Specified by:
isNullable in interface dkAttrDef
Returns:
true if this attribute is nullable, false otherwise

setNullable

public void setNullable(boolean nullable)
Sets whether null value is allowed for this attribute.
Specified by:
setNullable in interface dkAttrDef
Parameters:
nullable - true if null value is allowed, false otherwise

getPrecision

public int getPrecision()
Gets precision value for this attribute
Specified by:
getPrecision in interface dkAttrDef
Returns:
precision value

setPrecision

public void setPrecision(int precision)
Sets precision value if this attribute type is decimal
Specified by:
setPrecision in interface dkAttrDef
Parameters:
precision - maximum value for short or long

getScale

public int getScale()
Gets scale value of this attribute if its type is decimal.
Specified by:
getScale in interface dkAttrDef
Returns:
minimum value for short/long

setScale

public void setScale(int scale)
Sets the scale value for this attribute if it's of type decimal
Specified by:
setScale in interface dkAttrDef
Parameters:
scale - the minimum value for short/long

getMax

public int getMax()
Gets maximum value for this attribute
Specified by:
getMax in interface dkAttrDef
Returns:
maximum value

setMax

public void setMax(int maxValue)
Sets the maximum value for this attribute
Specified by:
setMax in interface dkAttrDef
Parameters:
maxValue - the valid upper value for this attribute

getMin

public int getMin()
Gets the minimum value for this attribute
Specified by:
getMin in interface dkAttrDef
Returns:
the valid lower bound for this attribute

setMin

public void setMin(int minValue)
Sets the minimum value for this attribute
Specified by:
setMin in interface dkAttrDef
Parameters:
minValue - the valid lower bound for this attribute

getStringType

public int getStringType()
Gets the string type value for this attribute
Specified by:
getStringType in interface dkAttrDef
Returns:
the string type for this attribute, either numeric, alphabetic, alpanumeric, etc. The valid value is one of the following constants :
  • DK_ATTR_NONE: the string type is undefined
  • DK_ATTR_ALPHA: the string contains alphabetic characters only
  • DK_ATTR_ALPHANUM: the string contains alpha-numeric characters
  • DK_ATTR_ALPHANUM_EXT: the string contains alpha-numeric and other special characters
  • DK_ATTR_NUMERIC: the string only contains numeric characters
  • DK_ATTR_OTHER: the string may follows application defined rules and the interpretation is left to the application

setStringType

public void setStringType(int stringType)
Sets the string type value for this attribute
Specified by:
setStringType in interface dkAttrDef
Parameters:
stringType - the string type for this attribute

isUpdatable

public boolean isUpdatable()
Checks if this attribute is updatable.
Specified by:
isUpdatable in interface dkAttrDef
Returns:
true if this attribute is updatable, false otherwise

setUpdatable

public void setUpdatable(boolean updatable)
Sets the updatability of this attribute.
Specified by:
setUpdatable in interface dkAttrDef
Parameters:
updatable - true if updatable value, false otherwise

isQueryable

public boolean isQueryable()
Checks if this attribute is queryable. Default value is true.
Specified by:
isQueryable in interface dkAttrDef
Returns:
true if this attribute is queryable, false otherwise

setQueryable

public void setQueryable(boolean queryable)
Sets the queryability of this attribute.
Specified by:
setQueryable in interface dkAttrDef
Parameters:
queryable - true if queryable value, false otherwise

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:DKUsageError exception thrown if method is not implemented

Specified by:
add in interface dkAttrDef

del

public void del()
         throws DKException,
                java.lang.Exception
Removes this attribute from the persistent part of the entity meta-data it belongs to. The in memory copy of this attribute does not change. Sub class needs to implement this method.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
del in interface dkAttrDef

isTextSearchable

public boolean isTextSearchable()
Checks if this attribute is text searchable.
Specified by:
isTextSearchable in interface dkAttrDef
Returns:
true if this attribute is text searchable, false otherwise

setTextSearchable

public void setTextSearchable(boolean textSearchable)
Sets the text search ability of this attribute.
Specified by:
setTextSearchable in interface dkAttrDef
Parameters:
textSearchable - true if text searchable value, false otherwise

getQualifiedName

public java.lang.String getQualifiedName()
                                  throws DKException,
                                         java.lang.Exception
Gets this attribute qualified name. If connector supports hierarchies the qualified name will be the path thru the hierachy including the attribute name. By default this method calls the getName() method on the attribute defintion.
Specified by:
getQualifiedName in interface dkAttrDef
Returns:
qualified name of this attribute

setQualifiedName

public void setQualifiedName(java.lang.String qualifiedName)
                      throws DKException,
                             java.lang.Exception
Sets this attribute qualified name. If connector supports hierarchies the qualified name will be the path thru the hierachy including the attribute name. By default this method calls the getName() method on the attribute defintion.
Specified by:
setQualifiedName in interface dkAttrDef
Returns:
qualified name of this attribute

parsedQualifiedName

public java.lang.String[] parsedQualifiedName(java.lang.String qualifiedName)
                                       throws DKException,
                                              java.lang.Exception
Parses the attribute qualified name. If connector supports hierarchies the elements of the qualified name and path thru the hierachy will become elements of the returned array.
Specified by:
parsedQualifiedName in interface dkAttrDef
Parameters:
qualifiedName - the attribute qualified name
Returns:
qualified path and name elements

EIP Java APIs

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