|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bmc.cmdb.api.CMDBInstanceBase
public class CMDBInstanceBase
The CMDBInstance
class allows you to work with an instance of
a CI or relationship class in BMC Atrium CMDB.
CMDBClassNameKey, which is passed as a parameter for this class, holds the
namespace and classname from which you want to create the instance.
You can also pass the attribute values in an attribute map object to
create the instance with the specified details.
After you create the instance, you can search for specific attributes,
update the attributes, and delete the instance.
Field Summary | |
---|---|
static int |
CMDB_ATTACHMENT_LOCATION_BUFFER
Deprecated. Specifies that the returned attachment is stored in a data buffer. |
static int |
CMDB_ATTACHMENT_LOCATION_FILE
Deprecated. Specifies that the returned attachment is stored in a file. |
static int |
CMDB_ATTACHMENT_LOCATION_NONE
Deprecated. Specifies that no attachment is stored. |
static int |
CMDB_DATASET_ACCESSIBILITY_READ_ONLY
Deprecated. Specifies that the dataset value is read-only and cannot be accessed or modified. |
static int |
CMDB_DATASET_ACCESSIBILITY_WRITABLE
Deprecated. Specifies that the dataset is writable. |
static int |
CMDB_DATASET_ACCESSIBLITY_WRITABLE_BY_CLIENT_TYPE
Deprecated. Specifies that the dataset value can be accessed or modified by certain client types. |
static int |
CMDB_DATASET_TYPE_OVERLAY
Deprecated. Specifies that the dataset is an overlay dataset, which overlays a regular dataset. |
static int |
CMDB_DATASET_TYPE_REGULAR
Deprecated. Specifies that the dataset is a regular dataset that underlies the overlay dataset. |
static int |
CMDB_GET_DATASET_MODE_CURRENT
Deprecated. Specifies that you can retrieve an instance from the current dataset only. |
static int |
CMDB_GET_MASK_NONE
Deprecated. Specifies that you can retrieve an instance from the overlay dataset only. |
static int |
CMDB_NO_MAX_LIST_RETRIEVE
Deprecated. Specifies that you can retrieve the maximum number of entries that match the criteria. |
static int |
CMDB_START_WITH_FIRST_INSTANCE
Deprecated. Specifies that you can retrieve an instance from the result set starting with the first instance. |
Constructor Summary | |
---|---|
CMDBInstanceBase(CMDBClassNameKey aClassKey)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
|
CMDBInstanceBase(CMDBClassNameKey aClassKey,
java.util.Map anAttrValuesMap)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
Method Summary | |
---|---|
void |
create(ARServerUser context)
Deprecated. Creates the instance in BMC Atrium CMDB. |
void |
create(ARServerUser context,
java.lang.String aDatasetId)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static void |
delete(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String instanceId,
int deleteOption)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static void |
delete(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String aDatasetId,
java.lang.String instanceId,
int deleteOption)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static java.lang.String[] |
find(ARServerUser context,
CMDBClassNameKey aClassKey,
QualifierInfo query,
CMDBSort[] sortArray,
int firstRetrieve,
int maxRetrieve,
java.lang.Integer numMatches)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static java.lang.String[] |
find(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String query,
CMDBSort[] sortArray,
int firstRetrieve,
int maxRetrieve,
java.lang.Integer numMatches)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static java.lang.String[] |
find(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String aDatasetId,
int aGetMask,
QualifierInfo query,
CMDBSort[] sortArray,
int firstRetrieve,
int maxRetrieve,
java.lang.Integer numMatches)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static java.lang.String[] |
find(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String aDatasetId,
int aGetMask,
java.lang.String query,
CMDBSort[] sortArray,
int firstRetrieve,
int maxRetrieve,
java.lang.Integer numMatches)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static void |
findBlobByKey(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String aDatasetId,
int aGetMask,
java.lang.String instanceId,
java.lang.String attributeName,
AttachmentValue attachment)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static void |
findBlobByKey(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String instanceId,
java.lang.String attributeName,
AttachmentValue attachment)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static CMDBInstanceBase |
findByKey(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String aDatasetId,
int aGetMask,
java.lang.String instanceId,
java.lang.String[] attributeNames)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static CMDBInstanceBase |
findByKey(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String instanceId,
java.lang.String[] attributeNames)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static CMDBInstanceBase[] |
findObjects(ARServerUser context,
CMDBClassNameKey aClassKey,
QualifierInfo query,
java.lang.String[] attributeGetList,
CMDBSort[] sortArray,
int firstRetrieve,
int maxRetrieve,
java.lang.Integer numMatches)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static CMDBInstanceBase[] |
findObjects(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String[] instanceIds,
java.lang.String[] attributeGetList)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static CMDBInstanceBase[] |
findObjects(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String aDatasetId,
int aGetMask,
QualifierInfo query,
java.lang.String[] attributeGetList,
CMDBSort[] sortArray,
int firstRetrieve,
int maxRetrieve,
java.lang.Integer numMatches)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static CMDBInstanceBase[] |
findObjects(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String aDatasetId,
int aGetMask,
java.lang.String[] instanceIds,
java.lang.String[] attributeGetList)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static CMDBInstanceBase[] |
findObjects(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String aDatasetId,
int aGetMask,
java.lang.String query,
java.lang.String[] attributeGetList,
CMDBSort[] sortArray,
int firstRetrieve,
int maxRetrieve,
java.lang.Integer numMatches)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
static CMDBInstanceBase[] |
findObjects(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String query,
java.lang.String[] attributeGetList,
CMDBSort[] sortArray,
int firstRetrieve,
int maxRetrieve,
java.lang.Integer numMatches)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
CMDBAttributeValue |
getAttributeValueByName(java.lang.String name)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
java.util.Map |
getAttributeValues()
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
CMDBClassNameKey |
getClassKey()
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
int |
getGetMask()
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
java.lang.String |
getId()
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
void |
setAttributeValues(java.util.Map newAttrValueMap)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
void |
update(ARServerUser context)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
void |
update(ARServerUser context,
java.lang.String aDatasetId)
Deprecated. as of CMDB 2.0 and replaced by CMDBInstance. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CMDB_START_WITH_FIRST_INSTANCE
public static final int CMDB_NO_MAX_LIST_RETRIEVE
public static final int CMDB_ATTACHMENT_LOCATION_NONE
public static final int CMDB_ATTACHMENT_LOCATION_FILE
public static final int CMDB_ATTACHMENT_LOCATION_BUFFER
public static final int CMDB_GET_MASK_NONE
public static final int CMDB_GET_DATASET_MODE_CURRENT
public static final int CMDB_DATASET_ACCESSIBILITY_WRITABLE
public static final int CMDB_DATASET_ACCESSIBILITY_READ_ONLY
public static final int CMDB_DATASET_ACCESSIBLITY_WRITABLE_BY_CLIENT_TYPE
public static final int CMDB_DATASET_TYPE_REGULAR
public static final int CMDB_DATASET_TYPE_OVERLAY
Constructor Detail |
---|
public CMDBInstanceBase(CMDBClassNameKey aClassKey)
aClassKey
- the class key of the CMDB Class to which the instance
is associatedpublic CMDBInstanceBase(CMDBClassNameKey aClassKey, java.util.Map anAttrValuesMap)
aClassKey
- the name key of the class to which the instance is
associatedanAttrValuesMap
- the attribute values are organized into a
map that uses the attribute name as its map key, and CMDBAttributeValue
as its mapped value
java.lang.IllegalArgumentException
- if map value is not CMDBAttributeValueMethod Detail |
---|
public CMDBClassNameKey getClassKey()
public java.lang.String getId()
public int getGetMask()
public java.util.Map getAttributeValues()
public CMDBAttributeValue getAttributeValueByName(java.lang.String name)
name
- the name of the attribute
public void setAttributeValues(java.util.Map newAttrValueMap)
newAttrValueMap
- the new attribute values to be set
java.lang.IllegalArgumentException
- if map value is not CMDBAttributeValuepublic void create(ARServerUser context) throws ARException
context
- ARServerUser structure that contains AR System user
and host information
ARException
- if the instance cannot be created in AR Systempublic void create(ARServerUser context, java.lang.String aDatasetId) throws ARException
context
- ARServerUser structure that contains AR System user
and host informationaDatasetId
- the name of the dataset to which the instance is associated
ARException
- if the instance cannot be created in AR Systempublic void update(ARServerUser context) throws ARException
context
- ARServerUser structure that contains AR System user
and host information
ARException
- if the instance cannot be updatedpublic void update(ARServerUser context, java.lang.String aDatasetId) throws ARException
context
- ARServerUser structure that contains AR System user
and host informationaDatasetId
- the name of the dataset to which the instance belongs
ARException
- if the instance cannot be updatedpublic static void delete(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String instanceId, int deleteOption) throws ARException
context
- ARServerUser structure that contains AR Server user
and host informationaClassKey
- the name key of the class to which the instance is associatedinstanceId
- the ID of the instance to be deleteddeleteOption
- option for deleting the instance from BMC Atrium CMDB.
Possible values are:
ARException
- if the instance cannot be deletedpublic static void delete(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String aDatasetId, java.lang.String instanceId, int deleteOption) throws ARException
context
- ARServerUser structure that contains AR System user
and host informationaClassKey
- the name key of the class to which the instance belongsaDatasetId
- the dataset to which the instance is associatedinstanceId
- the ID of the instance to be deleteddeleteOption
- option for deleting the instance from BMC Atrium CMDB.
Possible values are:
ARException
- if the instance cannot be deletedpublic static CMDBInstanceBase findByKey(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String instanceId, java.lang.String[] attributeNames) throws ARException
context
- ARServerUser structure that contains AR System user
and host informationaClassKey
- the key of the class to which the instance belongsinstanceId
- the ID of the instance to look forattributeNames
- the list of attributes to retrieve
ARException
- if the specified instance can't be locatedpublic static CMDBInstanceBase findByKey(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String aDatasetId, int aGetMask, java.lang.String instanceId, java.lang.String[] attributeNames) throws ARException
context
- ARServerUser structure that contains AR System user
and host informationaClassKey
- the key of the class to which the instance belongsinstanceId
- the ID of the instance to look foraDatasetId
- the DatasetId of the instanceaGetMask
- the get mask (current or overlay)attributeNames
- the list of attributes to retrieve.
ARException
- if the specified instance can't be locatedpublic static void findBlobByKey(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String instanceId, java.lang.String attributeName, AttachmentValue attachment) throws ARException
ARServerUser
parameter. User permissions are
verified for the specified attribute. If the user cannot access the
attribute, the system returns an error message.
context
- ARSystemUser structure that contains user
and host informationaClassKey
- the key of the class to which the instance belongsinstanceId
- the ID of the instance to look forattributeName
- name of the attribute that has the attachmentattachment
- the location of the returned attachment.
The attachment can be stored in a file
CMDB_ATTACHMENT_LOCATION_FILE
or in a buffer
CMDB_ATTACHMENT_LOCATION_BUFFER
.
If it is stored in a file, then the file name should be specified in this argument.
The returned attachment object is also saved in this object.
ARException
- if the specified attachment can't be located.public static void findBlobByKey(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String aDatasetId, int aGetMask, java.lang.String instanceId, java.lang.String attributeName, AttachmentValue attachment) throws ARException
ARServerUser
parameter. User permissions are
verified for the specified attribute. If the user cannot access the
attribute, the system returns an error message.
context
- ARServerUser structure that contains AR System user
and host informationaClassKey
- the name key of the class to which the instance belongsaDatasetId
- the name of the dataset to which the instance belongsaGetMask
- the dataset type. Based on the dataset ID being passed,
instances are retrieved from the overlay or the original dataset.instanceId
- the ID of the instance to look forattributeName
- name of the attribute that has the attachmentattachment
- the location of the returned attachment.
The attachment can be stored in a file
CMDBInstance.CMDB_ATTACHMENT_LOCATION_FILE
or in a buffer
CMDBInstance.CMDB_ATTACHMENT_LOCATION_BUFFER
.
If it is stored in a file, then the file name should be specified in this argument.
The returned attachment object is also saved in this object.
ARException
- if the specified attachment can't be located.public static java.lang.String[] find(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String query, CMDBSort[] sortArray, int firstRetrieve, int maxRetrieve, java.lang.Integer numMatches) throws ARException
context
- ARServerUser structure that contains AR System user
and host informationaClassKey
- the name key of the class to which the instance belongsquery
- a string where you specify a qualification for retrieving instances.
For example, to locate instances of class BMC:AssetBase, where Cost Center
is "BMC" and Order ID is 5, the qualification will be:
'Cost Center' = "BMC" AND 'Order ID' = 5.
So, the name of the attribute for which you are querying is always
surrounded in single quotes. For each attribute, if the datatype
is string, enclose the string you are looking for in double
quotes (as in the above example, "BMC"). For integers, you
do not need to put any quotes around it.firstRetrieve
- first instance retrieved for the query chunk
CMDBInstance.CMDB_START_WITH_FIRST_INSTANCE
means retrieve the first instance from BMC Atrium CMDB.maxRetrieve
- maximum instances to retrieve for the query.
CMDBInstance.CMDB_NO_MAX_LIST_RETRIEVE
means unlimited instances are retrieved.numMatches
- total number of (accessible) instances
that match the qualification criteria.
Specify null for this parameter if you do not want to retrieve this count.
ARException
- if failed to return all matched instancespublic static java.lang.String[] find(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String aDatasetId, int aGetMask, java.lang.String query, CMDBSort[] sortArray, int firstRetrieve, int maxRetrieve, java.lang.Integer numMatches) throws ARException
context
- ARServerUser structure that contains AR System user
and host informationaClassKey
- the name key of the class to which the instance belongsaDatasetId
- name of the dataset to which the instance belongsaGetMask
- the dataset type. Based on the datasetId being passed,
instances are retrieved from the overlay or the original dataset.query
- a string where you specify a qualification for retrieving instances.
For example, to locate instances of class BMC:AssetBase, where Cost Center
is "BMC" and Order ID is 5, the qualification will be:
'Cost Center' = "BMC" AND 'Order ID' = 5.
So, the name of the attribute you are querying for is always
surrounded in single quotes. For each attribute, if the datatype
is string, enclose the string you are looking for in double
quotes (as in the above example, "BMC"). For integers, you
do not need to put any quotes around it.firstRetrieve
- first instance retrieved for the query chunk
CMDBInstance.CMDB_START_WITH_FIRST_INSTANCE
means retrieve the first instance from AR System.maxRetrieve
- maximum instances to retrieve for the query.
CMDBInstance.CMDB_NO_MAX_LIST_RETRIEVE
means unlimited instances are retrieved.numMatches
- total number of (accessible) instances that match the
qualification.
Specify NULL for this parameter if you do not want to retrieve this count.
ARException
- if failed to return all matched instancespublic static java.lang.String[] find(ARServerUser context, CMDBClassNameKey aClassKey, QualifierInfo query, CMDBSort[] sortArray, int firstRetrieve, int maxRetrieve, java.lang.Integer numMatches) throws ARException
context
- ARServerUser structure that contains AR System user
and host informationaClassKey
- the name key of the class to which the instance belongsquery
- a query object where you specify a qualification for retrieving instancesfirstRetrieve
- first instance retrieved for the query chunk
CMDBInstance.CMDB_START_WITH_FIRST_INSTANCE
means retrieve the first instance from AR System.maxRetrieve
- maximum instances to retrieve for the query.
CMDBInstance.CMDB_NO_MAX_LIST_RETRIEVE
means unlimited instances are retrieved.numMatches
- total number of (accessible) instances that match
the qualification.
Specify NULL for this parameter if you do not want to retrieve this count.
ARException
- if failed to return all matched instancespublic static java.lang.String[] find(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String aDatasetId, int aGetMask, QualifierInfo query, CMDBSort[] sortArray, int firstRetrieve, int maxRetrieve, java.lang.Integer numMatches) throws ARException
context
- ARServerUser structure that contains AR System user
and host informationaClassKey
- the name key of the class to which the instance belongsaDatasetId
- name of the dataset to which the instance belongsaGetMask
- the dataset type. Based on the datasetId being passed,
instances are retrieved from the overlay or the original dataset.query
- a query object where you specify a qualification for retrieving instancesfirstRetrieve
- first instance retrieved for the query chunk
CMDBInstance.CMDB_START_WITH_FIRST_INSTANCE
means retrieve the first instance from AR System.maxRetrieve
- maximum instances to retrieve for the query.
CMDBInstance.CMDB_NO_MAX_LIST_RETRIEVE
means unlimited instances are retrieved.numMatches
- total number of (accessible) instances that match the
qualification criteria. Specify null for this parameter if you do not want
to retrieve this count.
ARException
- if failed to return all matched instancespublic static CMDBInstanceBase[] findObjects(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String query, java.lang.String[] attributeGetList, CMDBSort[] sortArray, int firstRetrieve, int maxRetrieve, java.lang.Integer numMatches) throws ARException
context
- ARServerUser structure that contains AR System user
and host informationaClassKey
- the key of the class that the instance belongs toquery
- a string where you specify a qualification for retrieving instances.
For example, to locate instances of class BMC:AssetBase, where Cost Center
is "BMC" and Order ID is 5, the qualification will be:
'Cost Center' = "BMC" AND 'Order ID' = 5.
So, the name of the attribute you are querying for is always
surrounded in single quotes. For each attribute, if the datatype
is string, enclose the string you are looking for in double
quotes (as in the above example, "BMC"). For integers, you
do not need to put any quotes around it.attributeGetList
- the attribute to be retrieved. If attributeGetList
is NULL, then all attribute values of the instance will be
returned.firstRetrieve
- first instance retrieved for the query chunk
CMDBInstance.CMDB_START_WITH_FIRST_INSTANCE
means retrieve the first instance from AR System.maxRetrieve
- maximum instances to retrieve for the query
CMDBInstance.CMDB_NO_MAX_LIST_RETRIEVE
means unlimited instances are retrieved.numMatches
- the total number of (accessible) instances that match
the qualification criteria.
Specify NULL for this parameter if you do not want to retrieve this count.
ARException
- if failed to return all matched instancespublic static CMDBInstanceBase[] findObjects(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String aDatasetId, int aGetMask, java.lang.String query, java.lang.String[] attributeGetList, CMDBSort[] sortArray, int firstRetrieve, int maxRetrieve, java.lang.Integer numMatches) throws ARException
context
- ARServerUser structure that contains AR System user
and host informationaClassKey
- the key of the class to which the instance belongsaDatasetId
- dataset ID of the instances you want to retrieveaGetMask
- dataset type. Based on the dataset ID being passed, instances are
retrieved from the overlay or the original dataset.query
- a query object where you specify a qualification for
retrieving instancesattributeGetList
- the attribute to be retrieved. If attributeGetList
is NULL, then all attribute values of the instance will be
returned.firstRetrieve
- first instance retrieved for the query chunk
CMDBInstance.CMDB_START_WITH_FIRST_INSTANCE
means retrieve the first instance from AR System.maxRetrieve
- maximum instances to retrieve for the query
CMDBInstance.CMDB_NO_MAX_LIST_RETRIEVE
means unlimited instances are retrieved.numMatches
- total number of (accessible) instances that match the
qualification criteria.
Specify NULL for this parameter if you do not want to retrieve this count.
ARException
- if failed to return all matched instancespublic static CMDBInstanceBase[] findObjects(ARServerUser context, CMDBClassNameKey aClassKey, QualifierInfo query, java.lang.String[] attributeGetList, CMDBSort[] sortArray, int firstRetrieve, int maxRetrieve, java.lang.Integer numMatches) throws ARException
context
- ARServerUser structure that contains AR System user
and host informationaClassKey
- the key of the class that the instance belongs toquery
- a string where you specify a qualification for retrieving instances.
For example, to locate instances of class BMC:AssetBase, where Cost Center
is "BMC" and Order ID is 5, the qualification will be:
'Cost Center' = "BMC" AND 'Order ID' = 5.
So, the name of the attribute you are querying for is always
surrounded in single quotes. For each attribute, if the datatype
is string, enclose the string you are looking for in double
quotes (as in the above example, "BMC"). For integers, you
do not need to put any quotes around it.attributeGetList
- the attribute to be retrieved. If attributeGetList
is NULL, then all attribute values of the instance will be
returned.firstRetrieve
- first instance retrieved for the query chunk
CMDBInstance.CMDB_START_WITH_FIRST_INSTANCE
means retrieve the first instance from AR System.maxRetrieve
- maximum instances to retrieve for the query
CMDBInstance.CMDB_NO_MAX_LIST_RETRIEVE
means unlimited instances are retrieved.numMatches
- the total number of (accessible) instances that match
the qualification criteria.
Specify NULL for this parameter if you do not want to retrieve this count.
ARException
- if failed to return all matched instancespublic static CMDBInstanceBase[] findObjects(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String aDatasetId, int aGetMask, QualifierInfo query, java.lang.String[] attributeGetList, CMDBSort[] sortArray, int firstRetrieve, int maxRetrieve, java.lang.Integer numMatches) throws ARException
context
- ARServerUser structure that contains AR System user
and host informationaClassKey
- the key of the class that the instance belongs toquery
- a string where you specify a qualification for retrieving instances.
For example, to locate instances of class BMC:AssetBase, where Cost Center
is "BMC" and Order ID is 5, the qualification will be:
'Cost Center' = "BMC" AND 'Order ID' = 5.
So, the name of the attribute you are querying for is always
surrounded in single quotes. For each attribute, if the datatype
is string, enclose the string you are looking for in double
quotes (as in the above example, "BMC"). For integers, you
do not need to put any quotes around it.attributeGetList
- the attribute to be retrieved. If attributeGetList
is NULL, then all attribute values of the instance will be
returned.firstRetrieve
- first instance retrieved for the query chunk
CMDBInstance.CMDB_START_WITH_FIRST_INSTANCE
means retrieve the first instance from AR System.maxRetrieve
- maximum instances to retrieve for the query
CMDBInstance.CMDB_NO_MAX_LIST_RETRIEVE
means unlimited instances are retrieved.numMatches
- the total number of (accessible) instances that match
the qualification criteria.
Specify NULL for this parameter if you do not want to retrieve this count.
ARException
- if failed to return all matched instancespublic static CMDBInstanceBase[] findObjects(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String[] instanceIds, java.lang.String[] attributeGetList) throws ARException
context
- ARServerUser structure that contains user
and host informationaClassKey
- the key of the class to which the instance belongsinstanceIds
- an array of instance IDsattributeGetList
- the attribute to be retrieved. If attributeGetList
is NULL, then all attribute values of the instance will be
returned.
ARException
public static CMDBInstanceBase[] findObjects(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String aDatasetId, int aGetMask, java.lang.String[] instanceIds, java.lang.String[] attributeGetList) throws ARException
context
- ARServerUser structure that contains user
and host informationaClassKey
- the key of the class to which the instance belongsaDatasetId
- name of the dataset to which the instance belongsaGetMask
- the dataset type. Based on the dataset ID being passed, instances
are retrieved from the overlay or the original dataset.instanceIds
- an array of instance IDsattributeGetList
- the attribute to be retrieved. If attributeGetList
is NULL, then all attribute values of the instance will be
returned.
ARException
- if failed to return all matched instances
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |