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

java.lang.Object
  extended by com.crystaldecisions.sdk.occa.report.data.Value
All Implemented Interfaces:
IValue, IClone
Direct Known Subclasses:
ConstantValue, ExpressionValue, ParameterFieldValue

public abstract class Value
extends java.lang.Object
implements IValue, IClone

This object defines a value of a field. This is used as a base class to represent different kinds of values (values in formulas, parameters, and so on). It is not to be used directly, and the actual value is defined in a sub-class.


Constructor Summary
Value()
           
 
Method Summary
abstract  java.lang.Object clone(boolean deepClone)
           
abstract  java.lang.String computeText()
          The ComputeText method returns a String representation of the field value that can be used in a report formula.
abstract  void copyTo(java.lang.Object destObject, boolean deepCopy)
           
 java.lang.Object createMember(java.lang.String eleName, org.xml.sax.Attributes attrs, XMLSerializationContext ctxt, java.util.Map objState, boolean[] bLoaded)
          For internal use only.
abstract  java.lang.String displayText(java.util.Locale locale)
          Returns the field's value as a localized and formatted String.
 void doControllerModification(java.lang.Object newObject)
           
 void endElement(java.lang.String eleName, java.util.Map objState)
          For internal use only.
 void enumerateMembers(IMemberVisitor visitor)
           
 ControllableMixin getControllableMixin()
           
abstract  boolean hasContent(java.lang.Object srcValue)
           
 boolean isDirectlyControllable()
           
 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(XMLWriter writer, java.lang.String sTag, XMLSerializationContext ctxt)
          For internal use only.
 void save(XMLWriter writer, XMLSerializationContext ctxt)
          For internal use only.
 void saveContents(XMLWriter writer, XMLSerializationContext ctxt)
          For internal use only.
static java.lang.String toComputeText(java.lang.Object value)
          For internal use only.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Value

public Value()
Method Detail

clone

public abstract java.lang.Object clone(boolean deepClone)

computeText

public abstract java.lang.String computeText()
Description copied from interface: IValue

The ComputeText method returns a String representation of the field value that can be used in a report formula.

The String is not formatted or localized. The syntax will always be Crystal syntax. If the field contains a date, ComputeText returns Date(x, x, x); if it contains a date and time, ComputeText returns DateTime(x, x, x, x, x, x). However, when the date is 1900, 0, 1 (the Java start date), ComputeText returns Time(x, x, x). If you want to set a field to a time value only (that is, with no date), you should set the date to 1900, 0, 1, so that ComputeText will retrieve the correct information.

Specified by:
computeText in interface IValue
Returns:
A String representation of the field value that can be used in a report formula.

copyTo

public abstract void copyTo(java.lang.Object destObject,
                            boolean deepCopy)

createMember

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

For internal use only.


displayText

public abstract java.lang.String displayText(java.util.Locale locale)
Description copied from interface: IValue

Returns the field's value as a localized and formatted String. The Locale can be a java.util.Locale value.

The value is formatted according to the locale. The user is required to pass in a locale; the system default locale or user default locale is not used. If the field contains a date, displayText returns a locale-specific date string; if it contains a date and time, displayText returns a locale-specific date time String; if it contains a time String, displayText returns a locale-specific time String.

Specified by:
displayText in interface IValue
Parameters:
locale - The locale as specified by java.util.Locale .
Returns:
The field's value as a localized and formatted String.

endElement

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

For internal use only.


hasContent

public abstract boolean hasContent(java.lang.Object srcValue)

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(XMLWriter writer,
                 XMLSerializationContext ctxt)
          throws java.io.IOException

For internal use only.

Throws:
java.io.IOException

save

public void save(XMLWriter writer,
                 java.lang.String sTag,
                 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

toComputeText

public static java.lang.String toComputeText(java.lang.Object value)

For internal use only.


getControllableMixin

public ControllableMixin getControllableMixin()

doControllerModification

public void doControllerModification(java.lang.Object newObject)

isDirectlyControllable

public boolean isDirectlyControllable()

enumerateMembers

public void enumerateMembers(IMemberVisitor visitor)