com.ibm.mm.sdk.common
Class dkAbstractAttrDef
- java.lang.Object
-
- com.ibm.mm.sdk.common.dkAbstractAttrDef
-
- All Implemented Interfaces:
- dkAttrDef, java.io.Serializable
- Direct Known Subclasses:
- DKAttrDefICM
public abstract class dkAbstractAttrDef extends java.lang.Object implements dkAttrDef, java.io.Serializable
Abstract base implementation of thedkAttrDefinterface.This class provides a concrete implementation of attribute definition functionality, storing attribute metadata such as name, type, nullability, and cardinality constraints. It serves as a base class for specific attribute definition implementations.
Key Features:
- Serializable for distributed operations
- Default nullable behavior (attributes are nullable by default)
- Complete implementation of dkAttrDef interface
- String representation for debugging
- See Also:
dkAttrDef,DKAttrDefICM,DKConstant, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description protected java.lang.Stringdescriptionprotected intmaxprotected intminprotected java.lang.Stringnameprotected booleannullableprotected shorttype
-
Constructor Summary
Constructors Constructor and Description dkAbstractAttrDef()Constructs a new attribute definition with default settings.dkAbstractAttrDef(java.lang.String name)Constructs a new attribute definition with the specified name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetDescription()Gets the description of this attribute definition.intgetMax()Gets the maximum cardinality (maximum number of values) for this attribute.intgetMin()Gets the minimum cardinality (minimum number of values) for this attribute.java.lang.StringgetName()Gets the name of this attribute definition.shortgetType()Gets the data type of this attribute.booleanisNullable()Checks if this attribute allows null values.voidsetDescription(java.lang.String description)Sets the description of this attribute definition.voidsetMax(int max)Sets the maximum cardinality (maximum number of values) for this attribute.voidsetMin(int min)Sets the minimum cardinality (minimum number of values) for this attribute.voidsetName(java.lang.String name)Sets the name of this attribute definition.voidsetNullable(boolean nullable)Sets whether this attribute allows null values.voidsetType(short type)Sets the data type of this attribute.java.lang.StringtoString()Returns a string representation of this attribute definition.
-
-
-
Field Detail
-
name
protected java.lang.String name
-
description
protected java.lang.String description
-
type
protected short type
-
nullable
protected boolean nullable
-
min
protected int min
-
max
protected int max
-
-
Constructor Detail
-
dkAbstractAttrDef
public dkAbstractAttrDef()
Constructs a new attribute definition with default settings. Attributes are nullable by default.
-
dkAbstractAttrDef
public dkAbstractAttrDef(java.lang.String name)
Constructs a new attribute definition with the specified name. Attributes are nullable by default.- Parameters:
name- the attribute name
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the name of this attribute definition.
-
setName
public void setName(java.lang.String name)
Sets the name of this attribute definition.
-
getDescription
public java.lang.String getDescription()
Gets the description of this attribute definition.- Specified by:
getDescriptionin interfacedkAttrDef- Returns:
- the attribute description
-
setDescription
public void setDescription(java.lang.String description)
Sets the description of this attribute definition.- Specified by:
setDescriptionin interfacedkAttrDef- Parameters:
description- a human-readable description of the attribute
-
getType
public short getType()
Gets the data type of this attribute.- Specified by:
getTypein interfacedkAttrDef- Returns:
- the attribute type constant (e.g., DKConstant.DK_CM_STRING)
- See Also:
DKConstant
-
setType
public void setType(short type)
Sets the data type of this attribute.- Specified by:
setTypein interfacedkAttrDef- Parameters:
type- the attribute type constant (e.g., DKConstant.DK_CM_STRING)- See Also:
DKConstant
-
isNullable
public boolean isNullable()
Checks if this attribute allows null values.- Specified by:
isNullablein interfacedkAttrDef- Returns:
- true if null values are allowed, false otherwise
-
setNullable
public void setNullable(boolean nullable)
Sets whether this attribute allows null values.- Specified by:
setNullablein interfacedkAttrDef- Parameters:
nullable- true to allow null values, false to require a value
-
getMin
public int getMin()
Gets the minimum cardinality (minimum number of values) for this attribute. For single-valued attributes, this is typically 0 or 1.
-
setMin
public void setMin(int min)
Sets the minimum cardinality (minimum number of values) for this attribute.
-
getMax
public int getMax()
Gets the maximum cardinality (maximum number of values) for this attribute. For single-valued attributes, this is typically 1. Use -1 or Integer.MAX_VALUE for unbounded multi-valued attributes.
-
setMax
public void setMax(int max)
Sets the maximum cardinality (maximum number of values) for this attribute.
-
toString
public java.lang.String toString()
Returns a string representation of this attribute definition.- Overrides:
toStringin classjava.lang.Object- Returns:
- string representation including name, description, type, and nullable status
-
-