Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Interface dkAttrDef

All Known Implementing Classes:
dkAbstractAttrDef, DKAttrDefDD

public interface dkAttrDef

This class defines methods to access attribute information as well as to create and delete attributes


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)
          Gets the attribute qualified name path.
 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 type of this attribute
 void setUpdatable(boolean updatable)
          Sets the updatability of this attribute.
 

Method Detail

setDatastore

public void setDatastore(dkDatastore ds)
Sets the reference to the owner datastore object
Parameters:
ds - datastore

getDatastore

public dkDatastore getDatastore()
Gets the reference to the owner datastore object
Returns:
the dkDatastore object

getEntity

public dkEntityDef getEntity()
Gets the entity definition object that this attribute is belong to
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
Parameters:
entityObj - dkEntityDef object

datastoreName

public java.lang.String datastoreName()
                               throws java.lang.Exception
Gets the name of this datastore object.
Returns:
datastore name

datastoreType

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

getEntityName

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

setEntityName

public void setEntityName(java.lang.String entityName)
Sets the parent entity name
Parameters:
entityName - parent entity name

getName

public java.lang.String getName()
Gets this attribute name
Returns:
name of this attribute

setName

public void setName(java.lang.String attrName)
Sets name for this attribute
Parameters:
attrName - new name for this attribute

getDescription

public java.lang.String getDescription()
Gets the attribute description
Returns:
attribute description

setDescription

public void setDescription(java.lang.String desc)
Sets the attribute description
Parameters:
desc - attribute description

getType

public short getType()
Gets type of this attribute
Returns:
attribute type

setType

public void setType(short attrType)
Sets type of this attribute
Parameters:
attrType - attribute type

getSize

public int getSize()
Gets the display size for this attribute (applicable for String only)
Returns:
display size

setSize

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

isNullable

public boolean isNullable()
Checks if this attribute is nullable.
Returns:
true if this attribute is nullable, false otherwise

setNullable

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

getPrecision

public int getPrecision()
Gets precision value for this attribute
Returns:
precision value

setPrecision

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

getScale

public int getScale()
Gets scale value of this attribute if its type is decimal.
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
Parameters:
scale - the minimum value for short/long

getMax

public int getMax()
Gets maximum value for this attribute
Returns:
maximum value

setMax

public void setMax(int maxValue)
Sets the maximum value for this attribute
Parameters:
maxValue - the valid upper value for this attribute

getMin

public int getMin()
Gets the minimum value for this attribute
Returns:
the valid lower bound for this attribute

setMin

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

getStringType

public int getStringType()
Gets the string type value for this attribute
Returns:
the string type for this attribute

setStringType

public void setStringType(int stringType)
Sets the string type value for this attribute
Parameters:
stringType - the string type for this attribute

isUpdatable

public boolean isUpdatable()
Checks if this attribute is updatable.
Returns:
true if this attribute is updatable, false otherwise

setUpdatable

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

isQueryable

public boolean isQueryable()
Checks if this attribute is queryable.
Returns:
true if this attribute is queryable, false otherwise

setQueryable

public void setQueryable(boolean queryable)
Sets the queryability of this attribute.
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


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.

Note:DKUsageError exception thrown if method is not implemented


isTextSearchable

public boolean isTextSearchable()
Checks if this attribute is text searchable.
Returns:
true if this attribute is text searchable, false otherwise

setTextSearchable

public void setTextSearchable(boolean textSearchable)
Sets the text search ability of this attribute.
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.
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 setName() method on the attribute defintion.
Parameters:
qualifiedName - qualified name of this attribute

parsedQualifiedName

public java.lang.String[] parsedQualifiedName(java.lang.String qualifiedName)
                                       throws DKException,
                                              java.lang.Exception
Gets the attribute qualified name path. If connector supports hierarchies the elements of the qualified name and path thru the hierachy will become elements of the returned array.
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.