1 21 package oracle.toplink.essentials.internal.expressions; 23 24 import java.util.*; 25 import oracle.toplink.essentials.querykeys.*; 26 import oracle.toplink.essentials.expressions.*; 27 import oracle.toplink.essentials.descriptors.ClassDescriptor; 28 29 37 public class ManualQueryKeyExpression extends QueryKeyExpression { 38 public ManualQueryKeyExpression() { 39 super(); 40 } 41 42 public ManualQueryKeyExpression(String impliedRelationshipName, Expression base) { 43 super(impliedRelationshipName, base); 44 } 45 46 public ManualQueryKeyExpression(String impliedRelationshipName, Expression base, ClassDescriptor descriptor) { 47 super(impliedRelationshipName, base); 48 this.descriptor = descriptor; 49 } 50 51 55 public String descriptionOfNodeType() { 56 return "Manual Query Key"; 57 } 58 59 66 public Vector getOwnedTables() { 67 if (getDescriptor() == null) { 68 return null; 69 } else { 70 return getDescriptor().getTables(); 71 } 72 } 73 74 public QueryKey getQueryKeyOrNull() { 75 return null; 76 } 77 78 82 public boolean isAttribute() { 83 return false; 84 } 85 86 public Expression mappingCriteria() { 87 return null; 88 } 89 90 95 public Expression rebuildOn(Expression newBase) { 96 ObjectExpression newLocalBase = (ObjectExpression)getBaseExpression().rebuildOn(newBase); 97 return newLocalBase.getManualQueryKey(getName(), getDescriptor()); 98 } 99 100 107 public Expression twistedForBaseAndContext(Expression newBase, Expression context) { 108 ObjectExpression twistedBase = (ObjectExpression)getBaseExpression().twistedForBaseAndContext(newBase, context); 109 return twistedBase.getManualQueryKey(getName(), getDescriptor()); 110 111 } 112 113 116 public void validateNode() { 117 } 119 } 120 | Popular Tags |