All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.dialect.Oracle10gDialect Maven / Gradle / Ivy

There is a newer version: 6.6.2.Final
Show newest version
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.dialect;

import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import org.hibernate.LockOptions;
import org.hibernate.sql.ANSIJoinFragment;
import org.hibernate.sql.JoinFragment;

/**
 * A dialect specifically for use with Oracle 10g.
 * 

* The main difference between this dialect and {@link Oracle9iDialect} * is the use of "ANSI join syntax". * * @author Steve Ebersole */ public class Oracle10gDialect extends Oracle9iDialect { /** * Constructs an Oracle10gDialect */ public Oracle10gDialect() { super(); } @Override public JoinFragment createOuterJoinFragment() { return new ANSIJoinFragment(); } @Override public String getCrossJoinSeparator() { return " cross join "; } @Override public String getWriteLockString(int timeout) { if ( timeout == LockOptions.SKIP_LOCKED ) { return getForUpdateSkipLockedString(); } else { return super.getWriteLockString( timeout ); } } @Override public String getWriteLockString(String aliases, int timeout) { if ( timeout == LockOptions.SKIP_LOCKED ) { return getForUpdateSkipLockedString( aliases ); } else { return super.getWriteLockString( aliases, timeout ); } } @Override public String getForUpdateSkipLockedString() { return " for update skip locked"; } @Override public String getForUpdateSkipLockedString(String aliases) { return getForUpdateString() + " of " + aliases + " skip locked"; } @Override public ResultSet getResultSet(CallableStatement statement, int position) throws SQLException { return (ResultSet) statement.getObject( position ); } @Override public int registerResultSetOutParameter(CallableStatement statement, String name) throws SQLException { statement.registerOutParameter( name, OracleTypesHelper.INSTANCE.getOracleCursorTypeSqlType() ); return 1; } @Override public ResultSet getResultSet(CallableStatement statement, String name) throws SQLException { return (ResultSet) statement.getObject( name ); } @Override public boolean supportsSkipLocked() { return true; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy