| Modifier and Type | Field and Description |
|---|---|
static int |
M_ARRAY |
static int |
M_BIGDECIMAL |
static int |
M_BLOB |
static int |
M_BOOLEAN |
static int |
M_BYTES |
static int |
M_CLOB |
static int |
M_DOUBLE |
static int |
M_FLOAT |
static int |
M_INTEGER |
static int |
M_LONG |
static int |
M_OBJECT |
static int |
M_REF |
static int |
M_SQLDATE |
static int |
M_STRING |
static int |
M_TIME |
static int |
M_TIMESTAMP |
static int |
M_URL |
static int |
M_UTILDATE |
| Constructor and Description |
|---|
Column() |
| Modifier and Type | Method and Description |
|---|---|
void |
addForeignKey(Column col) |
void |
addImportedKey(Column col) |
Object |
clone() |
boolean |
columnFor(String type)
is this column described to be in the given type ?
check in sql2java.properties the table.[TABLENAME].in.[TYPE].exclude & table.[TABLENAME].in.[TYPE].include
|
int |
countForeignKeys() |
int |
countImportedKeys() |
String |
getCatalog() |
String |
getCheckingType() |
String |
getConstName() |
int |
getDecimalDigits() |
String |
getDefaultRules() |
String |
getDefaultValue() |
String |
getDefaultWidget() |
Column |
getForeignColumn() |
List |
getForeignKeys() |
String |
getFullName() |
List |
getImportedKeys() |
String |
getJavaPrimaryType()
return the primary java type of the current column
return null if no java primary type is available
|
String |
getJavaType()
return the java type of the current column
|
String |
getJavaTypeAsTypeName()
return the string representation of the column type
|
int |
getMappedType()
return internal type for the current column
|
String |
getName() |
int |
getNullable() |
String |
getNullableAsString() |
int |
getOrdinalPosition() |
String |
getPreparedStatementMethod(String var,
int pos)
Maps the SQL type for the column to a "set" method to call on
the PreparedStatement.
|
String |
getPreparedStatementMethod(String var,
String pos) |
String |
getPropertyTag() |
int |
getRadix() |
String |
getRemarks() |
String |
getResultSetMethodObject(String pos)
return the resultSet get method for a given position
the assumption is that the resultset variable is called rs
|
String |
getResultSetMethodObject(String resultSet,
String pos) |
String |
getSchema() |
int |
getSize() |
String |
getStringConvertionMethod()
method to convert the given string into the internal java representation
|
Table |
getTable() |
String |
getTableName() |
short |
getType() |
String |
getVarName() |
boolean |
hasCompareTo()
does this type has a compareTo method ?
|
boolean |
hasPrimaryType()
does this column has a primary java type like short, boolean instead of Integer and Boolean ?
|
boolean |
isColumnNumeric()
is this column numeric ?
|
boolean |
isForeignKey() |
boolean |
isImportedKey() |
boolean |
isPrimaryKey() |
void |
isPrimaryKey(boolean isPrimaryKey) |
boolean |
isString()
is this column a string ?
|
void |
setCatalog(String catalog) |
void |
setCheckingType(String strValue) |
void |
setDatabase(Database db) |
void |
setDecimalDigits(int decDigits) |
void |
setDefaultValue(String defaultValue) |
void |
setName(String name) |
void |
setNullable(int nullable) |
void |
setOrdinalPosition(int ordinal) |
void |
setRadix(int radix) |
void |
setRemarks(String remarks) |
void |
setSchema(String schema) |
void |
setSize(int size) |
void |
setTableName(String tableName) |
void |
setType(short type) |
String |
toString() |
boolean |
useEqualsInSetter()
does this type can use equal instead of the compareTo method ?
|
public static final int M_ARRAY
public static final int M_BIGDECIMAL
public static final int M_BOOLEAN
public static final int M_BYTES
public static final int M_CLOB
public static final int M_SQLDATE
public static final int M_UTILDATE
public static final int M_DOUBLE
public static final int M_FLOAT
public static final int M_BLOB
public static final int M_INTEGER
public static final int M_LONG
public static final int M_REF
public static final int M_STRING
public static final int M_TIME
public static final int M_TIMESTAMP
public static final int M_URL
public static final int M_OBJECT
public void setCheckingType(String strValue)
public String getCheckingType()
public void setDatabase(Database db)
public void setCatalog(String catalog)
public void setSchema(String schema)
public void setTableName(String tableName)
public void setName(String name)
public void setType(short type)
public void setSize(int size)
public void setDecimalDigits(int decDigits)
public void setRadix(int radix)
public void setNullable(int nullable)
public void setRemarks(String remarks)
public void setDefaultValue(String defaultValue)
public void setOrdinalPosition(int ordinal)
public void isPrimaryKey(boolean isPrimaryKey)
public String getCatalog()
public String getSchema()
public String getTableName()
public String getName()
public short getType()
public int getSize()
public int getDecimalDigits()
public int getRadix()
public int getNullable()
public String getNullableAsString()
public String getRemarks()
public String getDefaultValue()
public int getOrdinalPosition()
public boolean isPrimaryKey()
public String getFullName()
public String getConstName()
public Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic int getMappedType()
public String getJavaType()
public boolean hasPrimaryType()
public String getJavaPrimaryType() throws IllegalArgumentException
IllegalArgumentExceptionpublic String getJavaTypeAsTypeName()
public boolean isColumnNumeric()
public boolean isString()
public boolean hasCompareTo()
throws Exception
Exceptionpublic boolean useEqualsInSetter()
throws Exception
Exceptionpublic String getResultSetMethodObject(String pos)
public String getPreparedStatementMethod(String var, int pos)
var - Java code that represents how we'll get access to the
value to set. You should be able to use this value
verbatim. Check out the source to this method to
see what we mean.pos - The position to pass as the first argument of the set
method. You will be able to use this verbatim too.public String getStringConvertionMethod()
public String getDefaultWidget()
public Table getTable()
public void addForeignKey(Column col)
public List getForeignKeys()
public void addImportedKey(Column col)
public List getImportedKeys()
public int countImportedKeys()
public boolean isImportedKey()
public Column getForeignColumn()
public int countForeignKeys()
public boolean isForeignKey()
public String getPropertyTag()
public String getVarName()
public String getDefaultRules()
public boolean columnFor(String type)
Copyright © 2014. All Rights Reserved.