com.wrq.apptrieve.appconn
Class AttributeMetaData

java.lang.Object
  extended by com.wrq.apptrieve.appconn.AttributeMetaData
All Implemented Interfaces:
AppConnMetaData

public class AttributeMetaData
extends java.lang.Object
implements AppConnMetaData

Provides metadata about an attribute that is defined on an entity of a Host Integrator model.


Field Summary
 
Fields inherited from interface com.wrq.apptrieve.appconn.AppConnMetaData
METADATA_TYPE_ATTRIBUTE, METADATA_TYPE_COLUMN, METADATA_TYPE_FIELD, METADATA_TYPE_OPERATION, METADATA_TYPE_PROCEDURE, METADATA_TYPE_RECORDSET, METADATA_TYPE_VARIABLE
 
Constructor Summary
AttributeMetaData(com.wrq.apptrieve.agent.EntityAttributeMeta saObject)
          Constructor for internal use only.
 
Method Summary
 java.lang.String getDescription()
          Gets the description specified in the Design Tool for the attribute.
 int getLength()
          Gets the length of the attribute -- the total number of screen characters.
 int getMetaDataType()
          Gets the meta data type for this object.
 java.lang.String getName()
          Gets the name of the attribute.
 java.lang.String getReadVariable()
          Gets the name of the variable mapped to this attribute for reading.
 java.lang.String getWriteVariable()
          Gets the name of the variable mapped to this attribute for writing.
 boolean isReadable()
          Discovers whether the attribute is readable.
 boolean isWriteable()
          Discovers whether the attribute is writable.
 boolean terminalAttributesEnabled()
          Discovers whether the terminal attributes are enabled for the attribute.
 java.lang.String toString()
          Generates a String object that represents the current values of this AttributeMetaData object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeMetaData

public AttributeMetaData(com.wrq.apptrieve.agent.EntityAttributeMeta saObject)
Constructor for internal use only.

Parameters:
saObject - data
Method Detail

getDescription

public java.lang.String getDescription()
Gets the description specified in the Design Tool for the attribute.

Specified by:
getDescription in interface AppConnMetaData
Returns:
String The description of the attribute

getLength

public int getLength()
Gets the length of the attribute -- the total number of screen characters.

If an Event Handler is attached to the attributeRead event for this attribute, the attribute can return values longer than the defined length.

Returns:
String The total number of screen characters defined in the Design Tool for this attribute

getMetaDataType

public int getMetaDataType()
Gets the meta data type for this object.

Specified by:
getMetaDataType in interface AppConnMetaData
Returns:
int - always returns AppConnMetaData.METADATA_TYPE_ATTRIBUTE

getName

public java.lang.String getName()
Gets the name of the attribute.

Specified by:
getName in interface AppConnMetaData
Returns:
String the name of the attribute

getReadVariable

public java.lang.String getReadVariable()
Gets the name of the variable mapped to this attribute for reading.

This variable will be updated with the attribute value when an entity operation performs a ReadFromMappedAttr command.

Returns a 0-length String if the attribute is not mapped.

Returns:
String

getWriteVariable

public java.lang.String getWriteVariable()
Gets the name of the variable mapped to this attribute for writing.

The attribute will be updated with the value from this variable when an entity operation performs a WriteToMappedAttr command.

Returns a 0-length String if the attribute is not mapped.

Returns:
String

isReadable

public boolean isReadable()
Discovers whether the attribute is readable.

Returns:
boolean true if the value of the attribute can be read
See Also:
AppConnModel.getAttributes(java.util.List)

isWriteable

public boolean isWriteable()
Discovers whether the attribute is writable.

Returns:
boolean true if the attribute can be updated
See Also:
AppConnModel.setAttributes(java.util.Map)

terminalAttributesEnabled

public boolean terminalAttributesEnabled()
Discovers whether the terminal attributes are enabled for the attribute.

Returns:
boolean true if terminal attributes will be returned for this attribute when the session has set enableTerminalAttributes(true)
See Also:
AppConnModel.enableTerminalAttributes(boolean), AppConnModel.getAttributes(java.util.List)

toString

public java.lang.String toString()
Generates a String object that represents the current values of this AttributeMetaData object.

Overrides:
toString in class java.lang.Object
Returns:
java.lang.String - the string representation of this object