Java Reference
In-Depth Information
result = (result % 0xffff);
return result;
}
/**
* Return the size of the specified column.
*
* @param table
* The table that contains the column.
* @param column
* The column to get the size for.
* @return The size of the column.
* @throws SQLException
* For SQL errors.
*/
public int getColumnSize(String table, String column)
throws SQLException
{
ResultSet rs =
this.connection.getMetaData().getColumns(null, null, table,
null);
while (rs.next())
{
String c = rs.getString("COLUMN_NAME");
int size = rs.getInt("COLUMN_SIZE");
if (c.equalsIgnoreCase(column))
{
return size;
}
}
return -1;
}
/**
* Get the host name associated with the specified host
* id.
*
* @param hostID
* The host id to look up.
* @return The name of the host.
* @throws WorkloadException
* Thrown if unable to obtain the host name.
*/
private String getHost(int hostID) throws WorkloadException
{
Search WWH ::




Custom Search