|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bmc.cmdb.api.CMDBClass
com.bmc.cmdb.api.CMDBRelationship
public class CMDBRelationship
The CMDBRelationship
class allows you to define a relationship class
in BMC Atrium CMDB. CMDBClassNameKey, which is passed
as a parameter for this class, holds the name of the relationship class and
the namespace within which you want to define the class. You can define
the relationship using an attribute map object to specify the attributes,
and you can specify the relationship cardinality, role names, and relationship
class names.
After you define the relationship class, you can perform a query against it
and update the attributes.
Field Summary | |
---|---|
static int |
CMDB_CLASS_RELATIONSHIP_CARDINALITY_1_1
Specifies that the cardinality is one-to-one, which means that this instance of the relationship class can exist between one instance of the source class and one instance of the destination class. |
static int |
CMDB_CLASS_RELATIONSHIP_CARDINALITY_1_MANY
Specifies that the cardinality is one-to-many, which means that this instance of the relationship class can exist between one instance of the source class and multiple instances of the destination class. |
static int |
CMDB_CLASS_RELATIONSHIP_CARDINALITY_MANY_1
Specifies that the cardinality is many-to-one, which means that this instance of the relationship class can exist between multiple instances of the source class and one instance of the destination class. |
static int |
CMDB_CLASS_RELATIONSHIP_CARDINALITY_MANY_MANY
Specifies that the cardinality is many-to-many, which means that this instance of the relationship class can exist between multiple instances of the source class and multiple instances of the destination class. |
static int |
CMDB_CLASS_RELATIONSHIP_CARDINALITY_NONE
Specifies that the cardinality is none. |
Constructor Summary | |
---|---|
CMDBRelationship(CMDBClassNameKey aNameKey,
CMDBClassNameKey aSuperClassKey,
java.util.Map newAttributeMap,
CMDBIndex[] indexArray,
java.lang.String[] newRoleNames,
CMDBClassNameKey[] newRelClassNames,
int aCardinality,
boolean aWeakReference,
CMDBWeakPropagatedAttrs[] aWeakAttrArray,
boolean aCascadeDelete)
Creates a relationship instance with the specified class name and namespace, attributes, relationship role names, relationship class names, relationship cardinality, propagated attribute information, and cascading delete option. |
|
CMDBRelationship(CMDBClassNameKey relClassKey,
CMDBClassNameKey aSuperClassKey,
java.lang.String[] newRoleNames,
CMDBClassNameKey[] newRelClassNames)
Defines a relationship class with the class name and namespace information specified in the CMDBClassNameKey parameter, the relationship role names specified in the newRoleNames parameter, and the relationship class names specified in the newRelClassNames parameter. |
|
CMDBRelationship(CMDBClassNameKey relClassKey,
java.lang.String classId,
CMDBClassNameKey aSuperClassKey,
java.lang.String[] newRoleNames,
CMDBClassNameKey[] newRelClassNames)
Defines a relationship instance with the class name and namespace information specified in the CMDBClassNameKey parameter, the relationship role names specified in the newRoleNames parameter, and the relationship class names specified in the newRelClassNames parameter. |
Method Summary | |
---|---|
int |
getCardinality()
Gets the cardinality of the relationship. |
CMDBClassNameKey[] |
getRelationClassNames()
Gets the list of class names to which the source member and destination member belong. |
java.lang.String[] |
getRoleNames()
Gets a list of the names of the source and destination members of the relationship. |
CMDBWeakPropagatedAttrs[] |
getWeakPropagatedAttrs()
Gets a list of the propagated attributes of the weak relationship. |
boolean |
isCascadeDelete()
Tells if the relationship supports cascading deletion. |
boolean |
isRole2WeakReference()
Tells if role two is a weak reference. |
void |
setCardinality(int cardinality)
Sets the cardinality attribute of the CMDBRelationship object. |
void |
setCascadeDelete(boolean newCascadeDelete)
Sets the cascading delete attribute of the CMDBRelationship object. |
void |
setRole2WeakReference(boolean newWeakReference)
Sets the role 2 instance to be a weak reference. |
void |
setWeakPropagatedAttrs(CMDBWeakPropagatedAttrs[] newWeakAttrArray)
Sets the propagated attributes of the weak relationship object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CMDB_CLASS_RELATIONSHIP_CARDINALITY_NONE
public static final int CMDB_CLASS_RELATIONSHIP_CARDINALITY_1_1
public static final int CMDB_CLASS_RELATIONSHIP_CARDINALITY_MANY_1
public static final int CMDB_CLASS_RELATIONSHIP_CARDINALITY_1_MANY
public static final int CMDB_CLASS_RELATIONSHIP_CARDINALITY_MANY_MANY
Constructor Detail |
---|
public CMDBRelationship(CMDBClassNameKey relClassKey, CMDBClassNameKey aSuperClassKey, java.lang.String[] newRoleNames, CMDBClassNameKey[] newRelClassNames)
relClassKey
- relationship class keyaSuperClassKey
- class key of the super class to which the
relationship class is associatednewRoleNames
- names of the roles of the relationship. The
role names are for the source and destination members of the relationship.
BMC Atrium CMDB prepends these role names to the attributes of a
relationship class that pertain to its members. For example, on any
common data model (CDM) relationship class, the attributes that hold
the class IDs of its member CIs are named Source.ClassId
and Destination.ClassIdnewRelClassNames
- names of the classes that are involved
in the relationship
java.lang.IllegalArgumentException
- if the length of any role
names are longer than
Constants.AR_MAX_NAME_SIZE
public CMDBRelationship(CMDBClassNameKey relClassKey, java.lang.String classId, CMDBClassNameKey aSuperClassKey, java.lang.String[] newRoleNames, CMDBClassNameKey[] newRelClassNames)
relClassKey
- relationship class keyclassId
- ID of the relationship classaSuperClassKey
- class key of the super class to which the
relationship class is associatednewRoleNames
- names of the roles of the relationship.
The role names are for the source and destination members of the relationship.
BMC Atrium CMDB prepends these role names to the attributes of a
relationship class that pertain to its members. For example, on any
Common Data Model (CDM) relationship class, the attributes that hold
the class IDs of its member CIs are named
Source.ClassId and Destination.ClassId.newRelClassNames
- the names of the classes that are involved
in the relationship
java.lang.IllegalArgumentException
- if the length of any role
names are longer than
Constants.AR_MAX_NAME_SIZE
public CMDBRelationship(CMDBClassNameKey aNameKey, CMDBClassNameKey aSuperClassKey, java.util.Map newAttributeMap, CMDBIndex[] indexArray, java.lang.String[] newRoleNames, CMDBClassNameKey[] newRelClassNames, int aCardinality, boolean aWeakReference, CMDBWeakPropagatedAttrs[] aWeakAttrArray, boolean aCascadeDelete)
aNameKey
- name Key of CMDBclass objectaSuperClassKey
- name key of the super CMDBclassnewAttributeMap
- attributes of the relationship. The attributes
are organized as a map that uses the attribute name as
its map key and CMDBAttribute as its mapped value.newRoleNames
- the names of the roles of the relationship.
The role names are for the source and destination members
of the relationship. BMC Atrium CMDB prepends these
role names to the attributes of a relationship class that pertain
to its members. For example, on any CDM relationship class,
the attributes that hold the class IDs of its member CIs
are named Source.ClassId and Destination.ClassIdnewRelClassNames
- the names of the classes that are involved
in the relationshipaCardinality
- the cardinality of the relationshipaWeakReference
- if role two is a weak referenceaWeakAttrArray
- a propagated attribute array for the weak relationshipaCascadeDelete
- if the relationship supports cascading deletion
java.lang.IllegalArgumentException
- if the length of any role
names is longer than
Constants.AR_MAX_NAME_SIZE
Method Detail |
---|
public java.lang.String[] getRoleNames()
public CMDBClassNameKey[] getRelationClassNames()
public int getCardinality()
public boolean isRole2WeakReference()
public CMDBWeakPropagatedAttrs[] getWeakPropagatedAttrs()
public boolean isCascadeDelete()
public void setRole2WeakReference(boolean newWeakReference)
newWeakReference
- the weak reference property to be setpublic void setWeakPropagatedAttrs(CMDBWeakPropagatedAttrs[] newWeakAttrArray)
newWeakAttrArray
- the new weak attributes of the weak relationshippublic void setCascadeDelete(boolean newCascadeDelete)
newCascadeDelete
- the cascading delete property to be setpublic void setCardinality(int cardinality)
cardinality
- the cardinality property to be set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |