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 booleanequivalentTo(AbstractDatabaseConnection conn, ColumnType type)True if given type if equivalent to this object.StringgetCompareType(AbstractDatabaseConnection conn)Get a string representation of this type for comparison purposes.StringgetCreateType(AbstractDatabaseConnection conn)Get String for creating this type.intgetSize()Returns the size.intgetType()Returns the type.booleanisEncompassed(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.StringtoString()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
-
-