atg.service.datacollection
Class FormatField

java.lang.Object
  extended by atg.service.datacollection.FormatField
All Implemented Interfaces:
java.io.Serializable

public class FormatField
extends java.lang.Object
implements java.io.Serializable

A FormatField represents a single field in a line of formatted text.

See Also:
Formatter, Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String DEFAULT_DATE_FORMAT
          default format for Dates
static int PROPERTY_TYPE
          PROPERTY_TYPE format fields refer to property names
static int STRING_TYPE
          STRING_TYPE format fields refer to strings
static int VARIABLE_TYPE
          VARIABLE_TYPE format fields refer to predefined format variables
 
Constructor Summary
FormatField()
          Construct an empty FormatField
 
Method Summary
 void appendDate(java.util.Date pDate, java.lang.StringBuffer pBuffer)
          Format the specified date and append it the the specified buffer.
 java.lang.String getFormat()
          Returns property Format
 java.lang.String getName()
          Returns property Name
 int getType()
          Returns property Type
 void setFormat(java.lang.String pFormat)
          Sets property Format
 void setName(java.lang.String pName)
          Sets property Name
 void setType(int pType)
          Sets property Type
 java.lang.String toString()
          Overrides Object.toString()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


PROPERTY_TYPE

public static final int PROPERTY_TYPE
PROPERTY_TYPE format fields refer to property names

See Also:
Constant Field Values

STRING_TYPE

public static final int STRING_TYPE
STRING_TYPE format fields refer to strings

See Also:
Constant Field Values

VARIABLE_TYPE

public static final int VARIABLE_TYPE
VARIABLE_TYPE format fields refer to predefined format variables

See Also:
Constant Field Values

DEFAULT_DATE_FORMAT

public static final java.lang.String DEFAULT_DATE_FORMAT
default format for Dates

See Also:
Constant Field Values
Constructor Detail

FormatField

public FormatField()
Construct an empty FormatField

Method Detail

setName

public void setName(java.lang.String pName)
Sets property Name


getName

public java.lang.String getName()
Returns property Name


setType

public void setType(int pType)
Sets property Type


getType

public int getType()
Returns property Type


setFormat

public void setFormat(java.lang.String pFormat)
Sets property Format


getFormat

public java.lang.String getFormat()
Returns property Format


appendDate

public void appendDate(java.util.Date pDate,
                       java.lang.StringBuffer pBuffer)
Format the specified date and append it the the specified buffer. Set the default format field if it is null.

Parameters:
pDate - date to format
pBuffer - string buffer to append

toString

public java.lang.String toString()
Overrides Object.toString()

Overrides:
toString in class java.lang.Object