Dom4jAccessorpublic class Dom4jAccessor extends Object implements PropertyAccessorResponsible for accessing property values represented as a dom4j Element
or Attribute. |
Fields Summary |
---|
private String | nodeName | private org.hibernate.type.Type | propertyType | private final org.hibernate.engine.SessionFactoryImplementor | factory |
Methods Summary |
---|
public Getter | getGetter(java.lang.Class theClass, java.lang.String propertyName)Create a "getter" for the named attribute
if (nodeName==null) {
throw new MappingException("no node name for property: " + propertyName);
}
if ( ".".equals(nodeName) ) {
return new TextGetter(propertyType, factory);
}
else if ( nodeName.indexOf('/")>-1 ) {
return new ElementAttributeGetter(nodeName, propertyType, factory);
}
else if ( nodeName.indexOf('@")>-1 ) {
return new AttributeGetter(nodeName, propertyType, factory);
}
else {
return new ElementGetter(nodeName, propertyType, factory);
}
| public Setter | getSetter(java.lang.Class theClass, java.lang.String propertyName)Create a "setter" for the named attribute
if (nodeName==null) {
throw new MappingException("no node name for property: " + propertyName);
}
if ( ".".equals(nodeName) ) {
return new TextSetter(propertyType);
}
else if ( nodeName.indexOf('/")>-1 ) {
return new ElementAttributeSetter(nodeName, propertyType);
}
else if ( nodeName.indexOf('@")>-1 ) {
return new AttributeSetter(nodeName, propertyType);
}
else {
return new ElementSetter(nodeName, propertyType);
}
|
|