de.mguennewig.pobjects.metadata
Class Field

java.lang.Object
  extended by de.mguennewig.pobjects.metadata.Column
      extended by de.mguennewig.pobjects.metadata.Field
Direct Known Subclasses:
IdField

public class Field
extends Column

A Column that belongs to an existing table.

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
Field(java.lang.String name, java.lang.String schemaName, Type type, boolean nullAllowed, boolean unique, java.lang.String label, java.lang.String shortLabel)
          Creates a new field.
 
Method Summary
 java.lang.String getLabel()
          Returns the string used to refer to this field in the user interface.
 java.lang.String getShortLabel()
          Returns an abbreviated version of getLabel().
 boolean isNullAllowed()
          Tests whether this field is not mandatory and can be null.
 boolean isUnique()
          Tests whether values of this field must be unique.
 
Methods inherited from class de.mguennewig.pobjects.metadata.Column
getDescription, getIndex, getName, getSchemaName, getType, name, setDescription, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Field

public Field(java.lang.String name,
             java.lang.String schemaName,
             Type type,
             boolean nullAllowed,
             boolean unique,
             java.lang.String label,
             java.lang.String shortLabel)
Creates a new field.

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.
nullAllowed - If false this field is mandatory and must not be null.
unique - Specifies whether the values for this column must be unique.
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.
Method Detail

getLabel

public final java.lang.String getLabel()
Returns the string used to refer to this field 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 field is not mandatory and can be null.


isUnique

public final boolean isUnique()
Tests whether values of this field must be unique.