1 19 20 package org.apache.cayenne.query; 21 22 import org.apache.cayenne.exp.Expression; 23 import org.apache.cayenne.map.ObjEntity; 24 25 public class DeleteQuery extends QualifiedQuery { 26 27 28 public DeleteQuery() { 29 super(); 30 } 31 32 private void init(Object root, Expression qualifier) { 33 this.setRoot(root); 34 this.setQualifier(qualifier); 35 } 36 37 42 public DeleteQuery(ObjEntity root) { 43 this(root, null); 44 } 45 46 52 public DeleteQuery(ObjEntity root, Expression qualifier) { 53 this(); 54 this.init(root, qualifier); 55 } 56 57 63 public DeleteQuery(Class rootClass) { 64 this(rootClass, null); 65 } 66 67 74 public DeleteQuery(Class rootClass, Expression qualifier) { 75 this.init(rootClass, qualifier); 76 } 77 78 79 public DeleteQuery(String objEntityName) { 80 this(objEntityName, null); 81 } 82 83 87 public DeleteQuery(String objEntityName, Expression qualifier) { 88 this.init(objEntityName, qualifier); 89 } 90 91 96 public SQLAction createSQLAction(SQLActionVisitor visitor) { 97 return visitor.updateAction(this); 98 } 99 } 100 | Popular Tags |