01: /*
02: * Copyright 2002 (C) TJDO.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the TJDO License version 1.0.
06: * See the terms of the TJDO License in the documentation provided with this software.
07: *
08: * $Id: NullComparisonExpression.java,v 1.3 2003/08/04 16:40:35 pierreg0 Exp $
09: */
10:
11: package com.triactive.jdo.store;
12:
13: class NullComparisonExpression extends BooleanExpression {
14: private SQLExpression expr;
15: private boolean equalityTest;
16: private NullLiteral lit;
17:
18: public NullComparisonExpression(SQLExpression expr,
19: boolean equalityTest, NullLiteral lit) {
20: super (expr, equalityTest ? OP_IS : OP_ISNOT, lit);
21:
22: this .expr = expr;
23: this .equalityTest = equalityTest;
24: }
25:
26: public BooleanExpression not() {
27: return new NullComparisonExpression(expr, !equalityTest, lit);
28: }
29: }
|