Last update: 2011-06-23

org.proteios.core
Class HibernateUtil

java.lang.Object
  extended by org.proteios.core.HibernateUtil

public class HibernateUtil
extends Object

This class collects most of the functionality we need for using Hibernate.

Version:
2.0
Author:
Nicklas, Samuel
Last modified
$Date: 2010-04-22 11:06:19 +0200 (Thu, 22 Apr 2010) $

Constructor Summary
HibernateUtil()
           
 
Method Summary
static org.hibernate.dialect.Dialect getDialect()
          Get the database dialect.
static String quote(String value)
          Quote a string with the default quote type for the current database engine.
static boolean useThetaJoin(QueryType queryType)
          Check if theta joins or ANSI joins are used by the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateUtil

public HibernateUtil()
Method Detail

getDialect

public static org.hibernate.dialect.Dialect getDialect()
Get the database dialect.


useThetaJoin

public static boolean useThetaJoin(QueryType queryType)
Check if theta joins or ANSI joins are used by the database.


quote

public static String quote(String value)
Quote a string with the default quote type for the current database engine. Ie. with MySQL: value --> `value`, and with any ANSI-compatible database: value --> "value". This method uses the Dialect.openQuote and Dialect.closeQuote methods of the currently installed Hibernate dialect.

Parameters:
value - The value to quote
Returns:
The quoted value
See Also:
getDialect()

Last update: 2011-06-23