com.partnersoft.cog
Class CogStructureField

java.lang.Object
  extended by com.partnersoft.cog.CogStructureField
All Implemented Interfaces:
Coggable, Immutable

public class CogStructureField
extends java.lang.Object
implements Coggable, Immutable

A field in a CogStructureType.

Copyright 2006 Partner Software, Inc.

Version:
$Id: CogStructureField.java 2328 2010-01-06 15:38:22Z paul $
Author:
Paul Reavis, Russell Cagle

Constructor Summary
CogStructureField(Cog state)
           
CogStructureField(java.lang.String name, java.lang.String group, java.lang.String label, java.lang.String description, java.lang.String valueType)
          Creates a populated CogStructureField.
CogStructureField(java.lang.String name, java.lang.String group, java.lang.String label, java.lang.String description, java.lang.String valueType, boolean isPrimaryKey, boolean isAutoGenerated, boolean isNullAllowed)
          Creates a populated CogStructureField
 
Method Summary
 java.lang.String getDescription()
          Human-oriented description of the field.
 java.lang.String getGroup()
           
 java.lang.String getLabel()
          Human-oriented label used in reports and GUIs.
 java.lang.String getName()
          Internal name for the field, used as the name of children of the structure in a Cog.
 java.lang.String getValueType()
          The name of the CogType that this field's value must be.
 boolean hasDescription()
           
 boolean isAutoGenerated()
           
 boolean isNullAllowed()
           
 boolean isPrimaryKey()
           
 Cog toCog()
          Returns the complete internal state of this object in the form of a Cog.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CogStructureField

public CogStructureField(Cog state)

CogStructureField

public CogStructureField(java.lang.String name,
                         java.lang.String group,
                         java.lang.String label,
                         java.lang.String description,
                         java.lang.String valueType)
Creates a populated CogStructureField.

Parameters:
name -
label -
description -
valueType -

CogStructureField

public CogStructureField(java.lang.String name,
                         java.lang.String group,
                         java.lang.String label,
                         java.lang.String description,
                         java.lang.String valueType,
                         boolean isPrimaryKey,
                         boolean isAutoGenerated,
                         boolean isNullAllowed)
Creates a populated CogStructureField

Method Detail

toCog

public Cog toCog()
Description copied from interface: Coggable
Returns the complete internal state of this object in the form of a Cog.

Specified by:
toCog in interface Coggable
Returns:
Cog representing the internal state of this object

getName

public java.lang.String getName()
Internal name for the field, used as the name of children of the structure in a Cog.

Returns:
internal name

getLabel

public java.lang.String getLabel()
Human-oriented label used in reports and GUIs.

Returns:
label for field

getDescription

public java.lang.String getDescription()
Human-oriented description of the field.

Returns:
description for field

getValueType

public java.lang.String getValueType()
The name of the CogType that this field's value must be.

Returns:
name of field's value type

hasDescription

public boolean hasDescription()

getGroup

public java.lang.String getGroup()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isAutoGenerated

public boolean isAutoGenerated()

isNullAllowed

public boolean isNullAllowed()

isPrimaryKey

public boolean isPrimaryKey()