1 10 11 package com.triactive.jdo.store; 12 13 import javax.jdo.JDOFatalInternalException; 14 15 16 class Join 17 { 18 public static final int INNER_JOIN = 0; 19 public static final int LEFT_OUTER_JOIN = 1; 20 public static final int RIGHT_OUTER_JOIN = 2; 21 22 private static final String [] joinTypeStrings = 23 { 24 " INNER JOIN ", 25 " LEFT OUTER JOIN ", 26 " RIGHT OUTER JOIN " 27 }; 28 29 public final int joinType; 30 public final String joinTypeString; 31 public final TableExpression tableExpr; 32 public final BooleanExpression condition; 33 34 public Join(int joinType, TableExpression tableExpr, BooleanExpression condition) 35 { 36 if (joinType < 0 || joinType >= joinTypeStrings.length) 37 throw new JDOFatalInternalException("Illegal join type: " + joinType); 38 39 this.joinType = joinType; 40 this.tableExpr = tableExpr; 41 this.condition = condition; 42 43 joinTypeString = joinTypeStrings[joinType]; 44 } 45 } 46 | Popular Tags |