@Override
protected ClassDescriptor buildXMLCompositeCollectionMappingDescriptor() {
ClassDescriptor descriptor = super.buildXMLCompositeCollectionMappingDescriptor();
//Add container accessor mapping
XMLDirectMapping containerAttributeMapping = new XMLDirectMapping();
containerAttributeMapping.setAttributeName("containerAttributeName");
containerAttributeMapping.setGetMethodName("getContainerAttributeName");
containerAttributeMapping.setSetMethodName("setContainerAttributeName");
containerAttributeMapping.setXPath("container-attribute/text()");
((NullPolicy)containerAttributeMapping.getNullPolicy()).setSetPerformedForAbsentNode(false);
descriptor.addMapping(containerAttributeMapping);
XMLDirectMapping containerGetMethodMapping = new XMLDirectMapping();
containerGetMethodMapping.setAttributeName("containerGetMethodName");
containerGetMethodMapping.setGetMethodName("getContainerGetMethodName");
containerGetMethodMapping.setSetMethodName("setContainerGetMethodName");
containerGetMethodMapping.setXPath("container-get-method/text()");
((NullPolicy)containerGetMethodMapping.getNullPolicy()).setSetPerformedForAbsentNode(false);
descriptor.addMapping(containerGetMethodMapping);
XMLDirectMapping containerSetMethodMapping = new XMLDirectMapping();
containerSetMethodMapping.setAttributeName("containerSetMethodName");
containerSetMethodMapping.setGetMethodName("getContainerSetMethodName");
containerSetMethodMapping.setSetMethodName("setContainerSetMethodName");
containerSetMethodMapping.setXPath("container-set-method/text()");
((NullPolicy)containerSetMethodMapping.getNullPolicy()).setSetPerformedForAbsentNode(false);
descriptor.addMapping(containerSetMethodMapping);
return descriptor;
}