org.opennms.netmgt.dao.db
Class Column

java.lang.Object
  extended by org.opennms.netmgt.dao.db.Column

public class Column
extends Object


Constructor Summary
Column()
           
 
Method Summary
 int columnTypeSize(String type)
          columnTypeSize
 boolean equals(Object obj)
          
 int getColumnSqlType()
          getColumnSqlType
 String getDefaultValue()
          getDefaultValue
 String getName()
          getName
 int getSize()
          getSize
 String getType()
          getType
 boolean hasDefaultValue()
          hasDefaultValue
 int hashCode()
          hashCode
 boolean isNotNull()
          isNotNull
static String normalizeColumnType(String column, boolean hasSize)
          normalizeColumnType
 void parse(String column)
          parse
 void parseColumnType(String columnType)
          parseColumnType
 void setDefaultValue(String defaultValue)
          setDefaultValue
 void setName(String name)
          setName
 void setNotNull(boolean notNull)
          setNotNull
 void setSize(int size)
          setSize
 void setType(String type)
          setType
 String toString()
          toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Column

public Column()
Method Detail

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

hashCode

Overrides:
hashCode in class Object
Returns:
a int.

toString

public String toString()

toString

Overrides:
toString in class Object
Returns:
a String object.

getName

public String getName()

getName

Returns:
a String object.

setName

public void setName(String name)

setName

Parameters:
name - a String object.

isNotNull

public boolean isNotNull()

isNotNull

Returns:
a boolean.

setNotNull

public void setNotNull(boolean notNull)

setNotNull

Parameters:
notNull - a boolean.

getSize

public int getSize()

getSize

Returns:
a int.

setSize

public void setSize(int size)

setSize

Parameters:
size - a int.

getType

public String getType()

getType

Returns:
a String object.

setType

public void setType(String type)

setType

Parameters:
type - a String object.

getDefaultValue

public String getDefaultValue()

getDefaultValue

Returns:
a String object.

hasDefaultValue

public boolean hasDefaultValue()

hasDefaultValue

Returns:
a boolean.

setDefaultValue

public void setDefaultValue(String defaultValue)

setDefaultValue

Parameters:
defaultValue - a String object.

parse

public void parse(String column)
           throws Exception

parse

Parameters:
column - a String object.
Throws:
Exception - if any.

parseColumnType

public void parseColumnType(String columnType)
                     throws Exception

parseColumnType

Parameters:
columnType - a String object.
Throws:
Exception - if any.

getColumnSqlType

public int getColumnSqlType()
                     throws Exception

getColumnSqlType

Returns:
a int.
Throws:
Exception - if any.

normalizeColumnType

public static String normalizeColumnType(String column,
                                         boolean hasSize)
                                  throws Exception

normalizeColumnType

Parameters:
column - a String object.
hasSize - a boolean.
Returns:
a String object.
Throws:
Exception - if any.

columnTypeSize

public int columnTypeSize(String type)
                   throws Exception

columnTypeSize

Parameters:
type - a String object.
Returns:
a int.
Throws:
Exception - if any.


Copyright © 2011. All Rights Reserved.