1 21 package oracle.toplink.essentials.internal.weaving; 23 24 import java.util.*; 26 27 33 34 public class ClassDetails { 35 36 protected String className; 38 protected String superClassName; 40 protected ClassDetails superClassDetails; 43 44 protected boolean weaveValueHolders = false; 45 protected Map attributesMap; protected Map getterMethodToAttributeDetails; 49 50 protected Map setterMethodToAttributeDetails; 51 52 protected List lazyOneToOneMappings; 53 54 protected boolean isMappedSuperClass = false; 55 56 public ClassDetails() { 58 } 59 60 public String getClassName() { 61 return className; 62 } 63 public void setClassName(String className) { 64 this.className = className; 65 } 66 67 public String getSuperClassName() { 68 return superClassName; 69 } 70 public void setSuperClassName(String superClassName) { 71 this.superClassName = superClassName; 72 } 73 74 public ClassDetails getSuperClassDetails() { 75 return superClassDetails; 76 } 77 public void setSuperClassDetails(ClassDetails superClassDetails) { 78 this.superClassDetails = superClassDetails; 79 } 80 81 public boolean weavedValueHolders() { 82 return weaveValueHolders; 83 } 84 public void weaveValueHolders(boolean weaveValueHolders) { 85 this.weaveValueHolders = weaveValueHolders; 86 } 87 88 public Map getAttributesMap() { 89 return attributesMap; 90 } 91 92 public Map getGetterMethodToAttributeDetails(){ 93 return getterMethodToAttributeDetails; 94 } 95 96 public List getLazyOneToOneMappings(){ 97 return lazyOneToOneMappings; 98 } 99 100 public Map getSetterMethodToAttributeDetails(){ 101 return setterMethodToAttributeDetails; 102 } 103 104 public void setAttributesMap(Map weavedVHAttributes) { 105 this.attributesMap = weavedVHAttributes; 106 } 107 108 public void setGetterMethodToAttributeDetails(Map map){ 109 getterMethodToAttributeDetails = map; 110 } 111 112 public void setLazyOneToOneMappings(List lazyOneToOneMappings){ 113 this.lazyOneToOneMappings = lazyOneToOneMappings; 114 } 115 116 public boolean isMappedSuperClass(){ 117 return isMappedSuperClass; 118 } 119 120 public void setIsMappedSuperClass(boolean isMappedSuperClass){ 121 this.isMappedSuperClass = isMappedSuperClass; 122 } 123 124 public void setSetterMethodToAttributeDetails(Map map){ 125 setterMethodToAttributeDetails = map; 126 } 127 128 public AttributeDetails getAttributeDetailsFromClassOrSuperClass(String attributeName){ 129 AttributeDetails attribute = (AttributeDetails)attributesMap.get(attributeName); 130 if (attribute == null && superClassDetails != null){ 131 return superClassDetails.getAttributeDetailsFromClassOrSuperClass(attributeName); 132 } 133 return attribute; 134 } 135 136 public String toString() { 137 StringBuffer sb = new StringBuffer (className); 138 sb.append(" extends "); 139 sb.append(superClassName); 140 sb.append(" weaveVH: "); 141 if (weavedValueHolders()) { 142 sb.append("true"); 143 } 144 else { 145 sb.append("false"); 146 } 147 return sb.toString(); 148 } 149 } 150 | Popular Tags |