1 17 package org.apache.ws.jaxme.sqls.oracle; 18 19 import org.apache.ws.jaxme.sqls.CombinedConstraint; 20 import org.apache.ws.jaxme.sqls.ObjectFactory; 21 import org.apache.ws.jaxme.sqls.SQLFactory; 22 import org.apache.ws.jaxme.sqls.impl.SelectStatementImpl; 23 24 25 28 public class OraSelectStatementImpl extends SelectStatementImpl 29 implements OraSelectStatement { 30 33 public static class OraOrderColumnImpl extends OrderColumnImpl 34 implements OraOrderColumn { 35 private final boolean nullsFirst; 36 42 public OraOrderColumnImpl(Object pObject, boolean pDescending, 43 boolean pNullsFirst) { 44 super(pObject, pDescending); 45 nullsFirst = pNullsFirst; 46 } 47 public boolean isNullsFirst() { return nullsFirst; } 48 } 49 private CombinedConstraint startWith, connectByPrior; 50 51 53 public OraSelectStatementImpl(SQLFactory pFactory) { 54 super(pFactory); 55 } 56 57 public CombinedConstraint getStartWith() { 58 if (startWith == null) { 59 ObjectFactory f = getSQLFactory().getObjectFactory(); 60 startWith = f.newCombinedConstraint(this, CombinedConstraint.Type.AND); 61 } 62 return startWith; 63 } 64 65 public CombinedConstraint getConnectBy() { 66 if (connectByPrior == null) { 67 ObjectFactory f = getSQLFactory().getObjectFactory(); 68 connectByPrior = f.newCombinedConstraint(this, CombinedConstraint.Type.AND); 69 } 70 return connectByPrior; 71 } 72 73 76 public void addOrderColumn(Object pObject, boolean pDescending, boolean pNullsFirst) { 77 OraOrderColumn ooc = new OraOrderColumnImpl(pObject, pDescending, pNullsFirst); 78 super.addOrderColumn(ooc); 79 } 80 } 81 | Popular Tags |