public class MDefinedInstance extends MBaseData implements MInstance
MDefinedInstance captures info on objects instantiated from MDefinedClassDescription.
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap |
m_attributes |
protected MModeledClassDescription |
m_classDescription |
Constructor and Description |
---|
MDefinedInstance(MClassDescription classDesc)
Constructor
|
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)
Get the value of the named attribute.
|
java.lang.Object |
get(java.lang.String attributeName,
boolean is4easyAccess) |
java.lang.Object |
get(java.lang.String attributeName,
java.lang.Object defValue)
Get the value of the named attribute.
|
java.util.Enumeration |
getAttributeNames() |
java.util.Enumeration |
getAttributes()
Return a list of attributes.
|
java.util.Enumeration |
getAttributeValues() |
int |
getCategory() |
MTree |
getNullList() |
boolean |
isNullData(java.lang.String attributeName)
Check to see if the attribute is null
|
java.lang.Object |
newAttributeData(java.lang.String attrName)
Deprecated.
|
MTree |
serialize()
Serialize this MInstance into an MTree
|
MTree |
serialize(int formatHint)
Serialize this MInstance into an MTree
|
MTree |
serialize(MDataSerializer serializer,
int formatHint)
Serialize with specific serialier this MInstance into an MTree
|
void |
set(java.lang.String attributeName,
java.lang.Object value)
Assign a value to the named attribute
|
void |
setNullData(java.lang.String attributeName)
set the value of the named attribute to null.
|
java.lang.String |
toString()
Return the string representation of the object
|
java.lang.String |
toXML()
Returns XML representation of this
MInstance . |
void |
unset(java.lang.String attributeName)
Reset the value of this attribute to the default value; or null if there is no
default.
|
clone, getClassDescription, getTrackingInfo, hashCode, isAssignable, setTrackingInfo
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
clone, getClassDescription, getTrackingInfo, hashCode, setTrackingInfo
protected java.util.HashMap m_attributes
protected MModeledClassDescription m_classDescription
public MDefinedInstance(MClassDescription classDesc)
public void set(java.lang.String attributeName, java.lang.Object value) throws MException
set
in interface MData
set
in interface MInstance
set
in class MBaseData
attributeName
- Name of the attribute in which you want to set the value.value
- Value you want to assign to this object.MException
- On any failure to set the valuepublic void unset(java.lang.String attributeName) throws MException
unset
in interface MInstance
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 instanceMInstance.clear()
,
MInstance.set(String, Object)
public void clear()
clear
in interface MInstance
MInstance.unset(String)
,
MInstance.setNullData(String)
public java.lang.Object get(java.lang.String attributeName, boolean is4easyAccess) throws MException
get
in interface MInstance
MException
public java.lang.Object get(java.lang.String attributeName) throws MException
public java.lang.Object get(java.lang.String attributeName, java.lang.Object defValue)
public MTree serialize(int formatHint) throws MException
serialize
in interface MData
formatHint
- Required parameter specifying the message format.
Valid message format values are
MMessageFormat.AERV
- for AERv message format
MMessageFormat.XMLJMS
- for JMS XML message format
MMessageFormat.XMLRV
- for RV XML message formatMException
- On any error encounteredpublic MTree serialize() throws MException
serialize
in interface MData
MException
- On any error encounteredpublic MTree serialize(MDataSerializer serializer, int formatHint) throws MException
MException
- On any error encounteredpublic int getCategory()
getCategory
in interface MData
getCategory
in class MBaseData
public java.lang.String toString()
public boolean isNullData(java.lang.String attributeName) throws MException
isNullData
in interface MInstance
attributeName
- Name of the attribute in this instance that you want to check.false
if no value has been explicitly set, or if MInstance.unset(String)
has been called. Return true
only if the null value has been set explicitly.MException
- If the named attribute is not defined for this instanceMInstance.setNullData(String)
,
"Setting Data to NULL Explicitly, in TIBCO Adapter SDK Programmer's Guide"public void setNullData(java.lang.String attributeName) throws MException
setNullData
in interface MInstance
attributeName
- Name of the attribute in this instance that you want to set to null.MException
- If the named attribute is not defined for this
instanceMInstance.clear()
,
MInstance.set(String, Object)
,
"Setting Data to NULL Explicitly, in TIBCO Adapter SDK Programmer's Guide"public MTree getNullList() throws MException
getNullList
in interface MInstance
MException
public java.lang.Object newAttributeData(java.lang.String attrName) throws MConstructionException
newAttributeData
in interface MInstance
MConstructionException
public java.util.Enumeration getAttributes()
MInstance
Map.Entry format
,
that is, a name/value pair.getAttributes
in interface MInstance
public java.util.Enumeration getAttributeNames()
getAttributeNames
in interface MInstance
public java.util.Enumeration getAttributeValues()
getAttributeValues
in interface MInstance
public java.lang.String toXML() throws MException
MInstance
MInstance
.toXML
in interface MInstance
MException