ch.sahits.phpclassgenerator
Class DBField

java.lang.Object
  extended by ch.sahits.phpclassgenerator.DBField

public class DBField
extends java.lang.Object

Bean representation of a DB table field with a name, a type and a null allowed constraint

Version:
1.0 $Revision: 1.2 $ changed by $Author: hotzst $ at $Date: 2007/08/18 16:39:05 $
Author:
Andi Hotz, (c) 2007

Field Summary
private  java.lang.String fieldName
           
private  java.lang.String fieldType
           
private  boolean isNullAllowed
           
 
Constructor Summary
DBField()
          Default constructor
 
Method Summary
 java.lang.String getFieldName()
           
 java.lang.String getFieldType()
           
 java.lang.String getFormatedFieldName()
          Format the field name
 boolean isNullAllowed()
           
 void setFieldName(java.lang.String fieldName)
           
 void setFieldType(java.lang.String fieldType)
           
 void setNullAllowed(boolean isNullAllowed)
           
 java.lang.String toString()
          String represntation of the field
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fieldName

private java.lang.String fieldName

fieldType

private java.lang.String fieldType

isNullAllowed

private boolean isNullAllowed
Constructor Detail

DBField

public DBField()
Default constructor

Method Detail

toString

public java.lang.String toString()
String represntation of the field

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getFieldName

public java.lang.String getFieldName()
Returns:
the fieldName

setFieldName

public void setFieldName(java.lang.String fieldName)
Parameters:
fieldName - the fieldName to set

getFieldType

public java.lang.String getFieldType()
Returns:
the fieldType

setFieldType

public void setFieldType(java.lang.String fieldType)
Parameters:
fieldType - the fieldType to set

isNullAllowed

public boolean isNullAllowed()
Returns:
the isNullAllowed

setNullAllowed

public void setNullAllowed(boolean isNullAllowed)
Parameters:
isNullAllowed - the isNullAllowed to set

getFormatedFieldName

public java.lang.String getFormatedFieldName()
Format the field name

Returns:
field name in variable syntax