com.bankframe.bo
Class DataPacketUtils

java.lang.Object
  extended by com.bankframe.bo.DataPacketUtils

public class DataPacketUtils
extends Object


Field Summary
static String VALUE
           
 
Constructor Summary
DataPacketUtils()
           
 
Method Summary
static Vector addEnumToVector(Vector addTo, Enumeration entities, Class classInEnum)
          This methods appends the contents of an enumeration to a vector.
static Vector convertEnumToVector(Enumeration enumToConvert, Class classInEnum)
          This method converts an Enumeration to a Vector This method also uses the Server.getObjectFromEnum method to extact the objects from the enumeration.
static Vector convertToDataPackets(EEntity object)
          This method converts a object to a vector of DataPackets.
static Vector convertToDataPackets(EEntityRemote object)
          This method converts a object to a vector of DataPackets.
static Vector convertToDataPackets(Enumeration objects)
          This method converts an Enumeration of objects to a vector of DataPackets.
static Vector convertToDataPackets(String dataPacketName, Object value)
          This method converts a single object to a vector of DataPackets.
static Vector convertToDataPackets(Vector objects)
          This method converts a vector of objects to a vector of DataPackets.
static DataPacket createDataPacket(String dataPacketName, Object value)
          This method creates a DataPacket for returning single values.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALUE

public static final String VALUE
See Also:
Constant Field Values
Constructor Detail

DataPacketUtils

public DataPacketUtils()
Method Detail

addEnumToVector

public static Vector addEnumToVector(Vector addTo,
                                     Enumeration entities,
                                     Class classInEnum)
                              throws ProcessingErrorException
This methods appends the contents of an enumeration to a vector.

Parameters:
addTo - java.util.Vector to add the enumeration elements to.
entities - java.util.Enumeration.
classInEnum - java.lang.Class
Returns:
Vector.
Throws:
ProcessingErrorException

convertEnumToVector

public static Vector convertEnumToVector(Enumeration enumToConvert,
                                         Class classInEnum)
This method converts an Enumeration to a Vector This method also uses the Server.getObjectFromEnum method to extact the objects from the enumeration.

Parameters:
enumToConvert -
classInEnum -
Returns:
Vector

convertToDataPackets

public static Vector convertToDataPackets(EEntity object)
                                   throws ProcessingErrorException
This method converts a object to a vector of DataPackets. The object must be a BankFrame objects.

Parameters:
object - EEntity
Returns:
Vector of DataPackets
Throws:
ProcessingErrorException - is thrown if the object cannot be converted.

convertToDataPackets

public static Vector convertToDataPackets(EEntityRemote object)
                                   throws ProcessingErrorException
This method converts a object to a vector of DataPackets. The object must be a BankFrame objects.

Parameters:
object - EEntityRemote
Returns:
Vector of DataPackets
Throws:
ProcessingErrorException - is thrown if the object cannot be converted.

convertToDataPackets

public static Vector convertToDataPackets(String dataPacketName,
                                          Object value)
                                   throws ProcessingErrorException
This method converts a single object to a vector of DataPackets. The object can be any String, StringBuffer, Boolean, Float, Integer, Double, Short or Long etc.

Parameters:
dataPacketName - String
value - Object
Returns:
Vector of DataPackets, although only a single dataPacket will exist in the vector.
Throws:
ProcessingErrorException - is thrown if the object cannot be converted.

convertToDataPackets

public static Vector convertToDataPackets(Enumeration objects)
                                   throws ProcessingErrorException
This method converts an Enumeration of objects to a vector of DataPackets. The objects contained within the Enumeration must be BankFrame objects. They can be of mixed entity types.

Parameters:
objects - Enumeration
Returns:
Vector of DataPackets
Throws:
ProcessingErrorException - is thrown if the enumeration cannot be converted.

convertToDataPackets

public static Vector convertToDataPackets(Vector objects)
                                   throws ProcessingErrorException
This method converts a vector of objects to a vector of DataPackets. The objects contained within the vector must be BankFrame objects. They can be of mixed entity types.

Parameters:
objects - Vector
Returns:
Vector of DataPackets
Throws:
ProcessingErrorException - is thrown if the enumeration cannot be converted.

createDataPacket

public static DataPacket createDataPacket(String dataPacketName,
                                          Object value)
This method creates a DataPacket for returning single values. Any object can be passed (Integer, Double, Long etc) to this method. The object is converted to a String and put into a datapacket. The key to get the String value is always "VALUE".

Parameters:
dataPacketName - String to be used as the DataPacket name
value - Object to be put into the returning datapacket object.
Returns:
DataPacket


Copyright © 2005, 2007, Oracle. All rights reserved.