1 21 package oracle.toplink.essentials.querykeys; 23 24 import java.io.*; 25 import oracle.toplink.essentials.descriptors.ClassDescriptor; 26 27 37 public class QueryKey implements Cloneable , Serializable { 38 protected String name; 39 protected ClassDescriptor descriptor; 40 41 45 public Object clone() { 46 Object object = null; 47 48 try { 49 object = super.clone(); 50 } catch (Exception exception) { 51 throw new InternalError (exception.toString()); 52 } 53 54 return object; 55 } 56 57 64 public void convertClassNamesToClasses(ClassLoader classLoader){} 65 66 70 public ClassDescriptor getDescriptor() { 71 return descriptor; 72 } 73 74 79 public String getName() { 80 return name; 81 } 82 83 89 public void initialize(ClassDescriptor aDescriptor) { 90 setDescriptor(aDescriptor); 91 } 92 93 98 public boolean isAbstractQueryKey() { 99 return (this.getClass().equals(oracle.toplink.essentials.internal.helper.ClassConstants.QueryKey_Class)); 100 } 101 102 106 public boolean isCollectionQueryKey() { 107 return false; 108 } 109 110 114 public boolean isDirectCollectionQueryKey() { 115 return false; 116 } 117 118 122 public boolean isDirectQueryKey() { 123 return false; 124 } 125 126 130 public boolean isForeignReferenceQueryKey() { 131 return false; 132 } 133 134 138 public boolean isManyToManyQueryKey() { 139 return false; 140 } 141 142 146 public boolean isOneToManyQueryKey() { 147 return false; 148 } 149 150 154 public boolean isOneToOneQueryKey() { 155 return false; 156 } 157 158 163 public boolean isQueryKey() { 164 return true; 165 } 166 167 171 public void setDescriptor(ClassDescriptor descriptor) { 172 this.descriptor = descriptor; 173 } 174 175 180 public void setName(String name) { 181 this.name = name; 182 } 183 184 188 public String toString() { 189 return oracle.toplink.essentials.internal.helper.Helper.getShortClassName(this) + "(" + getName() + ")"; 190 } 191 } 192 | Popular Tags |