Class Oracle

All Implemented Interfaces:
Backend

@Service(Backend.class) public class Oracle extends Oracle8
Backend for Oracle versions 12 or newer.
Author:
harald
  • Constructor Details

    • Oracle

      public Oracle()
      Creates the Oracle backend.
  • Method Details

    • isDeprecated

      public boolean isDeprecated()
      Description copied from interface: Backend
      Returns whether this backend is deprecated and superseded by a newer implementation.
      Deprecated backends are omitted from BackendFactory.getAllBackends().
      Specified by:
      isDeprecated in interface Backend
      Overrides:
      isDeprecated in class Oracle8
      Returns:
      true if deprecated
    • getName

      public String getName()
      Description copied from interface: Backend
      Gets the name of the backend.
      Specified by:
      getName in interface Backend
      Overrides:
      getName in class Oracle8
      Returns:
      the name
    • validateVersion

      public void validateVersion(int databaseMajorVersion, int databaseMinorVersion)
      Description copied from interface: Backend
      Verifies that the major and minor version of the connection's metadata is compatible with this backend.
      If the latest backend is not compatible, the URL may be post-fixed with a backend type for an older version, for example:
         jdbc:oracle:thin:@//localhost:1521/xe|Oracle8
       

      Throws BackendException if incompatible.

      Specified by:
      validateVersion in interface Backend
      Overrides:
      validateVersion in class AbstractBackend
      Parameters:
      databaseMajorVersion - the major version
      databaseMinorVersion - the minor version
      See Also:
    • buildSelectSql

      public void buildSelectSql(StringBuilder sqlBuilder, boolean writeLock, int limit, int offset)
      Description copied from interface: Backend
      Creates a select statement string from an inner sql string.

      sqlBuilder is anything as [SELECT] FROM... WHERE... ORDER BY....
      It is decorated with a leading SELECT, if missing, plus optional clauses like for the given parameters.

      Specified by:
      buildSelectSql in interface Backend
      Overrides:
      buildSelectSql in class Oracle8
      Parameters:
      sqlBuilder - the sql builder, initially containing the inner sql without leading SELECT.
      writeLock - true select should write lock
      limit - the limit value, ≤ 0 if no limit clause
      offset - the offset value, ≤ 0 if no offset clause
    • extractWhereClause

      protected String extractWhereClause(String sql, int whereOffset)
      Description copied from class: AbstractBackend
      Extracts the where clause from a given sql.
      Overrides:
      extractWhereClause in class Oracle8
      Parameters:
      sql - the sql statement
      whereOffset - the location of WHERE in sql
      Returns:
      the where clause without the keyword WHERE