de.mguennewig.pobjects.metadata
Class Parameter

java.lang.Object
  extended by de.mguennewig.pobjects.metadata.Column
      extended by de.mguennewig.pobjects.metadata.Parameter

public class Parameter
extends Column

An input parameter of an `select' element.

Author:
Michael Günnewig

Field Summary
 
Fields inherited from class de.mguennewig.pobjects.metadata.Column
GET_METHOD, GET_METHOD_VISUAL, MEMBER_ATTR, MEMBER_ATTR_TYPE, MEMBER_NAME, SET_METHOD
 
Constructor Summary
Parameter(java.lang.String name, java.lang.String schemaName, Type type, java.lang.String defaultValue, java.lang.String label, java.lang.String shortLabel, boolean nullAllowed)
          Creates a new parameter.
 
Method Summary
 java.lang.String getDefaultValue()
          Returns the string representation of the parameter's default value.
 java.lang.String getLabel()
          Returns the string used to refer to this parameter in the user interface.
 java.lang.String getShortLabel()
          Returns an abbreviated version of getLabel().
 boolean isNullAllowed()
          Tests whether this parameter is not mandatory and can be null.
 java.lang.String name(int variant)
          Returns different names depending on variant for the code generator.
 
Methods inherited from class de.mguennewig.pobjects.metadata.Column
getDescription, getIndex, getName, getSchemaName, getType, setDescription, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Parameter

public Parameter(java.lang.String name,
                 java.lang.String schemaName,
                 Type type,
                 java.lang.String defaultValue,
                 java.lang.String label,
                 java.lang.String shortLabel,
                 boolean nullAllowed)
Creates a new parameter.

Parameters:
name - The column name, as seen by the application.
schemaName - The column name in the database schema.
type - Specifies the type of the values of this column.
defaultValue - String representation of the parameter's default value.
label - String used to refer to this attribute in the user interface.
shortLabel - Abbreviated version of label. Typically used as header in the table view of a list of objects, where the table head is a list of shortLabel names.
nullAllowed - If false this parameter is mandatory and must not be null.
Method Detail

getDefaultValue

public final java.lang.String getDefaultValue()
Returns the string representation of the parameter's default value.


getLabel

public final java.lang.String getLabel()
Returns the string used to refer to this parameter in the user interface.

See Also:
getShortLabel()

getShortLabel

public final java.lang.String getShortLabel()
Returns an abbreviated version of getLabel().

Typically used as header in the table view of a list of objects, where the table head is a list of short label names.


isNullAllowed

public final boolean isNullAllowed()
Tests whether this parameter is not mandatory and can be null.


name

public java.lang.String name(int variant)
Returns different names depending on variant for the code generator.

Overrides:
name in class Column
Returns:
variant return value
Column.MEMBER_ATTR param<Name>
Column.MEMBER_ATTR_TYPE ptype<Name>
other values see super class