// update field listing
Long position = new Long(0);
for(AttributeDescriptor attribute : attributeDescriptors)
{
GisUploadField field = new GisUploadField();
field.fieldName = attribute.getName().toString();
field.fieldType = attribute.getType().getName().getLocalPart();
field.fieldPosition = position;
field.gisUpload = gisUpload;
field.save();
position++;
}