public interface MInstance extends MData
MInstance
by calling the
MDataFactory.newInstance(String)
method. You create
MInstance
from an MTree
by calling the
MDataFactory.newData(MTree)
method.
In contrast to MTree
, MInstance
depends
on a predefined class description. This class description can be
provided in one of two ways:
MClassFactory
. MInstance
always represents an instance of MClassDescription
, that
is, a class description class created by the SDK based on metadata information.Modifier and Type | Method and Description |
---|---|
void |
clear()
Reset the values of all attributes to their default values or null if not available.
|
java.lang.Object |
get(java.lang.String attributeName)
Retrieve the value of the attribute with the specified name.
|
java.lang.Object |
get(java.lang.String attributeName,
boolean flag)
Deprecated.
internal use only - do not document
|
java.lang.Object |
get(java.lang.String attributeName,
java.lang.Object defaultValue)
Retrieve the value of the attribute with the specified name.
|
java.util.Enumeration |
getAttributeNames() |
java.util.Enumeration |
getAttributes()
Return a list of attributes.
|
java.util.Enumeration |
getAttributeValues() |
MTree |
getNullList() |
boolean |
isNullData(java.lang.String attributeName)
Determine whether the value of the named attribute is null.
|
java.lang.Object |
newAttributeData(java.lang.String attributeName)
Deprecated.
|
void |
set(java.lang.String attributeName,
java.lang.Object value)
Assign the specified value to the specified attribute.
|
void |
setNullData(java.lang.String attributeName)
Set the value of the named attribute explicitly to null.
|
java.lang.String |
toXML()
Returns XML representation of this
MInstance . |
void |
unset(java.lang.String attributeName)
Reset the values of the specified attribute to the default value, or null if there is no default.
|
clone, getCategory, getClassDescription, getTrackingInfo, hashCode, serialize, serialize, setTrackingInfo
void set(java.lang.String attributeName, java.lang.Object value) throws MException
set
in interface MData
attributeName
- Name of the attribute in which you want to set the value.value
- Value you want to assign to this object.MException
- If the named attribute is not defined for this instanceMException
- If the given value is not assignable to the attribute
( because of type mismatch )void unset(java.lang.String attributeName) throws MException
This method does nothing if the value was never set.
attributeName
- Name of the attribute in this instance that you want to set to its default value.MException
- If the named attribute is not defined for this instanceclear()
,
set(String, Object)
void clear()
unset(String)
,
setNullData(String)
java.lang.Object get(java.lang.String attributeName) throws MException
get
in interface MData
MException
- if the named attribute is not defined for this instancejava.lang.Object get(java.lang.String attributeName, boolean flag) throws MException
MException
java.lang.Object get(java.lang.String attributeName, java.lang.Object defaultValue)
boolean isNullData(java.lang.String attributeName) throws MException
attributeName
- Name of the attribute in this instance that you want to check.false
if no value has been explicitly set, or if unset(String)
has been called. Return true
only if the null value has been set explicitly.MException
- if the named attribute does not exist in this instance.setNullData(String)
,
"Setting Data to NULL Explicitly, in TIBCO Adapter SDK Programmer's Guide"void setNullData(java.lang.String attributeName) throws MException
Calling this method causes the following:
MInstance
object with the default value.attributeName
- Name of the attribute in this instance that you want to set to null.MException
- if the named attribute does not exist in this instance.clear()
,
set(String, Object)
,
"Setting Data to NULL Explicitly, in TIBCO Adapter SDK Programmer's Guide"java.util.Enumeration getAttributes()
Map.Entry format
,
that is, a name/value pair.java.lang.String toXML() throws MException
MInstance
.MException
java.lang.Object newAttributeData(java.lang.String attributeName) throws MConstructionException
MConstructionException
java.util.Enumeration getAttributeNames()
java.util.Enumeration getAttributeValues()
MTree getNullList() throws MException
MException