org.eclipse.jetty.server.session
Class JDBCSessionIdManager.DatabaseAdaptor
java.lang.Object
org.eclipse.jetty.server.session.JDBCSessionIdManager.DatabaseAdaptor
- Enclosing class:
- JDBCSessionIdManager
public class JDBCSessionIdManager.DatabaseAdaptor
- extends java.lang.Object
DatabaseAdaptor
Handles differences between databases.
Postgres uses the getBytes and setBinaryStream methods to access
a "bytea" datatype, which can be up to 1Gb of binary data. MySQL
is happy to use the "blob" type and getBlob() methods instead.
TODO if the differences become more major it would be worthwhile
refactoring this class.
Method Summary |
java.lang.String |
convertIdentifier(java.lang.String identifier)
Convert a camel case identifier into either upper or lower
depending on the way the db stores identifiers. |
java.io.InputStream |
getBlobInputStream(java.sql.ResultSet result,
java.lang.String columnName)
|
java.lang.String |
getBlobType()
|
java.lang.String |
getDBName()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDBCSessionIdManager.DatabaseAdaptor
public JDBCSessionIdManager.DatabaseAdaptor(java.sql.DatabaseMetaData dbMeta)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
convertIdentifier
public java.lang.String convertIdentifier(java.lang.String identifier)
- Convert a camel case identifier into either upper or lower
depending on the way the db stores identifiers.
- Parameters:
identifier
-
- Returns:
- the converted identifier
getDBName
public java.lang.String getDBName()
getBlobType
public java.lang.String getBlobType()
getBlobInputStream
public java.io.InputStream getBlobInputStream(java.sql.ResultSet result,
java.lang.String columnName)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.