Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012B.cruise;
  
  import java.util.List;
The cruise cancellation pricing message returns the computed cancellation penalities. Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="OTA_CruiseCancellationPricingRS">
   <xs:complexType>
     <xs:choice>
       <xs:sequence>
         <xs:element type="ns:SuccessType" name="Success"/>
         <xs:element type="ns:WarningsType" name="Warnings" minOccurs="0"/>
         <xs:element name="ReservationID" maxOccurs="2">
           <!-- Reference to inner class ReservationID -->
         </xs:element>
         <xs:element type="ns:SailingCategoryInfoType" name="SailingInfo" minOccurs="0"/>
         <xs:element type="ns:CruiseBookingInfoType" name="CancellationFees"/>
       </xs:sequence>
       <xs:element type="ns:ErrorsType" name="Errors"/>
     </xs:choice>
     <xs:attributeGroup ref="ns:OTA_PayloadStdAttributes"/>
   </xs:complexType>
 </xs:element>
 
 
 public class CancellationPricingRS
 {
     private int choiceSelect = -1;
     private static final int SUCCESS_CHOICE = 0;
     private static final int ERRORS_CHOICE = 1;
     private Success success;
     private Warnings warnings;
     private SailingCategoryInfo sailingInfo;
     private Errors errors;
 
     private void setChoiceSelect(int choice) {
         if ( == -1) {
              = choice;
         } else if ( != choice) {
             throw new IllegalStateException(
                     "Need to call clearChoiceSelect() before changing existing choice");
         }
     }

    
Clear the choice selection.
 
     public void clearChoiceSelect() {
          = -1;
     }

    
Check if Success is current selection for choice.

Returns:
true if selection, false if not
 
     public boolean ifSuccess() {
         return  == ;
     }

    
Get the 'Success' element value. Standard way to indicate successful processing of an OpenTravel message. Returning an empty element of this type indicates success.

Returns:
value
 
     public Success getSuccess() {
         return ;
     }

    
Set the 'Success' element value. Standard way to indicate successful processing of an OpenTravel message. Returning an empty element of this type indicates success.

Parameters:
success
 
     public void setSuccess(Success success) {
         setChoiceSelect();
         this. = success;
     }

    
Get the 'Warnings' element value. Standard way to indicate successful processing of an OpenTravel message, but one in which warnings (business errors) are generated.

Returns:
value
 
     public Warnings getWarnings() {
         return ;
    }

    
Set the 'Warnings' element value. Standard way to indicate successful processing of an OpenTravel message, but one in which warnings (business errors) are generated.

Parameters:
warnings
    public void setWarnings(Warnings warnings) {
        this. = warnings;
    }

    
Get the list of 'ReservationID' element items.

Returns:
list
        return ;
    }

    
Set the list of 'ReservationID' element items.

Parameters:
list
    public void setReservationIDList(List<ReservationIDlist) {
         = list;
    }

    
Get the number of 'ReservationID' element items.

Returns:
count
    public int sizeReservationIDList() {
        return .size();
    }

    
Add a 'ReservationID' element item.

Parameters:
item
    public void addReservationID(ReservationID item) {
        .add(item);
    }

    
Get 'ReservationID' element item by position.

Parameters:
index
Returns:
item
    public ReservationID getReservationID(int index) {
        return .get(index);
    }

    
Remove all 'ReservationID' element items.
    public void clearReservationIDList() {
        .clear();
    }

    
Get the 'SailingInfo' element value. Contains information for the selected sailing.

Returns:
value
        return ;
    }

    
Set the 'SailingInfo' element value. Contains information for the selected sailing.

Parameters:
sailingInfo
    public void setSailingInfo(SailingCategoryInfo sailingInfo) {
        this. = sailingInfo;
    }

    
Get the 'CancellationFees' element value. Specifies the cancellation fees associated with the booking.

Returns:
value
        return ;
    }

    
Set the 'CancellationFees' element value. Specifies the cancellation fees associated with the booking.

Parameters:
cancellationFees
    public void setCancellationFees(CruiseBookingInfo cancellationFees) {
        this. = cancellationFees;
    }

    
Check if Errors is current selection for choice.

Returns:
true if selection, false if not
    public boolean ifErrors() {
        return  == ;
    }

    
Get the 'Errors' element value. A collection of errors that occurred during the processing of a message.

Returns:
value
    public Errors getErrors() {
        return ;
    }

    
Set the 'Errors' element value. A collection of errors that occurred during the processing of a message.

Parameters:
errors
    public void setErrors(Errors errors) {
        this. = errors;
    }

    
Get the 'OTA_PayloadStdAttributes' attributeGroup value. The standard attributes that appear on the root element for all OpenTravel Messages.

Returns:
value
        return ;
    }

    
Set the 'OTA_PayloadStdAttributes' attributeGroup value. The standard attributes that appear on the root element for all OpenTravel Messages.

Parameters:
OTAPayloadStdAttributes
    public void setOTAPayloadStdAttributes(
            OTAPayloadStdAttributes OTAPayloadStdAttributes) {
        this. = OTAPayloadStdAttributes;
    }
    
Specifies the reservation control information or the guest's booking ID in modification mode (e.g., PNR Record Locator and/or Vendor Confirmation Number). Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="ReservationID" maxOccurs="2">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:UniqueID_Type">
         <xs:attributeGroup ref="ns:ReservationStatusGroup"/>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
    public static class ReservationID extends UniqueID
    {
        private ReservationStatusGroup reservationStatusGroup;

        
Get the 'ReservationStatusGroup' attributeGroup value.

Returns:
value
            return ;
        }

        
Set the 'ReservationStatusGroup' attributeGroup value.

Parameters:
reservationStatusGroup
        public void setReservationStatusGroup(
                ReservationStatusGroup reservationStatusGroup) {
            this. = reservationStatusGroup;
        }
    }
New to GrepCode? Check out our FAQ X