magoffin.matt.ma2.dao.hbm
Class BitwiseAndFunctionSQLFunction

java.lang.Object
  extended by org.hibernate.dialect.function.StandardSQLFunction
      extended by magoffin.matt.ma2.dao.hbm.BitwiseAndSQLFunction
          extended by magoffin.matt.ma2.dao.hbm.BitwiseAndFunctionSQLFunction
All Implemented Interfaces:
org.hibernate.dialect.function.SQLFunction

public class BitwiseAndFunctionSQLFunction
extends BitwiseAndSQLFunction

Hibernate bitwise AND operation using a custom SQL function.

This is a Hibernate StandardSQLFunction that produces a bitwise AND SQL function call. This can be used for databases that do not provide support for the & bitwise AND operator directly (such as Apache Derby). The generated SQL looks like:

bitwise_and(param1, param2)

Where param1 and param2 are presumed to be integer types.

Version:
$Revision: 43 $ $Date: 2007-10-21 11:10:01 +1300 (Sun, 21 Oct 2007) $
Author:
Matt Magoffin (spamsqr@msqr.us)
See Also:
DerbyBitwiseAndSQLFunction

Field Summary
static java.lang.String DEFAULT_SQL_FUNCTION_NAME
          The default SQL function name.
 
Fields inherited from class magoffin.matt.ma2.dao.hbm.BitwiseAndSQLFunction
DEFAULT_NAME, DEFAULT_TYPE
 
Constructor Summary
BitwiseAndFunctionSQLFunction()
           
 
Method Summary
 java.lang.String getSqlFunctionName()
           
 java.lang.String render(java.util.List args, org.hibernate.engine.SessionFactoryImplementor factory)
           
 void setSqlFunctionName(java.lang.String sqlFunctionName)
           
 
Methods inherited from class org.hibernate.dialect.function.StandardSQLFunction
getName, getReturnType, getType, hasArguments, hasParenthesesIfNoArguments, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_SQL_FUNCTION_NAME

public static final java.lang.String DEFAULT_SQL_FUNCTION_NAME
The default SQL function name.

See Also:
Constant Field Values
Constructor Detail

BitwiseAndFunctionSQLFunction

public BitwiseAndFunctionSQLFunction()
Method Detail

render

public java.lang.String render(java.util.List args,
                               org.hibernate.engine.SessionFactoryImplementor factory)
Specified by:
render in interface org.hibernate.dialect.function.SQLFunction
Overrides:
render in class BitwiseAndSQLFunction

getSqlFunctionName

public java.lang.String getSqlFunctionName()
Returns:
the sqlFunctionName

setSqlFunctionName

public void setSqlFunctionName(java.lang.String sqlFunctionName)
Parameters:
sqlFunctionName - the sqlFunctionName to set