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

    Constructors
    Constructor and Description
    `JDBCSessionIdManager.DatabaseAdaptor(DatabaseMetaData dbMeta)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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()`
    `String` | `getLongType()`
    `String` | `getRowIdColumnName()` rowId is a reserved word for Oracle, so change the name of this column

    - ### 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()

    - #### getLongType

          public String getLongType()

    - #### getBlobInputStream

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

      Throws:
        `SQLException`

    - #### getRowIdColumnName

          public String getRowIdColumnName()

      rowId is a reserved word for Oracle, so change the name of this column
      Returns:

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