adams.data.spreadsheet
Class SqlUtils

java.lang.Object
  extended by adams.data.spreadsheet.SqlUtils

public class SqlUtils
extends Object

Helper class for SQL related functionality for spreadsheets.

Version:
$Revision: 7087 $
Author:
fracpete (fracpete at waikato dot ac dot nz)

Nested Class Summary
static class SqlUtils.Reader
          For reading data from a database.
static class SqlUtils.Writer
          For writing data to a database.
 
Constructor Summary
SqlUtils()
           
 
Method Summary
static int contentTypeToSqlType(Cell.ContentType contentType)
          Returns the SQL type corresponding to the cell content type.
static Cell.ContentType sqlTypeToContentType(int colType)
          Determines the Cell.ContentType from the SQL column type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlUtils

public SqlUtils()
Method Detail

sqlTypeToContentType

public static Cell.ContentType sqlTypeToContentType(int colType)
Determines the Cell.ContentType from the SQL column type. See Types.

Parameters:
colType - the SQL column type to interpret
Returns:
the type, default is Cell.ContentType.STRING

contentTypeToSqlType

public static int contentTypeToSqlType(Cell.ContentType contentType)
Returns the SQL type corresponding to the cell content type.

Parameters:
contentType - the type to convert
Returns:
the associated SQL type
See Also:
Types


Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.