/** * Is this FieldDescriptor an attribute? * * @return true if this FieldDescriptor describes an attribute */ public boolean isAttribute() { return relationType() == NOT_RELATION; }
/** * Is this FieldDescriptor a reference? * * @return true if this FieldDescriptor describes a reference */ public boolean isReference() { return (relationType() == ONE_ONE_RELATION) || (relationType() == N_ONE_RELATION); }
/** * Is this FieldDescriptor an attribute? * * @return true if this FieldDescriptor describes an attribute */ public boolean isAttribute() { return relationType() == NOT_RELATION; }
/** * Is this FieldDescriptor a reference? * * @return true if this FieldDescriptor describes a reference */ public boolean isReference() { return (relationType() == ONE_ONE_RELATION) || (relationType() == N_ONE_RELATION); }
/** * Is this FieldDescriptor a collection? * * @return true if this FieldDescriptor describes a collection */ public boolean isCollection() { return (relationType() == ONE_N_RELATION) || (relationType() == M_N_RELATION); }
/** * Is this FieldDescriptor a collection? * * @return true if this FieldDescriptor describes a collection */ public boolean isCollection() { return (relationType() == ONE_N_RELATION) || (relationType() == M_N_RELATION); }
String fieldName = fieldEntry.getKey(); FieldDescriptor field = fieldEntry.getValue(); if (field.relationType() == FieldDescriptor.M_N_RELATION) { Object sr = o.getFieldValue(fieldName); if (sr instanceof SingletonResults) { } else if ((field.relationType() == FieldDescriptor .ONE_ONE_RELATION) || (field.relationType() == FieldDescriptor .N_ONE_RELATION)) { Object proxyObj = o.getFieldProxy(fieldName);
String fieldName = fieldEntry.getKey(); FieldDescriptor field = fieldEntry.getValue(); if (field.relationType() == FieldDescriptor.M_N_RELATION) { Object sr = o.getFieldValue(fieldName); if (sr instanceof SingletonResults) { } else if ((field.relationType() == FieldDescriptor .ONE_ONE_RELATION) || (field.relationType() == FieldDescriptor .N_ONE_RELATION)) { Object proxyObj = o.getFieldProxy(fieldName);
+ " does not exist in the model."); if (field.relationType() == FieldDescriptor.M_N_RELATION) { invalidateObjectById(hasId); invalidateObjectById(hadId);
+ " does not exist in the model."); if (field.relationType() == FieldDescriptor.M_N_RELATION) { invalidateObjectById(hasId); invalidateObjectById(hadId);
FieldDescriptor fdAlready = map.get(fd.getName()); if ((fdAlready != null) && (fd != fdAlready)) { if (fd.relationType() != fdAlready.relationType()) { throw new MetaDataException("Incompatible similarly named fields (" + fd.getName() + ") inherited"
FieldDescriptor fdAlready = map.get(fd.getName()); if ((fdAlready != null) && (fd != fdAlready)) { if (fd.relationType() != fdAlready.relationType()) { throw new MetaDataException("Incompatible similarly named fields (" + fd.getName() + ") inherited"
String fieldName = field.getName(); if (!"id".equals(fieldName)) { switch (field.relationType()) { case FieldDescriptor.NOT_RELATION: Object value = srcObj.getFieldValue(fieldName); + reverseRef + ", forward ref is " + field.getClassDescriptor().getName() + "." + field.getName() + ", type is " + field.relationType()); throw new Error("Unrecognised relation type " + field.relationType());
String fieldName = field.getName(); if (!"id".equals(fieldName)) { switch (field.relationType()) { case FieldDescriptor.NOT_RELATION: Object value = srcObj.getFieldValue(fieldName); + reverseRef + ", forward ref is " + field.getClassDescriptor().getName() + "." + field.getName() + ", type is " + field.relationType()); throw new Error("Unrecognised relation type " + field.relationType());