1 34 package org.objectstyle.cayenne.query; 35 36 import org.objectstyle.cayenne.exp.Expression; 37 import org.objectstyle.cayenne.map.ObjEntity; 38 39 public class DeleteQuery extends QualifiedQuery { 40 41 42 public DeleteQuery() { 43 super(); 44 } 45 46 private void init(Object root, Expression qualifier) { 47 this.setRoot(root); 48 this.setQualifier(qualifier); 49 } 50 51 56 public DeleteQuery(ObjEntity root) { 57 this(root, null); 58 } 59 60 66 public DeleteQuery(ObjEntity root, Expression qualifier) { 67 this(); 68 this.init(root, qualifier); 69 } 70 71 77 public DeleteQuery(Class rootClass) { 78 this(rootClass, null); 79 } 80 81 88 public DeleteQuery(Class rootClass, Expression qualifier) { 89 this.init(rootClass, qualifier); 90 } 91 92 93 public DeleteQuery(String objEntityName) { 94 this(objEntityName, null); 95 } 96 97 101 public DeleteQuery(String objEntityName, Expression qualifier) { 102 this.init(objEntityName, qualifier); 103 } 104 105 106 111 public SQLAction createSQLAction(SQLActionVisitor visitor) { 112 return visitor.updateAction(this); 113 } 114 } | Popular Tags |