|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.cjdbc.driver.Field
Field is a class used to describe fields in a ResultSet
.
For instance, this is just a dirty copy/paste from the MySQL driver by Mark Matthews ! Implementation has to be completly checked and revised.
ResultSet
,
Serialized FormField Summary | |
private java.lang.String |
columnClassName
|
private int |
columnDisplaySize
|
private java.lang.String |
fieldName
|
private boolean |
isAutoIncrement
|
private boolean |
isCaseSensitive
|
private boolean |
isCurrency
|
private boolean |
isDefinitelyWritable
|
private int |
isNullable
|
private boolean |
isReadOnly
|
private boolean |
isSearchable
|
private boolean |
isSigned
|
private boolean |
isWritable
|
private int |
precision
|
private int |
scale
|
private int |
sqlType
|
private java.lang.String |
tableName
|
private java.lang.String |
typeName
|
Constructor Summary | |
Field(java.lang.String table,
java.lang.String name,
int columnDisplaySize,
int sqlType,
java.lang.String typeName,
java.lang.String columnClassName)
Create a new field with some default common values. |
|
Field(java.lang.String table,
java.lang.String name,
int columnDisplaySize,
int sqlType,
java.lang.String typeName,
java.lang.String columnClassName,
boolean isAutoIncrement,
boolean isCaseSensitive,
boolean isCurrency,
int isNullable,
boolean isReadOnly,
boolean isWritable,
boolean isDefinitelyWritable,
boolean isSearchable,
boolean isSigned,
int precision,
int scale)
Creates a new Field instance. |
Method Summary | |
java.lang.String |
getColumnClassName()
|
int |
getColumnDisplaySize()
|
java.lang.String |
getFieldName()
Gets the field name. |
java.lang.String |
getFullName()
Gets the full name: "tableName.fieldName" |
int |
getPrecision()
|
int |
getScale()
|
int |
getSqlType()
Returns the SQL type. |
java.lang.String |
getTableName()
Gets the table name. |
java.lang.String |
getTypeName()
Returns the SQL type name. |
boolean |
isAutoIncrement()
|
boolean |
isCaseSensitive()
|
boolean |
isCurrency()
|
boolean |
isDefinitelyWritable()
|
int |
isNullable()
|
boolean |
isReadOnly()
|
boolean |
isSearchable()
|
boolean |
isSigned()
|
boolean |
isWritable()
|
void |
setFieldName(java.lang.String name)
Sets the field name. |
java.lang.String |
toString()
Returns the full name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private int scale
private int precision
private boolean isSigned
private boolean isSearchable
private boolean isDefinitelyWritable
private boolean isWritable
private boolean isReadOnly
private int isNullable
private boolean isCurrency
private boolean isCaseSensitive
private boolean isAutoIncrement
private java.lang.String tableName
private java.lang.String fieldName
private int columnDisplaySize
private int sqlType
private java.lang.String typeName
private java.lang.String columnClassName
Constructor Detail |
public Field(java.lang.String table, java.lang.String name, int columnDisplaySize, int sqlType, java.lang.String typeName, java.lang.String columnClassName)
table
- the table namename
- the field namecolumnDisplaySize
- the column display sizesqlType
- the SQL typetypeName
- the type namecolumnClassName
- the column class namepublic Field(java.lang.String table, java.lang.String name, int columnDisplaySize, int sqlType, java.lang.String typeName, java.lang.String columnClassName, boolean isAutoIncrement, boolean isCaseSensitive, boolean isCurrency, int isNullable, boolean isReadOnly, boolean isWritable, boolean isDefinitelyWritable, boolean isSearchable, boolean isSigned, int precision, int scale)
Field
instance.
table
- the table namename
- the field namecolumnDisplaySize
- the column display sizesqlType
- the SQL typetypeName
- the type namecolumnClassName
- the column class nameisAutoIncrement
- true if field is auto incrementedisCaseSensitive
- true if field is case sensitiveisCurrency
- true if field is currencyisNullable
- indicates the nullability of the fieldisReadOnly
- true if field is read onlyisWritable
- true if field is writableisDefinitelyWritable
- true if field is definetly writableisSearchable
- true if field is searchableisSigned
- true if field is signedprecision
- decimal precisionscale
- number of digits to right of decimal pointMethod Detail |
public java.lang.String getTableName()
String
valuepublic java.lang.String getFieldName()
String
valuesetFieldName(java.lang.String)
public java.lang.String getFullName()
String
valuepublic void setFieldName(java.lang.String name)
name
- the new field namegetFieldName()
public java.lang.String toString()
String
valuegetFullName()
public int getSqlType()
Types
public java.lang.String getTypeName()
public java.lang.String getColumnClassName()
ResultSetMetaData.getColumnClassName(int)
public int getColumnDisplaySize()
ResultSetMetaData.getColumnDisplaySize(int)
public boolean isAutoIncrement()
ResultSetMetaData.isAutoIncrement(int)
public boolean isCaseSensitive()
ResultSetMetaData.isCaseSensitive(int)
public boolean isCurrency()
ResultSetMetaData.isCurrency(int)
public boolean isDefinitelyWritable()
ResultSetMetaData.isDefinitelyWritable(int)
public int isNullable()
ResultSetMetaData.isNullable(int)
public boolean isReadOnly()
ResultSetMetaData.isReadOnly(int)
public boolean isWritable()
ResultSetMetaData.isWritable(int)
public boolean isSearchable()
ResultSetMetaData.isSearchable(int)
public boolean isSigned()
ResultSetMetaData.isSigned(int)
public int getPrecision()
ResultSetMetaData.getPrecision(int)
public int getScale()
ResultSetMetaData.getScale(int)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |