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 the dkAttrDef interface.

    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.String description 
      protected int max 
      protected int min 
      protected java.lang.String name 
      protected boolean nullable 
      protected short type 
    • 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.String getDescription()
      Gets the description of this attribute definition.
      int getMax()
      Gets the maximum cardinality (maximum number of values) for this attribute.
      int getMin()
      Gets the minimum cardinality (minimum number of values) for this attribute.
      java.lang.String getName()
      Gets the name of this attribute definition.
      short getType()
      Gets the data type of this attribute.
      boolean isNullable()
      Checks if this attribute allows null values.
      void setDescription(java.lang.String description)
      Sets the description of this attribute definition.
      void setMax(int max)
      Sets the maximum cardinality (maximum number of values) for this attribute.
      void setMin(int min)
      Sets the minimum cardinality (minimum number of values) for this attribute.
      void setName(java.lang.String name)
      Sets the name of this attribute definition.
      void setNullable(boolean nullable)
      Sets whether this attribute allows null values.
      void setType(short type)
      Sets the data type of this attribute.
      java.lang.String toString()
      Returns a string representation of this attribute definition.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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.
        Specified by:
        getName in interface dkAttrDef
        Returns:
        the attribute name
      • setName

        public void setName(java.lang.String name)
        Sets the name of this attribute definition.
        Specified by:
        setName in interface dkAttrDef
        Parameters:
        name - the attribute name to set
      • getDescription

        public java.lang.String getDescription()
        Gets the description of this attribute definition.
        Specified by:
        getDescription in interface dkAttrDef
        Returns:
        the attribute description
      • setDescription

        public void setDescription(java.lang.String description)
        Sets the description of this attribute definition.
        Specified by:
        setDescription in interface dkAttrDef
        Parameters:
        description - a human-readable description of the attribute
      • getType

        public short getType()
        Gets the data type of this attribute.
        Specified by:
        getType in interface dkAttrDef
        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:
        setType in interface dkAttrDef
        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:
        isNullable in interface dkAttrDef
        Returns:
        true if null values are allowed, false otherwise
      • setNullable

        public void setNullable(boolean nullable)
        Sets whether this attribute allows null values.
        Specified by:
        setNullable in interface dkAttrDef
        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.
        Specified by:
        getMin in interface dkAttrDef
        Returns:
        the minimum number of values
      • setMin

        public void setMin(int min)
        Sets the minimum cardinality (minimum number of values) for this attribute.
        Specified by:
        setMin in interface dkAttrDef
        Parameters:
        min - the minimum number of values (0 for optional, 1 for required)
      • 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.
        Specified by:
        getMax in interface dkAttrDef
        Returns:
        the maximum number of values
      • setMax

        public void setMax(int max)
        Sets the maximum cardinality (maximum number of values) for this attribute.
        Specified by:
        setMax in interface dkAttrDef
        Parameters:
        max - the maximum number of values (1 for single-valued, greater than 1 for multi-valued)
      • toString

        public java.lang.String toString()
        Returns a string representation of this attribute definition.
        Overrides:
        toString in class java.lang.Object
        Returns:
        string representation including name, description, type, and nullable status
Copyright © 2024 IBM Corporation

Copyright © 2024 IBM Corporation. All rights reserved.