IBM Branch Transformation Toolkit Javadoc

com.ibm.dse.base
Class NullCheckDecorator

java.lang.Object
  extended bycom.ibm.dse.base.FormatElement
      extended bycom.ibm.dse.base.FormatDecorator
          extended bycom.ibm.dse.base.NullCheckDecorator
All Implemented Interfaces:
Cacheable, Externalizable, java.io.Externalizable, java.io.Serializable

public class NullCheckDecorator
extends FormatDecorator

This decorator checks if the value of the data element is null. If so, it returns an empty string.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.dse.base.FormatDecorator
decorated
 
Fields inherited from class com.ibm.dse.base.FormatElement
dataElementName, externalizer, name
 
Constructor Summary
NullCheckDecorator()
          This is the default constructor used to create a NullCheckDecorator object.
NullCheckDecorator(java.lang.String aName)
          This is the constructor used by the Externalizer to create a NullCheckDecorator object.
 
Method Summary
 java.lang.String addDecoration(java.lang.String aString)
          This method should not be invoked.
 java.lang.String format(DataElement aDataElement)
          Overwrites the format() method from FormatDecorator.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes a NullCheckDecorator with the aTag attributes.
 java.lang.String removeDecoration(java.lang.String aString)
          Does nothing.
 Vector toStrings()
          Returns a visual representation of this decorator.
 DataElement unformat(java.lang.String aString, DataElement aDataElement)
          This method calls the removeDecoration() and unformats its decorated data element.
 
Methods inherited from class com.ibm.dse.base.FormatDecorator
extract, format, getDataElementName, getDecorated, getName, isConstant, isItConstant, reinitialize, rootDecorated, rootDecorator, setDecorated, toString, unformat
 
Methods inherited from class com.ibm.dse.base.FormatElement
exceptionInfo, externalizer, format, getExternalizer, getTagName, isCacheable, readExternal, readExternal, readObject, removeExternal, setDataElementName, setExternalizer, setName, setSize, toTags, unformat, writeExternal, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NullCheckDecorator

public NullCheckDecorator()
This is the default constructor used to create a NullCheckDecorator object.


NullCheckDecorator

public NullCheckDecorator(java.lang.String aName)
                   throws java.io.IOException
This is the constructor used by the Externalizer to create a NullCheckDecorator object.

Method Detail

addDecoration

public java.lang.String addDecoration(java.lang.String aString)
This method should not be invoked.

Specified by:
addDecoration in class FormatDecorator
Parameters:
aString - java.lang.String
Returns:
java.lang.String

format

public java.lang.String format(DataElement aDataElement)
                        throws DSEInvalidClassException,
                               DSEInvalidRequestException,
                               DSEInvalidArgumentException
Overwrites the format() method from FormatDecorator.

Overrides:
format in class FormatDecorator
Parameters:
aDataElement - com.ibm.dse.base.DataElement
Returns:
java.lang.String
Throws:
DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
Initializes a NullCheckDecorator with the aTag attributes.

Specified by:
initializeFrom in interface Externalizable
Specified by:
initializeFrom in class FormatElement
Parameters:
aTag - com.ibm.dse.base.Tag
Returns:
java.lang.Object

removeDecoration

public java.lang.String removeDecoration(java.lang.String aString)
Does nothing.

Specified by:
removeDecoration in class FormatDecorator
Parameters:
aString - java.lang.String
Returns:
java.lang.String

toStrings

public Vector toStrings()
Returns a visual representation of this decorator.

Specified by:
toStrings in interface Externalizable
Specified by:
toStrings in class FormatDecorator
Returns:
java.lang.String

unformat

public DataElement unformat(java.lang.String aString,
                            DataElement aDataElement)
                     throws DSEInvalidRequestException,
                            DSEInvalidArgumentException
This method calls the removeDecoration() and unformats its decorated data element.

Overrides:
unformat in class FormatDecorator
Parameters:
aString - java.lang.String
aDataElement - com.ibm.dse.base.DataElement
Returns:
com.ibm.dse.base.DataElement
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005