public class DBMetaData<T> extends AbstractMetaData<T>
Modifier and Type | Field and Description |
---|---|
protected boolean[] |
autoIncrement |
protected java.lang.String[] |
catalogName |
protected java.lang.String[] |
columnClassName |
protected int[] |
columnDisplaySize |
protected java.lang.String[] |
columnLabel |
protected java.lang.String[] |
columnName |
protected int[] |
columnType |
protected java.lang.String[] |
columnTypeName |
protected java.lang.String[] |
fullColumnName |
protected java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
primaryKeyMap |
protected java.lang.String[] |
schemaName |
protected java.lang.String[] |
tableName |
protected java.util.Map<java.lang.String,java.lang.String[]> |
tables |
protected java.util.Map<java.lang.String,java.lang.reflect.Method> |
uniqueIdWriteMethods |
caseSensitive, currency, definitelyWritable, domainClass, fieldClass, fieldClassName, fieldCount, fieldLabel, fieldName, logger, mapping, nullable, precision, readMethod, readOnly, scale, searchable, signed, throwMissingFieldException, writable, writeMethod
Constructor and Description |
---|
DBMetaData() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCatalogName(int columnIndex)
Gets the designated column's table's catalog name.
|
java.lang.String |
getColumnClassName(int columnIndex)
Returns the fully-qualified name of the Java class whose instances are manufactured if the method
ResultSet.getObject is called to retrieve a value from the column. |
int |
getColumnDisplaySize(int columnIndex)
Indicates the designated column's normal maximum width in characters.
|
int |
getColumnIndexByColumnName(java.lang.String columnName) |
int |
getColumnIndexByFullColumnName(java.lang.String fullColumnNameParam) |
java.lang.String |
getColumnLabel(int columnIndex)
Gets the designated column's suggested title for use in printouts and displays.
|
java.lang.String |
getColumnName(int columnIndex)
Get the designated column's name.
|
int |
getColumnType(int columnIndex)
Retrieves the designated column's SQL type.
|
java.lang.String |
getColumnTypeName(int columnIndex)
Retrieves the designated column's database-specific type name.
|
java.lang.String |
getFullColumnName(int columnIndex) |
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
getPrimaryKeyMap() |
java.lang.String |
getSchemaName(int columnIndex)
Get the designated column's table's schema.
|
java.lang.String |
getTableName(int columnIndex)
Gets the designated column's table name.
|
java.util.Map<java.lang.String,java.lang.String[]> |
getTables() |
java.util.Map<java.lang.String,java.lang.reflect.Method> |
getUniqueIdWriteMethods() |
boolean |
isAutoIncrement(int columnIndex)
Indicates whether the designated column is automatically numbered, thus read-only.
|
void |
populate(java.util.Map<java.lang.String,java.lang.String> mapping,
java.lang.Class domainClass) |
void |
setAutoIncrement(int columnIndex,
boolean property)
Sets whether the designated column is automatically numbered, and thus read-only.
|
void |
setCatalogName(int columnIndex,
java.lang.String catalogName)
Sets the designated column's table's catalog name, if any, to the given
String . |
void |
setColumnClassName(int columnIndex,
java.lang.String columnClassName) |
void |
setColumnDisplaySize(int columnIndex,
int size)
Sets the designated column's normal maximum width in chars to the given
int . |
void |
setColumnLabel(int columnIndex,
java.lang.String label)
Sets the suggested column title for use in printouts and displays, if any, to the given
String . |
void |
setColumnName(int columnIndex,
java.lang.String columnName)
Sets the name of the designated column to the given
String . |
void |
setColumnType(int columnIndex,
int SQLType)
Sets the designated column's SQL type to the one given.
|
void |
setColumnTypeName(int columnIndex,
java.lang.String typeName)
Sets the designated column's type name that is specific to the data source, if any, to the given
String . |
void |
setFullColumnName(int columnIndex,
java.lang.String columnName) |
void |
setSchemaName(int columnIndex,
java.lang.String schemaName)
Sets the name of the designated column's table's schema, if any, to the given
String . |
void |
setTableName(int columnIndex,
java.lang.String tableName)
Sets the designated column's table name, if any, to the given
String . |
void |
setTables(java.util.Map<java.lang.String,java.lang.String[]> tables) |
java.lang.String |
toString() |
getDomainClass, getFieldClass, getFieldClassName, getFieldCount, getFieldIndexByFieldName, getFieldLabel, getFieldName, getMapping, getPrecision, getReadMethod, getScale, getWriteMethod, isCaseSensitive, isCurrency, isDefinitelyWritable, isNullable, isPopulated, isReadOnly, isSearchable, isSigned, isThrowMissingFieldException, isWritable, populateReadMethod, populateWriteMethod, setCaseSensitive, setCurrency, setDefinitelyWritable, setFieldClass, setFieldClassName, setFieldCount, setFieldLabel, setFieldName, setNullable, setPrecision, setReadMethod, setReadOnly, setScale, setSearchable, setSigned, setThrowMissingFieldException, setWritable, setWriteMethod, toLabel
protected int[] columnDisplaySize
protected int[] columnType
protected java.lang.String[] catalogName
protected java.lang.String[] schemaName
protected java.lang.String[] tableName
protected java.lang.String[] columnClassName
protected java.lang.String[] columnLabel
protected java.lang.String[] columnName
protected java.lang.String[] columnTypeName
protected java.lang.String[] fullColumnName
protected boolean[] autoIncrement
protected java.util.Map<java.lang.String,java.lang.String[]> tables
protected java.util.Map<java.lang.String,java.util.Set<java.lang.String>> primaryKeyMap
protected java.util.Map<java.lang.String,java.lang.reflect.Method> uniqueIdWriteMethods
public java.lang.String getCatalogName(int columnIndex) throws DataAccessException
DataAccessException
- if a database access error occurspublic java.lang.String getColumnClassName(int columnIndex) throws DataAccessException
Returns the fully-qualified name of the Java class whose instances are manufactured if the method
ResultSet.getObject
is called to retrieve a value from the column.
ResultSet.getObject
may return a subclass of the class returned by this method.
ResultSet.getObject
to retrieve the value in the specified column.
This is the class name used for custom mapping.DataAccessException
- if a database access error occurspublic int getColumnDisplaySize(int columnIndex) throws DataAccessException
DataAccessException
- if a database access error occurspublic java.lang.String getColumnLabel(int columnIndex) throws DataAccessException
DataAccessException
- if a database access error occurspublic java.lang.String getColumnName(int columnIndex) throws DataAccessException
DataAccessException
- if a database access error occurspublic int getColumnType(int columnIndex) throws DataAccessException
DataAccessException
- if a database access error occursTypes
public java.lang.String getColumnTypeName(int columnIndex) throws DataAccessException
DataAccessException
- if a database access error occurspublic java.lang.String getSchemaName(int columnIndex) throws DataAccessException
DataAccessException
- if a database access error occurspublic java.lang.String getTableName(int columnIndex) throws DataAccessException
DataAccessException
- if a database access error occurspublic boolean isAutoIncrement(int columnIndex) throws DataAccessException
true
if so; false
otherwiseDataAccessException
- if a database access error occurspublic void setAutoIncrement(int columnIndex, boolean property) throws DataAccessException
RowSet
object's columns not to be automatically numbered.property
- true
if the column is automatically numbered; false
if it is notDataAccessException
- if a database access error occurspublic void setCatalogName(int columnIndex, java.lang.String catalogName) throws DataAccessException
String
.catalogName
- the column's catalog nameDataAccessException
- if a database access error occurspublic void setColumnDisplaySize(int columnIndex, int size) throws DataAccessException
int
.size
- the normal maximum number of characters for the designated columnDataAccessException
- if a database access error occurspublic void setColumnLabel(int columnIndex, java.lang.String label) throws DataAccessException
String
.label
- the column titleDataAccessException
- if a database access error occurspublic void setColumnName(int columnIndex, java.lang.String columnName) throws DataAccessException
String
.columnName
- the designated column's nameDataAccessException
- if a database access error occurspublic void setColumnType(int columnIndex, int SQLType) throws DataAccessException
SQLType
- the column's SQL typeDataAccessException
- if a database access error occursTypes
public void setColumnTypeName(int columnIndex, java.lang.String typeName) throws DataAccessException
String
.typeName
- data source specific type name.DataAccessException
- if a database access error occurspublic void setSchemaName(int columnIndex, java.lang.String schemaName) throws DataAccessException
String
.schemaName
- the schema nameDataAccessException
- if a database access error occurspublic void setTableName(int columnIndex, java.lang.String tableName) throws DataAccessException
String
.tableName
- the column's table nameDataAccessException
- if a database access error occurspublic void setColumnClassName(int columnIndex, java.lang.String columnClassName)
public java.util.Map<java.lang.String,java.lang.String[]> getTables()
public void setTables(java.util.Map<java.lang.String,java.lang.String[]> tables)
public java.lang.String getFullColumnName(int columnIndex) throws DataAccessException
DataAccessException
public void setFullColumnName(int columnIndex, java.lang.String columnName) throws DataAccessException
DataAccessException
public void populate(java.util.Map<java.lang.String,java.lang.String> mapping, java.lang.Class domainClass) throws DataAccessException
DataAccessException
public int getColumnIndexByColumnName(java.lang.String columnName)
public int getColumnIndexByFullColumnName(java.lang.String fullColumnNameParam)
public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getPrimaryKeyMap()
public java.util.Map<java.lang.String,java.lang.reflect.Method> getUniqueIdWriteMethods()
public java.lang.String toString()
toString
in class java.lang.Object