de.mathema.pride.util
Class TableColumns

java.lang.Object
  extended by de.mathema.pride.util.TableColumns

public class TableColumns
extends java.lang.Object

Meta information about a database table column

Author:
Jan Lessner

Field Summary
protected  java.lang.String columnName
           
protected  int columnType
           
protected  int decimalDigits
           
protected  boolean nullsForbidden
           
protected  boolean primaryKeyField
           
 
Constructor Summary
TableColumns(java.lang.String name, int type)
           
TableColumns(java.lang.String name, int type, int decimalDigits, boolean nullsForbidden)
           
 
Method Summary
 java.lang.String getName()
           
 java.lang.String getName2()
           
 java.lang.String getName3()
           
 java.lang.String getType()
           
 boolean isPrimaryKeyField()
           
 void setPrimaryKeyField()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

columnName

protected java.lang.String columnName

columnType

protected int columnType

decimalDigits

protected int decimalDigits

nullsForbidden

protected boolean nullsForbidden

primaryKeyField

protected boolean primaryKeyField
Constructor Detail

TableColumns

public TableColumns(java.lang.String name,
                    int type)

TableColumns

public TableColumns(java.lang.String name,
                    int type,
                    int decimalDigits,
                    boolean nullsForbidden)
Method Detail

setPrimaryKeyField

public void setPrimaryKeyField()

isPrimaryKeyField

public boolean isPrimaryKeyField()
Returns:
true if this column is a primary key field

getName

public java.lang.String getName()
Returns:
column name in lower case and doesnt remove character underscore

getName2

public java.lang.String getName2()
Returns:
capitalized column name without underscores. Characters following directly after underscores are printed in uppercase.

getName3

public java.lang.String getName3()
Returns:
column name. Like getName2 but prints the first letter in lowercase.

getType

public java.lang.String getType()
Returns:
String with JAVA type of the column. If the column doesn't allow null values, the functions returns primitive types, otherwise it returns object types.