com.bmc.cmdb.api
Class CMDBIndex

java.lang.Object
  extended by com.bmc.cmdb.api.CMDBIndex

public class CMDBIndex
extends java.lang.Object

The CMDBIndex class defines the index of an CMDBClass object.


Field Summary
static int AR_MAX_INDEX_ATTRIBUTES
           
 
Constructor Summary
CMDBIndex(java.lang.String indexName)
          Creates a class index with minimal information.
CMDBIndex(java.lang.String indexName, boolean unique, boolean isPrimaryKey, java.lang.String[] attributeNames)
          Creates a class index with the provided information.
 
Method Summary
 java.lang.String[] getAttributeNames()
          Gets the names of all indexed attributes.
 java.lang.String getIndexName()
          Gets the name of the index.
 boolean isPrimaryKey()
          Gets if the index is a primary key.
 boolean isUnique()
          Gets if the index is a unique index.
 void setAttributeNames(java.lang.String[] attributeNames)
          Sets the names of all indexed attributes.
 void setIndexName(java.lang.String indexName)
          Sets the name of the index.
 void setPrimaryKey(boolean primaryKey)
          Sets the index as a primaryKey.
 void setUnique(boolean unique)
          Sets the uniqueness of the index.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AR_MAX_INDEX_ATTRIBUTES

public static final int AR_MAX_INDEX_ATTRIBUTES
See Also:
Constant Field Values
Constructor Detail

CMDBIndex

public CMDBIndex(java.lang.String indexName)
Creates a class index with minimal information.

Parameters:
indexName - the name of the index

CMDBIndex

public CMDBIndex(java.lang.String indexName,
                 boolean unique,
                 boolean isPrimaryKey,
                 java.lang.String[] attributeNames)
Creates a class index with the provided information.

Parameters:
indexName - the name of the index
unique - specifies if this is a unique index
isPrimaryKey - Specifies if this index is a primary key. If the value is TRUE, attributes in this index comprise the primary key of the object.
attributeNames - names of all indexed attributes
Throws:
java.lang.IllegalArgumentException - if the length of index name is longer than Constants.AR_MAX_NAME_SIZE
java.lang.IllegalArgumentException - if the number of attributes in the index is more than AR_MAX_INDEX_ATTRIBUTES
Method Detail

getIndexName

public java.lang.String getIndexName()
Gets the name of the index.

Returns:
the name of the index

isUnique

public boolean isUnique()
Gets if the index is a unique index.

Returns:
uniqueness of the index

isPrimaryKey

public boolean isPrimaryKey()
Gets if the index is a primary key. If the index is a primary key index, attributes in this index comprise the primary key of the object.

Returns:
if it is a primary key

getAttributeNames

public java.lang.String[] getAttributeNames()
Gets the names of all indexed attributes.

Returns:
the names of all indexed attributes

setIndexName

public void setIndexName(java.lang.String indexName)
Sets the name of the index.

Parameters:
indexName - the name of the index

setUnique

public void setUnique(boolean unique)
Sets the uniqueness of the index.

Parameters:
unique - uniqueness of the index

setPrimaryKey

public void setPrimaryKey(boolean primaryKey)
Sets the index as a primaryKey.

Parameters:
primaryKey - the index is a primary Key

setAttributeNames

public void setAttributeNames(java.lang.String[] attributeNames)
Sets the names of all indexed attributes.

Parameters:
attributeNames - the names of all indexed attributes


(c) Copyright 2004-2007 BMC Software, Inc.