bea.jolt.beans
Class JoltInputEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bybea.jolt.beans.JoltInputEvent
All Implemented Interfaces:
java.io.Serializable

public class JoltInputEvent
extends java.util.EventObject

JoltInputEvent carries information about input data to JoltServiceBeans. An instance of JoltInputEvent represents a single input field (possibly with multiple occurrences) to a Tuxedo service. Typically, this event is sent by a GUI control when its data content changes.

See Also:
Serialized Form

Constructor Summary
JoltInputEvent(java.lang.Object source, java.lang.String fieldName, java.lang.Object value)
          This constructor is used when the input is a single data element and it is represented in a native data format.
JoltInputEvent(java.lang.Object source, java.lang.String fieldName, java.lang.Object[] values)
          This constructor is used when the input is a data element with multiple occurrences and it is represented in a native data format.
JoltInputEvent(java.lang.Object source, java.lang.String fieldName, java.lang.Object value, int pos)
          This constructor is used when the input is a data element with multiple occurrences, but only one occurrence is to be set, and it is represented in a native data format.
JoltInputEvent(java.lang.Object source, java.lang.String fieldName, java.lang.String textValue)
          This constructor is used when the input is a single data element and it is represented as a String.
JoltInputEvent(java.lang.Object source, java.lang.String fieldName, java.lang.String[] textValues)
          This constructor is used when the input is a data element with multiple occurrences and it is represented as an array of Strings.
JoltInputEvent(java.lang.Object source, java.lang.String fieldName, java.lang.String textValue, int pos)
          This constructor is used when the input is a data element with multiple occurrences, but only one occurrence is to be set, and it is represented as a String.
 
Method Summary
 java.lang.String getFieldName()
          Get the name of the field.
 int getOccurrenceCount()
          Get the number of occurrences of the field.
 int getSingleOccurrence()
          Get the position of the field.
 java.lang.String getTextValue()
          Get the value as a String
 java.lang.String[] getTextValues()
          Get the occurring values as String.
 java.lang.Object getValue()
          Get the value in its native representation.
 java.lang.Object[] getValues()
          Get the occurring values in its native representation.
 boolean isText()
          Returns true if the field value is String, otherwise it returns false.
 boolean isVector()
          Returns true if the field has multiple occurrences, otherwise it returns false.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JoltInputEvent

public JoltInputEvent(java.lang.Object source,
                      java.lang.String fieldName,
                      java.lang.Object value)
This constructor is used when the input is a single data element and it is represented in a native data format.

Parameters:
source - Event source.
fieldName - Name of the input field (FML name).
value - Value of the field in a native data type, such as Integer or Float.

JoltInputEvent

public JoltInputEvent(java.lang.Object source,
                      java.lang.String fieldName,
                      java.lang.Object value,
                      int pos)
This constructor is used when the input is a data element with multiple occurrences, but only one occurrence is to be set, and it is represented in a native data format.

Parameters:
source - Event source.
fieldName - Name of the input field (FML name).
value - Value of the field in a native data type, such as Integer or Float.
pos - The position of the data element.

JoltInputEvent

public JoltInputEvent(java.lang.Object source,
                      java.lang.String fieldName,
                      java.lang.Object[] values)
This constructor is used when the input is a data element with multiple occurrences and it is represented in a native data format.

Parameters:
source - Event source.
fieldName - Name of the input field (FML name).
values - Array of occurrences of the field in a native data type, such as Integer or Float.

JoltInputEvent

public JoltInputEvent(java.lang.Object source,
                      java.lang.String fieldName,
                      java.lang.String textValue)
This constructor is used when the input is a single data element and it is represented as a String. The JoltInputEvent object will perform the necessary data conversion.

Parameters:
source - Event source.
fieldName - Name of the input field (FML name).
textValue - Value of the field as a String.

JoltInputEvent

public JoltInputEvent(java.lang.Object source,
                      java.lang.String fieldName,
                      java.lang.String textValue,
                      int pos)
This constructor is used when the input is a data element with multiple occurrences, but only one occurrence is to be set, and it is represented as a String. The JoltInputEvent object will perform the necessary data conversion.

Parameters:
source - Event source.
fieldName - Name of the input field (FML name).
textValue - Value of the field as a String.
pos - The position of the data element.

JoltInputEvent

public JoltInputEvent(java.lang.Object source,
                      java.lang.String fieldName,
                      java.lang.String[] textValues)
This constructor is used when the input is a data element with multiple occurrences and it is represented as an array of Strings. The JoltInputEvent object will perform the necessary data conversion.

Parameters:
source - Event source.
fieldName - Name of the input field (FML name).
textValues - Array of occurrences of the field as String.
Method Detail

getValue

public java.lang.Object getValue()
Get the value in its native representation.

Returns:
Value of the field.

getValues

public java.lang.Object[] getValues()
Get the occurring values in its native representation.

Returns:
The occurrences of the field.

getTextValue

public java.lang.String getTextValue()
Get the value as a String

Returns:
The value of the field as a String.

getTextValues

public java.lang.String[] getTextValues()
Get the occurring values as String.

Returns:
The occurrences of the field as a String.

getFieldName

public java.lang.String getFieldName()
Get the name of the field.

Returns:
Name of the field.

getOccurrenceCount

public int getOccurrenceCount()
Get the number of occurrences of the field.

Returns:
Number of occurrences.

getSingleOccurrence

public int getSingleOccurrence()
Get the position of the field. This will be

Returns:
position

isText

public boolean isText()
Returns true if the field value is String, otherwise it returns false.

Returns:
true or false

isVector

public boolean isVector()
Returns true if the field has multiple occurrences, otherwise it returns false.

Returns:
true or false