com.youyounet.db
Class ColumnAttribute

java.lang.Object
  |
  +--com.youyounet.db.ColumnAttribute

public class ColumnAttribute
extends java.lang.Object

ColumnAttribute is a help class that encapsulate the information of a database table column


Field Summary
static int AUTO_INCREMENT
           
static int PASSWORD
           
static int PRIMARY_KEY
           
static int QUOTED_VALUE
           
static int TIMESTAMP
           
 
Constructor Summary
ColumnAttribute(java.lang.String columnName)
          Creates a new instance of ColumnAttribute.
ColumnAttribute(java.lang.String columnName, int attributeValue)
          Creates a new instance of ColumnAttribute.
 
Method Summary
 int getColumnAttributeValue()
          Get the attribute value
 java.lang.String getColumnName()
          Get the columnName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUOTED_VALUE

public static final int QUOTED_VALUE
See Also:
Constant Field Values

PRIMARY_KEY

public static final int PRIMARY_KEY
See Also:
Constant Field Values

AUTO_INCREMENT

public static final int AUTO_INCREMENT
See Also:
Constant Field Values

PASSWORD

public static final int PASSWORD
See Also:
Constant Field Values

TIMESTAMP

public static final int TIMESTAMP
See Also:
Constant Field Values
Constructor Detail

ColumnAttribute

public ColumnAttribute(java.lang.String columnName,
                       int attributeValue)
Creates a new instance of ColumnAttribute.

Parameters:
columnName - the column name.
attributeValue - this paramter is the sum of the values defined for each single attribute that this column may have. These single attributes are:
QUOTED_VALUE( = 1, the value of the column should be quoted in the insert SQL, for example, VARCHAR column's value should be quoted.).
PRIMARY_KEY( = 2)
AUTO_INCREMENT( = 4)
PASSWORD( = 8)
TIMESTAMP( = 16)
If a column doesn't have any single attribute listed above, simplly set this parameter to 0 or use ColumnAttribute( String columnName) instead.

ColumnAttribute

public ColumnAttribute(java.lang.String columnName)
Creates a new instance of ColumnAttribute.

Parameters:
columnName - the column name.
Method Detail

getColumnName

public java.lang.String getColumnName()
Get the columnName


getColumnAttributeValue

public int getColumnAttributeValue()
Get the attribute value