Class Hierarchy Previous Next Index
Class COM.cloudscape.vti.VTIMetaDataTemplate
java.lang.Object
|
+----COM.cloudscape.vti.VTIMetaDataTemplate
- public abstract class VTIMetaDataTemplate
- extends java.lang.Object
- implements java.sql.ResultSetMetaData
Copyright © 1998-2000, Informix Software, Inc. All rights reserved.
An abstract implementation of ResultSetMetaData (JDK1.1/JDBC 1.2) that is useful
when writing a VTI (virtual table interface). This class implements
most of the methods of ResultSetMetaData, each one throwing a SQLException
with the name of the method. A concrete sub-class can then just implement
the methods not implemented here and override any methods it needs
to implement for correct functionality.
The methods not implemented here are
- getColumnCount()
- getColumnType()
A VTI implementation must provide an implementation of the methods
in this class.
VTIMetaDataTemplate()
-
getCatalogName(int)
- What's a column's table's catalog name?
getColumnDisplaySize(int)
- What's the column's normal maximum width in chars?
getColumnLabel(int)
- What's the suggested column title for use in printouts and
displays?
getColumnName(int)
- What's a column's name?
getColumnTypeName(int)
- What's a column's data source specific type name?
getPrecision(int)
- How many decimal digits are in the column?
getScale(int)
- What's a column's number of digits to the right of the decimal point?
getSchemaName(int)
- What's a column's table's schema?
getTableName(int)
- What's a column's table name?
isAutoIncrement(int)
- Is the column automatically numbered, and thus read-only?
isCaseSensitive(int)
- Does a column's case matter?
isCurrency(int)
- Is the column a cash value?
isDefinitelyWritable(int)
- Will a write on the column definitely succeed?
isNullable(int)
- Can you put a NULL in this column?
isReadOnly(int)
- Is a column definitely not writable?
isSearchable(int)
- Can the column be used in a WHERE clause?
isSigned(int)
- Is the column a signed number?
isWritable(int)
- Is it possible for a write on the column to succeed?
VTIMetaDataTemplate
public VTIMetaDataTemplate()
isAutoIncrement
public boolean isAutoIncrement(int column) throws java.sql.SQLException
Is the column automatically numbered, and thus read-only?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- true if the column is automatically numbered
- Throws:
- java.sql.SQLException - if a database-access error occurs.
isCaseSensitive
public boolean isCaseSensitive(int column) throws java.sql.SQLException
Does a column's case matter?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- true if the column is case-sensitive
- Throws:
- java.sql.SQLException - if a database-access error occurs.
isSearchable
public boolean isSearchable(int column) throws java.sql.SQLException
Can the column be used in a WHERE clause?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- true if the column is searchable
- Throws:
- java.sql.SQLException - if a database-access error occurs.
isCurrency
public boolean isCurrency(int column) throws java.sql.SQLException
Is the column a cash value?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- true if the column is a cash value
- Throws:
- java.sql.SQLException - if a database-access error occurs.
isNullable
public int isNullable(int column) throws java.sql.SQLException
Can you put a NULL in this column?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- columnNoNulls, columnNullable or columnNullableUnknown
- Throws:
- java.sql.SQLException - if a database-access error occurs.
isSigned
public boolean isSigned(int column) throws java.sql.SQLException
Is the column a signed number?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- true if the column is a signed number
- Throws:
- java.sql.SQLException - if a database-access error occurs.
getColumnDisplaySize
public int getColumnDisplaySize(int column) throws java.sql.SQLException
What's the column's normal maximum width in chars?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- the column's maximum width
- Throws:
- java.sql.SQLException - if a database-access error occurs.
getColumnLabel
public java.lang.String getColumnLabel(int column) throws java.sql.SQLException
What's the suggested column title for use in printouts and
displays?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- the column's title
- Throws:
- java.sql.SQLException - if a database-access error occurs.
getColumnName
public java.lang.String getColumnName(int column) throws java.sql.SQLException
What's a column's name?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- column name
- Throws:
- java.sql.SQLException - if a database-access error occurs.
getSchemaName
public java.lang.String getSchemaName(int column) throws java.sql.SQLException
What's a column's table's schema?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- schema name or "" if not applicable
- Throws:
- java.sql.SQLException - if a database-access error occurs.
getPrecision
public int getPrecision(int column) throws java.sql.SQLException
How many decimal digits are in the column?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- the column's precision
- Throws:
- java.sql.SQLException - if a database-access error occurs.
getScale
public int getScale(int column) throws java.sql.SQLException
What's a column's number of digits to the right of the decimal point?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- the column's scale
- Throws:
- java.sql.SQLException - if a database-access error occurs.
getTableName
public java.lang.String getTableName(int column) throws java.sql.SQLException
What's a column's table name?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- the column's table name or "" if not applicable
- Throws:
- java.sql.SQLException - if a database-access error occurs.
getCatalogName
public java.lang.String getCatalogName(int column) throws java.sql.SQLException
What's a column's table's catalog name?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- the column's table's catalog name or "" if not applicable.
- Throws:
- java.sql.SQLException - if a database-access error occurs.
getColumnTypeName
public java.lang.String getColumnTypeName(int column) throws java.sql.SQLException
What's a column's data source specific type name?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- the column's type name
- Throws:
- java.sql.SQLException - if a database-access error occurs.
isReadOnly
public boolean isReadOnly(int column) throws java.sql.SQLException
Is a column definitely not writable?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- true - vti's are read only
false - column is not read-only
- Throws:
- java.sql.SQLException - if a database-access error occurs.
isWritable
public boolean isWritable(int column) throws java.sql.SQLException
Is it possible for a write on the column to succeed?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- true if column is possibly writable
- Throws:
- java.sql.SQLException - if a database-access error occurs.
isDefinitelyWritable
public boolean isDefinitelyWritable(int column) throws java.sql.SQLException
Will a write on the column definitely succeed?
- Parameters:
column
- the first column is 1, the second is 2, ...
- Returns:
- true if column is definitely writable
- Throws:
- java.sql.SQLException - if a database-access error occurs.
Class Hierarchy Previous Next Index