1 21 package oracle.toplink.essentials.internal.parsing; 23 24 import oracle.toplink.essentials.queryframework.*; 25 import oracle.toplink.essentials.exceptions.*; 26 import oracle.toplink.essentials.expressions.*; 27 import oracle.toplink.essentials.descriptors.ClassDescriptor; 28 29 33 public abstract class ModifyNode extends QueryNode { 34 35 private String abstractSchemaIdentifier; 36 private String abstractSchemaName; 37 38 42 public void applyToQuery(DatabaseQuery theQuery, GenerationContext context) { 43 } 44 45 48 public Expression generateExpression(GenerationContext context) { 49 return null; 50 } 51 52 55 public String getAbstractSchemaName() { 56 return abstractSchemaName; 57 } 58 59 62 public void setAbstractSchemaName(String abstractSchemaName) { 63 this.abstractSchemaName = abstractSchemaName; 64 } 65 66 69 public String getAbstractSchemaIdentifier() { 70 return abstractSchemaIdentifier; 71 } 72 73 76 public void setAbstractSchemaIdentifier(String identifierName) { 77 abstractSchemaIdentifier = identifierName; 78 } 79 80 84 public Class resolveClass(GenerationContext context) { 85 String alias = abstractSchemaName; 86 ClassDescriptor descriptor = context.getSession().getDescriptorForAlias(alias); 87 if (descriptor == null) { 88 throw EJBQLException.missingDescriptorException(alias); 89 } 90 Class theClass = descriptor.getJavaClass(); 91 if (theClass == null) { 92 throw EJBQLException.resolutionClassNotFoundException(alias); 93 } 94 return theClass; 95 } 96 } 97 | Popular Tags |