wt.query.template
Class ParameterTemplate

java.lang.Object
  extended bywt.query.template.ParameterTemplate
All Implemented Interfaces:
Externalizable, Serializable

public class ParameterTemplate
extends Object
implements Externalizable

A ParameterTemplate represents a template for a parameter that can be used to generate a runtime parameter value for a report.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private  String defaultValue
           
static long EXTERNALIZATION_VERSION_UID
           
private static String IS_MACRO_FLAG
           
static String IS_MACRO_SUFFIX
           
private  boolean macro
           
private  String name
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  String type
           
 
Constructor Summary
ParameterTemplate()
           
 
Method Summary
private  void defaultValueValidate(String a_DefaultValue)
           
 String getDefaultValue()
          Gets the value of the attribute: defaultValue; A default value that can be used if no value is explicitly specified.
 String getName()
          Gets the value of the attribute: name; Uniquely identifies the parameter.
 String getType()
          Gets the value of the attribute: type; Specifies the type (Java language type) of the parameter value.
 Object getValue(Hashtable a_inputs)
          Evaluates the ParameterTemplate using the user inputs to derive an actual parameter value.
 Object getValueWithNoDefaults(Hashtable a_inputs)
          Evaluates the ParameterTemplate using only the user inputs (default value is not used) to derive an actual parameter value.
 boolean isMacro()
          Gets the value of the attribute: macro; Indicates if the parameter value is a macro.
private  void nameValidate(String a_Name)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(ParameterTemplate thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setDefaultValue(String a_DefaultValue)
          Sets the value of the attribute: defaultValue; A default value that can be used if no value is explicitly specified.
 void setMacro(boolean a_Macro)
          Sets the value of the attribute: macro; Indicates if the parameter value is a macro.
 void setName(String a_Name)
          Sets the value of the attribute: name; Uniquely identifies the parameter.
 void setType(String a_Type)
          Sets the value of the attribute: type; Specifies the type (Java language type) of the parameter value.
private  void typeValidate(String a_Type)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

name

private String name

defaultValue

private String defaultValue

macro

private boolean macro

type

private String type

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

IS_MACRO_SUFFIX

public static final String IS_MACRO_SUFFIX
See Also:
Constant Field Values

IS_MACRO_FLAG

private static final String IS_MACRO_FLAG
See Also:
Constant Field Values
Constructor Detail

ParameterTemplate

public ParameterTemplate()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(ParameterTemplate thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getName

public String getName()
Gets the value of the attribute: name; Uniquely identifies the parameter.

Supported API: true

Returns:
String

setName

public void setName(String a_Name)
             throws WTPropertyVetoException
Sets the value of the attribute: name; Uniquely identifies the parameter.

Supported API: true

Parameters:
a_Name -
Throws:
WTPropertyVetoException

nameValidate

private void nameValidate(String a_Name)
                   throws WTPropertyVetoException
Parameters:
a_Name -
Throws:
WTPropertyVetoException

getDefaultValue

public String getDefaultValue()
Gets the value of the attribute: defaultValue; A default value that can be used if no value is explicitly specified.

Supported API: true

Returns:
String

setDefaultValue

public void setDefaultValue(String a_DefaultValue)
                     throws WTPropertyVetoException
Sets the value of the attribute: defaultValue; A default value that can be used if no value is explicitly specified.

Supported API: true

Parameters:
a_DefaultValue -
Throws:
WTPropertyVetoException

defaultValueValidate

private void defaultValueValidate(String a_DefaultValue)
                           throws WTPropertyVetoException
Parameters:
a_DefaultValue -
Throws:
WTPropertyVetoException

isMacro

public boolean isMacro()
Gets the value of the attribute: macro; Indicates if the parameter value is a macro.

Supported API: true

Returns:
boolean

setMacro

public void setMacro(boolean a_Macro)
              throws WTPropertyVetoException
Sets the value of the attribute: macro; Indicates if the parameter value is a macro.

Supported API: true

Parameters:
a_Macro -
Throws:
WTPropertyVetoException

getType

public String getType()
Gets the value of the attribute: type; Specifies the type (Java language type) of the parameter value.

Supported API: true

Returns:
String

setType

public void setType(String a_Type)
             throws WTPropertyVetoException
Sets the value of the attribute: type; Specifies the type (Java language type) of the parameter value.

Supported API: true

Parameters:
a_Type -
Throws:
WTPropertyVetoException

typeValidate

private void typeValidate(String a_Type)
                   throws WTPropertyVetoException
Parameters:
a_Type -
Throws:
WTPropertyVetoException

getValue

public Object getValue(Hashtable a_inputs)
                throws WTException
Evaluates the ParameterTemplate using the user inputs to derive an actual parameter value.

Supported API: true

Parameters:
a_inputs -
Returns:
Object
Throws:
WTException

getValueWithNoDefaults

public Object getValueWithNoDefaults(Hashtable a_inputs)
                              throws WTException
Evaluates the ParameterTemplate using only the user inputs (default value is not used) to derive an actual parameter value.

Supported API: true

Parameters:
a_inputs -
Returns:
Object
Throws:
WTException