1 21 package oracle.toplink.essentials.querykeys; 23 24 import oracle.toplink.essentials.internal.helper.DatabaseField; 25 import oracle.toplink.essentials.descriptors.ClassDescriptor; 26 27 36 public class DirectQueryKey extends QueryKey { 37 DatabaseField field; 38 39 43 public DatabaseField getField() { 44 return field; 45 } 46 47 51 public String getFieldName() { 52 return getField().getName(); 53 } 54 55 59 public String getQualifiedFieldName() { 60 return getField().getQualifiedName(); 61 } 62 63 69 public void initialize(ClassDescriptor descriptor) { 70 super.initialize(descriptor); 71 if (!getField().hasTableName()) { 72 getField().setTable(descriptor.getDefaultTable()); 73 } 74 } 75 76 81 public boolean isDirectQueryKey() { 82 return true; 83 } 84 85 89 public void setField(DatabaseField field) { 90 this.field = field; 91 } 92 93 97 public void setFieldName(String fieldName) { 98 setField(new DatabaseField(fieldName)); 99 } 100 } 101 | Popular Tags |