magoffin.matt.ma2.dao.hbm
Class DerbyBitwiseAndSQLFunction

java.lang.Object
  extended by magoffin.matt.ma2.dao.hbm.DerbyBitwiseAndSQLFunction

public class DerbyBitwiseAndSQLFunction
extends java.lang.Object

Derby SQL function to perform bitwise and operator.

Derby does not provide a built-in bitwise AND operator. This custom Java function can be used to achieve this by making this class available to the Derby class loader and registering a function, like this:

CREATE FUNCTION SA.bitwise_and( parm1 INTEGER, param2 INTEGER )
  RETURNS INTEGER
  LANGUAGE JAVA
  PARAMETER STYLE JAVA
  NO SQL
  EXTERNAL NAME 'magoffin.matt.ma2.dao.hbm.DerbyBitwiseAndSQLFunction.bitwiseAnd';

This can be used with Hibernate via the BitwiseAndFunctionSQLFunction Hibernate SQL function generator class.

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

Constructor Summary
DerbyBitwiseAndSQLFunction()
           
 
Method Summary
static int bitwiseAnd(int param1, int param2)
          Derby function to perform the bitwise AND operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DerbyBitwiseAndSQLFunction

public DerbyBitwiseAndSQLFunction()
Method Detail

bitwiseAnd

public static final int bitwiseAnd(int param1,
                                   int param2)
Derby function to perform the bitwise AND operation.

Parameters:
param1 - the first param
param2 - the second param
Returns:
the bitwise AND result