com.crystaldecisions.sdk.occa.report.data
Class Field

java.lang.Object
  extended bycom.crystaldecisions.sdk.occa.report.data.Field
All Implemented Interfaces:
IClone, IField
Direct Known Subclasses:
FormulaField, ParameterField

public abstract class Field
extends java.lang.Object
implements IField, IClone

This object represents a report field in general.


Constructor Summary
Field()
           
 
Method Summary
 java.lang.Object clone(boolean deepClone)
          Returns the new object that has been cloned.
 void copyTo(java.lang.Object destObject, boolean deepCopy)
          Copies the object.
 java.lang.Object createMember(java.lang.String eleName, org.xml.sax.Attributes attrs, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt, java.util.Map objState, boolean[] bLoaded)
           For internal use only.
 void endElement(java.lang.String eleName, java.util.Map objState)
           For internal use only.
 java.lang.String getDescription()
           Returns a description of the field.
 java.lang.String getDisplayName(FieldDisplayNameType displayName, java.util.Locale locale)
           Returns the name of the field that has been formatted according to the value of the parameter displayNameType.
 java.lang.String getFormulaForm()
           Returns the name of the field as it will be used in a formula.
 java.lang.String getHeadingText()
           Returns the text used as a heading when the field is added to the report.
 boolean getIsRecurring()
           Returns true if the field is recurring, and false otherwise.
 int getLength()
           Returns the maximum length the field's data may be (in bytes).
 java.lang.String getLongName(java.util.Locale locale)
           Returns the fully qualified name of the field.
 java.lang.String getName()
           Returns the name of the field.
 java.lang.String getShortName(java.util.Locale locale)
           Returns the short name of the field.
 FieldValueType getType()
           Returns what type of field this is.
 boolean hasContent(java.lang.Object srcField)
          Returns true if this object contains the same elements as the passed in object.
 void readElement(java.lang.String eleName, java.lang.String sVal, org.xml.sax.Attributes attrs, java.util.Map objState)
           For internal use only.
 void save(com.crystaldecisions.xml.serialization.XMLWriter writer, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
           For internal use only.
 void save(com.crystaldecisions.xml.serialization.XMLWriter writer, java.lang.String sTag, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
           For internal use only.
 void saveContents(XMLWriter writer, XMLSerializationContext ctxt)
           For internal use only.
 void setDescription(java.lang.String description)
           Sets the description of the field.
 void setHeadingText(java.lang.String headingText)
           Sets the text used as a heading when the field is added to the report.
 void setLength(int length)
           Sets the maximum length the field's data may be (in bytes).
 void setName(java.lang.String name)
           Sets the name of the field.
 void setType(FieldValueType valueType)
           Sets what type of field this is.
 void startElement(java.lang.String eleName, java.util.Map objState, org.xml.sax.Attributes attrs)
           For internal use only.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.crystaldecisions.sdk.occa.report.data.IField
getKind
 

Constructor Detail

Field

public Field()
Method Detail

clone

public java.lang.Object clone(boolean deepClone)
Description copied from interface: IClone

Returns the new object that has been cloned.

Specified by:
clone in interface IClone
Parameters:
deepClone - true to use deep clone, false to use shallow.
Returns:
The new object that has been cloned.

copyTo

public void copyTo(java.lang.Object destObject,
                   boolean deepCopy)
Description copied from interface: IClone

Copies the object.

Specified by:
copyTo in interface IClone
Parameters:
destObject - The destination object to copy to.
deepCopy - true to use deep copy, false to use shallow.

createMember

public java.lang.Object createMember(java.lang.String eleName,
                                     org.xml.sax.Attributes attrs,
                                     com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt,
                                     java.util.Map objState,
                                     boolean[] bLoaded)

For internal use only.


endElement

public void endElement(java.lang.String eleName,
                       java.util.Map objState)

For internal use only.


getDescription

public java.lang.String getDescription()
Description copied from interface: IField

Returns a description of the field.

Specified by:
getDescription in interface IField
Returns:
A String containing a description of the field.

getDisplayName

public java.lang.String getDisplayName(FieldDisplayNameType displayName,
                                       java.util.Locale locale)
Description copied from interface: IField

Returns the name of the field that has been formatted according to the value of the parameter displayNameType.

Specified by:
getDisplayName in interface IField
Parameters:
displayName - Indicates how the display text should be formatted. It may be one of the values listed under FieldDisplayNameType.
locale - Formats the string according to a locale.
Returns:
A String containing the name of the field that has been formatted according to the value of the parameter displayNameType.

getFormulaForm

public java.lang.String getFormulaForm()
Description copied from interface: IField

Returns the name of the field as it will be used in a formula. This is a unique identifier to avoid ambiguity in formula code. It is the same value as the one used in the CRW formula editor.

Specified by:
getFormulaForm in interface IField
Returns:
A String containing the name of the field as it will be used in a formula.

getHeadingText

public java.lang.String getHeadingText()
Description copied from interface: IField

Returns the text used as a heading when the field is added to the report.

Specified by:
getHeadingText in interface IField
Returns:
A String containing the text used as a heading when the field is added to the report.

getIsRecurring

public boolean getIsRecurring()
Description copied from interface: IField

Returns true if the field is recurring, and false otherwise. A field is recurring if its contents change during the formatting of a report. A constant field (not recurring) is one that doesn't change. The special field "Page Number," for example, is a recurring field, while the special field "Report Title" is not.

Specified by:
getIsRecurring in interface IField
Returns:
true if the field is recurring, and false otherwise.

getLength

public int getLength()
Description copied from interface: IField

Returns the maximum length the field's data may be (in bytes).

Specified by:
getLength in interface IField
Returns:
A String containing the maximum length the field's data may be (in bytes).

getLongName

public java.lang.String getLongName(java.util.Locale locale)
Description copied from interface: IField

Returns the fully qualified name of the field.

Specified by:
getLongName in interface IField
Parameters:
locale - The locale that will be used to localize the field.
Returns:
A String containing the fully qualified name of the field.

getName

public java.lang.String getName()
Description copied from interface: IField

Returns the name of the field. For DBField objects, the value returned by this method is equivalent to the getDisplayName method.

Specified by:
getName in interface IField
Returns:
A String containing the name of the field.

getShortName

public java.lang.String getShortName(java.util.Locale locale)
Description copied from interface: IField

Returns the short name of the field.

Specified by:
getShortName in interface IField
Parameters:
locale - The locale that will be used to localize the field name.
Returns:
A String containing the short name of the field.

getType

public FieldValueType getType()
Description copied from interface: IField

Returns what type of field this is. Do not confuse this property with Kind. Kind identifies what sort of report field this is, while Type identifies what data it stores. For example, a bitmap, string, 8 bit integer, chart, etc.

Specified by:
getType in interface IField
Returns:
A FieldValueType object that specifies what type of field this is.

hasContent

public boolean hasContent(java.lang.Object srcField)
Description copied from interface: IClone

Returns true if this object contains the same elements as the passed in object.

Specified by:
hasContent in interface IClone
Parameters:
srcField - The object to check for content.
Returns:
true if this object contains the same elements as the passed in object, otherwise false.

readElement

public void readElement(java.lang.String eleName,
                        java.lang.String sVal,
                        org.xml.sax.Attributes attrs,
                        java.util.Map objState)

For internal use only.


save

public void save(com.crystaldecisions.xml.serialization.XMLWriter writer,
                 com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
          throws java.io.IOException

For internal use only.

Throws:
java.io.IOException

save

public void save(com.crystaldecisions.xml.serialization.XMLWriter writer,
                 java.lang.String sTag,
                 com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
          throws java.io.IOException

For internal use only.

Throws:
java.io.IOException

saveContents

public void saveContents(XMLWriter writer,
                         XMLSerializationContext ctxt)
                  throws java.io.IOException

For internal use only.

Throws:
java.io.IOException

setDescription

public void setDescription(java.lang.String description)
Description copied from interface: IField

Sets the description of the field.

Specified by:
setDescription in interface IField
Parameters:
description - A String containing a description of the field.

setHeadingText

public void setHeadingText(java.lang.String headingText)
Description copied from interface: IField

Sets the text used as a heading when the field is added to the report.

Specified by:
setHeadingText in interface IField
Parameters:
headingText - A String containing the text used as a heading when the field is added to the report.

setLength

public void setLength(int length)
Description copied from interface: IField

Sets the maximum length the field's data may be (in bytes).

Specified by:
setLength in interface IField
Parameters:
length - A String containing the maximum length the field's data may be (in bytes).

setName

public void setName(java.lang.String name)
Description copied from interface: IField

Sets the name of the field. For DBField objects, the value returned by this method is equivalent to the getDisplayName method.

Specified by:
setName in interface IField
Parameters:
name - A String containing the name of the field.

setType

public void setType(FieldValueType valueType)
Description copied from interface: IField

Sets what type of field this is. Do not confuse this property with Kind. Kind identifies what sort of report field this is, while Type identifies what data it stores. For example, a bitmap, string, 8 bit integer, chart, etc.

Specified by:
setType in interface IField
Parameters:
valueType - A FieldValueType object that specifies what type of field this is.

startElement

public void startElement(java.lang.String eleName,
                         java.util.Map objState,
                         org.xml.sax.Attributes attrs)

For internal use only.