1 18 package org.objectweb.medor.query.rdb.lib; 19 20 import org.objectweb.medor.datasource.api.DataStore; 21 import org.objectweb.medor.expression.api.Expression; 22 import org.objectweb.medor.query.lib.BasicQueryTree; 23 import org.objectweb.medor.query.rdb.api.RdbQueryLeaf; 24 25 import java.util.Map ; 26 27 31 public abstract class BasicRdbQueryLeaf 32 extends BasicQueryTree 33 implements RdbQueryLeaf { 34 35 protected boolean isSubquery = false; 36 protected Expression sqlFilter; 37 protected String query; 38 protected DataStore ds; 39 40 public BasicRdbQueryLeaf() { 41 } 42 43 public BasicRdbQueryLeaf(String _name, 44 DataStore ds) { 45 super(_name); 46 this.ds = ds; 47 } 48 49 public BasicRdbQueryLeaf(String _name, 50 DataStore ds, 51 String query) { 52 super(_name); 53 this.ds = ds; 54 this.query = query; 55 } 56 57 public Object clone(Object clone, 58 Map obj2clone) throws CloneNotSupportedException { 59 clone = super.clone(clone, obj2clone); 60 BasicRdbQueryLeaf ql = (BasicRdbQueryLeaf) clone; 61 ql.sqlFilter = (Expression) getClone(sqlFilter, obj2clone); 62 ql.ds = ds; 63 ql.query = query; 64 ql.isSubquery = isSubquery; 65 return clone; 66 } 67 public boolean isSubquery() { 68 return isSubquery; 69 } 70 71 public void setIsSubquery(boolean subquery) { 72 this.isSubquery = subquery; 73 } 74 75 public DataStore getDataStore() { 76 return ds; 77 } 78 79 public void setDataStore(DataStore ds) { 80 this.ds = ds; 81 } 82 } 83 | Popular Tags |