Class Oracle12Platform

  • All Implemented Interfaces:
    Serializable, Cloneable, org.eclipse.persistence.internal.core.databaseaccess.CorePlatform<org.eclipse.persistence.internal.helper.ConversionManager>, org.eclipse.persistence.internal.databaseaccess.Platform
    Direct Known Subclasses:
    Oracle18Platform

    public class Oracle12Platform
    extends Oracle11Platform

    Purpose: Supports usage of certain Oracle JDBC specific APIs for the Oracle 12 database.
    Identity column:
    GENERATED [ ALWAYS | BY DEFAULT [ ON NULL ] ] AS IDENTITY [ ( identity_options ) ]

    See Also:
    Serialized Form
    • Constructor Detail

      • Oracle12Platform

        public Oracle12Platform()
    • Method Detail

      • isOracle12

        public boolean isOracle12()
        INTERNAL: Check whether current platform is Oracle 12c or later.
        Specified by:
        isOracle12 in interface org.eclipse.persistence.internal.databaseaccess.Platform
        Overrides:
        isOracle12 in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
        Returns:
        Always returns true for instances of Oracle 12c platform.
        Since:
        2.7
      • initIdentitySequences

        public void initIdentitySequences​(Session session,
                                          String defaultIdentityGenerator)
        INTERNAL: Initialize platform specific identity sequences.
        Specified by:
        initIdentitySequences in interface org.eclipse.persistence.internal.databaseaccess.Platform
        Overrides:
        initIdentitySequences in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
        Parameters:
        session - Active database session (in connected state).
        defaultIdentityGenerator - Default identity generator sequence name.
        Since:
        2.7
      • removeIdentitySequences

        public void removeIdentitySequences​(Session session,
                                            String defaultIdentityGenerator,
                                            Set<String> tableNames)
        INTERNAL: Remove platform specific identity sequence for specified table. Default identity sequence is restored.
        Specified by:
        removeIdentitySequences in interface org.eclipse.persistence.internal.databaseaccess.Platform
        Overrides:
        removeIdentitySequences in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
        Parameters:
        session - Active database session (in connected state).
        defaultIdentityGenerator - Default identity generator sequence name.
        tableNames - Set of table names to check for identity sequence removal.
        Since:
        2.7
      • printFieldIdentityClause

        public void printFieldIdentityClause​(Writer writer)
                                      throws ValidationException
        INTERNAL: Append the receiver's field 'identity' constraint clause to a writer.
        Overrides:
        printFieldIdentityClause in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        Parameters:
        writer - Target writer.
        Throws:
        ValidationException
        Since:
        2.7
      • createStruct

        public Struct createStruct​(String structTypeName,
                                   Object[] attributes,
                                   org.eclipse.persistence.internal.sessions.AbstractRecord row,
                                   Vector orderedFields,
                                   org.eclipse.persistence.internal.sessions.AbstractSession session,
                                   Connection connection)
                            throws SQLException
        INTERNAL: This method builds a Struct using the unwrapped connection within the session
        Overrides:
        createStruct in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        Returns:
        Struct
        Throws:
        SQLException
      • createStruct

        public Struct createStruct​(String structTypeName,
                                   Object[] attributes,
                                   Connection connection)
                            throws SQLException
        Create java.sql.Struct from given parameters.
        Overrides:
        createStruct in class Oracle8Platform
        Parameters:
        structTypeName - - the SQL type name of the SQL structured type that this Struct object maps to.
        attributes - - the attributes that populate the returned object
        connection - - DB connection
        Returns:
        Struct
        Throws:
        SQLException