Class DatabaseAdaptor

java.lang.Object
org.eclipse.jetty.server.session.DatabaseAdaptor

@Deprecated(since="2021-05-27") public class DatabaseAdaptor extends Object
Deprecated.
The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
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.
  • Constructor Details

    • DatabaseAdaptor

      public DatabaseAdaptor()
      Deprecated.
  • Method Details

    • adaptTo

      public void adaptTo(DatabaseMetaData dbMeta) throws SQLException
      Deprecated.
      Throws:
      SQLException
    • setBlobType

      public void setBlobType(String blobType)
      Deprecated.
    • getBlobType

      public String getBlobType()
      Deprecated.
    • setLongType

      public void setLongType(String longType)
      Deprecated.
    • getLongType

      public String getLongType()
      Deprecated.
    • setStringType

      public void setStringType(String stringType)
      Deprecated.
    • getStringType

      public String getStringType()
      Deprecated.
    • convertIdentifier

      public String convertIdentifier(String identifier)
      Deprecated.
      Convert a camel case identifier into either upper or lower depending on the way the db stores identifiers.
      Parameters:
      identifier - the raw identifier
      Returns:
      the converted identifier
    • getDBName

      public String getDBName()
      Deprecated.
    • getBlobInputStream

      public InputStream getBlobInputStream(ResultSet result, String columnName) throws SQLException
      Deprecated.
      Throws:
      SQLException
    • isEmptyStringNull

      public boolean isEmptyStringNull()
      Deprecated.
    • isRowIdReserved

      public boolean isRowIdReserved()
      Deprecated.
      rowId is a reserved word for Oracle, so change the name of this column
      Returns:
      true if db in use is oracle
    • setDriverInfo

      public void setDriverInfo(String driverClassName, String connectionUrl)
      Deprecated.
      Configure jdbc connection information via a jdbc Driver
      Parameters:
      driverClassName - the driver classname
      connectionUrl - the driver connection url
    • setDriverInfo

      public void setDriverInfo(Driver driverClass, String connectionUrl)
      Deprecated.
      Configure jdbc connection information via a jdbc Driver
      Parameters:
      driverClass - the driver class
      connectionUrl - the driver connection url
    • setDatasource

      public void setDatasource(DataSource ds)
      Deprecated.
    • setDatasourceName

      public void setDatasourceName(String jndi)
      Deprecated.
    • getDatasourceName

      public String getDatasourceName()
      Deprecated.
    • getDatasource

      public DataSource getDatasource()
      Deprecated.
    • getDriverClassName

      public String getDriverClassName()
      Deprecated.
    • getDriver

      public Driver getDriver()
      Deprecated.
    • getConnectionUrl

      public String getConnectionUrl()
      Deprecated.
    • initialize

      public void initialize() throws Exception
      Deprecated.
      Throws:
      Exception
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object
      See Also: