code: protected void synchronizeField(QueryPage queryPage, List<String> options, String fieldName, String fieldCaption, Boolean mandatory) {
      QueryFieldDAO queryFieldDAO = new QueryFieldDAO();
      QueryOptionFieldDAO queryOptionFieldDAO = new QueryOptionFieldDAO();
  
      QueryOptionField queryField = (QueryOptionField) queryFieldDAO.findByQueryPageAndName(queryPage, fieldName);
      if (queryField != null) {
        queryFieldDAO.updateMandatory(queryField, mandatory);
        queryFieldDAO.updateCaption(queryField, fieldCaption);
      } else {
        queryField = queryOptionFieldDAO.create(queryPage, fieldName, mandatory, fieldCaption);
      }
  
      synchronizeFieldOptions(options, queryField);
    }
docs: Synchronizes field meta. Should not be used when field already contains replies
  
  @param queryPage query page
  @param options field  options
  @param fieldName field name
  @param fieldCaption field caption
  @param mandatory whether field is mandatory