## 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 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.

Constructor Summary
`JDBCSessionIdManager.DatabaseAdaptor(DatabaseMetaData dbMeta)`

Method Summary
`String` `convertIdentifier(String identifier)` Convert a camel case identifier into either upper or lower depending on the way the db stores identifiers.
`InputStream` `getBlobInputStream(ResultSet result, String columnName)`
`String` `getBlobType()`
`String` `getDBName()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JDBCSessionIdManager.DatabaseAdaptor

    public JDBCSessionIdManager.DatabaseAdaptor(DatabaseMetaData dbMeta)
                                         throws SQLException

Throws:
  `SQLException`

Method Detail

### convertIdentifier

    public String convertIdentifier(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 String getDBName()

### getBlobType

    public String getBlobType()

### getBlobInputStream

    public InputStream getBlobInputStream(ResultSet result,
                                          String columnName)
                                   throws SQLException

  Throws:
    `SQLException`

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.