Package adams.db.types
Class ColumnType
- java.lang.Object
-
- adams.db.types.ColumnType
-
- Direct Known Subclasses:
AutoIncrementType
public class ColumnType extends Object
SQL column type.- Author:
- dale
-
-
Constructor Summary
Constructors Constructor Description ColumnType(int type)
Constructor.ColumnType(int type, int size)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equivalentTo(AbstractDatabaseConnection conn, ColumnType type)
True if given type if equivalent to this object.String
getCompareType(AbstractDatabaseConnection conn)
Get a string representation of this type for comparison purposes.String
getCreateType(AbstractDatabaseConnection conn)
Get String for creating this type.int
getSize()
Returns the size.int
getType()
Returns the type.boolean
isEncompassed(AbstractDatabaseConnection conn, ColumnType type)
True if given type if encompassed to this object, ie if this type is at most the size of the provided one.String
toString()
toString.
-
-
-
Method Detail
-
getType
public int getType()
Returns the type.- Returns:
- the type
-
getSize
public int getSize()
Returns the size.- Returns:
- the size
-
getCompareType
public String getCompareType(AbstractDatabaseConnection conn)
Get a string representation of this type for comparison purposes.- Returns:
- string representation of this type
-
equivalentTo
public boolean equivalentTo(AbstractDatabaseConnection conn, ColumnType type)
True if given type if equivalent to this object.- Parameters:
type
- sql type- Returns:
- equivalent?
-
isEncompassed
public boolean isEncompassed(AbstractDatabaseConnection conn, ColumnType type)
True if given type if encompassed to this object, ie if this type is at most the size of the provided one.- Parameters:
type
- sql type- Returns:
- encompassed
-
getCreateType
public String getCreateType(AbstractDatabaseConnection conn)
Get String for creating this type.- Returns:
- creation string
-
-