1 10 11 package com.triactive.jdo.store; 12 13 14 class ObjectExpression extends SQLExpression 15 { 16 protected ObjectExpression(QueryStatement qs) 17 { 18 super(qs); 19 } 20 21 public ObjectExpression(QueryStatement qs, QueryStatement.QueryColumn qsc) 22 { 23 super(qs, qsc); 24 } 25 26 public ObjectExpression(QueryStatement qs, QueryStatement.QueryColumn qsc, String outerJoinSuffix) 27 { 28 this(qs, qsc); 29 st.append(outerJoinSuffix); 30 } 31 32 public BooleanExpression eq(SQLExpression expr) 33 { 34 if (expr instanceof NullLiteral) 35 return expr.eq(this); 36 else if (expr instanceof ObjectExpression) 37 return new BooleanExpression(this, OP_EQ, expr); 38 else 39 return super.eq(expr); 40 } 41 42 public BooleanExpression noteq(SQLExpression expr) 43 { 44 if (expr instanceof NullLiteral) 45 return expr.noteq(this); 46 else if (expr instanceof ObjectExpression) 47 return new BooleanExpression(this, OP_NOTEQ, expr); 48 else 49 return super.noteq(expr); 50 } 51 52 public BooleanExpression in(SQLExpression expr) 53 { 54 return new BooleanExpression(this, OP_IN, expr); 55 } 56 } 57 | Popular Tags |