com.partnersoft.cog
Class CogPrimitiveType

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

public class CogPrimitiveType
extends AbstractCogType

Describes primitive-like CogNodes.

Copyright 2005-2006 Partner Software, Inc.

Version:
$Id: CogPrimitiveType.java 2114 2009-09-21 20:57:28Z paul $
Author:
Paul Reavis, Russell Cagle

Constructor Summary
CogPrimitiveType(Cog state)
           
CogPrimitiveType(java.lang.String name, java.lang.String className, java.lang.String controlName, java.lang.String defaultValue, java.lang.String regex, java.lang.String sqlType)
           
CogPrimitiveType(java.lang.String name, java.lang.String className, java.lang.String controlName, java.lang.String defaultValue, java.lang.String regex, java.lang.String sqlType, int size)
           
 
Method Summary
 void cleanStructureOf(Cog node)
          Cleans the given node structure as best as it can based on available information.
 java.lang.String getRegex()
           
 int getSize()
           
 java.lang.String getSqlType()
           
 Cog toCog()
          Returns the complete internal state of this object in the form of a Cog.
 java.util.List<CogValidationException> validate(Cog node)
          Validates the given node structure as best it can.
 
Methods inherited from class com.partnersoft.cog.AbstractCogType
createNode, getControlName, getJavaClassName, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CogPrimitiveType

public CogPrimitiveType(Cog state)

CogPrimitiveType

public CogPrimitiveType(java.lang.String name,
                        java.lang.String className,
                        java.lang.String controlName,
                        java.lang.String defaultValue,
                        java.lang.String regex,
                        java.lang.String sqlType)

CogPrimitiveType

public CogPrimitiveType(java.lang.String name,
                        java.lang.String className,
                        java.lang.String controlName,
                        java.lang.String defaultValue,
                        java.lang.String regex,
                        java.lang.String sqlType,
                        int size)
Method Detail

cleanStructureOf

public void cleanStructureOf(Cog node)
Description copied from interface: CogType
Cleans the given node structure as best as it can based on available information. This typically involves setting the datatypes of children nodes.


validate

public java.util.List<CogValidationException> validate(Cog node)
Description copied from interface: CogType
Validates the given node structure as best it can.

Specified by:
validate in interface CogType
Overrides:
validate in class AbstractCogType
Parameters:
node - node to validate

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
Overrides:
toCog in class AbstractCogType
Returns:
Cog representing the internal state of this object

getRegex

public java.lang.String getRegex()

getSqlType

public java.lang.String getSqlType()

getSize

public int getSize()