Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012B.air;
  
  import java.util.List;
The Book Response message contains the itinerary, passenger and pricing information sent in the request, along with a Booking reference number (PNR Locator) and ticketing information if the booking was successful. This message contains similar information to a standard airline CRS or GDS Display PNR message. 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_AirBookRS">
   <xs:complexType>
     <xs:choice>
       <xs:sequence maxOccurs="2">
         <!-- Reference to inner class Sequence -->
       </xs:sequence>
       <xs:element type="ns:ErrorsType" name="Errors"/>
     </xs:choice>
     <xs:attribute type="xs:boolean" name="Cancel"/>
     <xs:attributeGroup ref="ns:OTA_PayloadStdAttributes"/>
     <xs:attribute type="xs:boolean" use="optional" name="PriceInd"/>
   </xs:complexType>
 </xs:element>
 
 
 public class BookRS
 {
     private int choiceSelect = -1;
     private static final int SEQUENCE_LIST_CHOICE = 0;
     private static final int ERRORS_CHOICE = 1;
     private List<SequencesequenceList = new ArrayList<Sequence>();
     private Errors errors;
     private Boolean cancel;
     private Boolean priceInd;
 
     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 SequenceList is current selection for choice.

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

    
Get the list of sequence items.

Returns:
list
 
     public List<SequencegetSequenceList() {
         return ;
     }

    
Set the list of sequence items.

Parameters:
list
 
     public void setSequenceList(List<Sequencelist) {
          = list;
     }

    
Get the number of sequence items.

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

    
Add a sequence item.

Parameters:
item
 
     public void addSequence(Sequence item) {
        .add(item);
    }

    
Get sequence item by position.

Parameters:
index
Returns:
item
    public Sequence getSequence(int index) {
        return .get(index);
    }

    
Remove all sequence items.
    public void clearSequenceList() {
        .clear();
    }

    
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 'Cancel' attribute value. AWG to revisit. <LegacyDefaultValue xmlns="http://www.opentravel.org/OTA/2003/05/common">false</LegacyDefaultValue>

Returns:
value
    public Boolean getCancel() {
        return ;
    }

    
Set the 'Cancel' attribute value. AWG to revisit. <LegacyDefaultValue xmlns="http://www.opentravel.org/OTA/2003/05/common">false</LegacyDefaultValue>

Parameters:
cancel
    public void setCancel(Boolean cancel) {
        this. = cancel;
    }

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

Returns:
value
        return ;
    }

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

Parameters:
OTAPayloadStdAttributes
    public void setOTAPayloadStdAttributes(
            OTAPayloadStdAttributes OTAPayloadStdAttributes) {
        this. = OTAPayloadStdAttributes;
    }

    
Get the 'PriceInd' attribute value. When true, pricing was requested along with the booking.

Returns:
value
    public Boolean getPriceInd() {
        return ;
    }

    
Set the 'PriceInd' attribute value. When true, pricing was requested along with the booking.

Parameters:
priceInd
    public void setPriceInd(Boolean priceInd) {
        this. = priceInd;
    }
    
Schema fragment(s) for this class:
 <xs:sequence xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" maxOccurs="2">
   <xs:element type="ns:SuccessType" name="Success"/>
   <xs:element type="ns:WarningsType" name="Warnings" minOccurs="0"/>
   <xs:element name="AirReservation" minOccurs="0" maxOccurs="9">
     <!-- Reference to inner class AirReservation -->
   </xs:element>
 </xs:sequence>
 
    public static class Sequence
    {
        private Success success;
        private Warnings warnings;
        private List<AirReservationairReservationList = new ArrayList<AirReservation>();

        
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) {
            this. = success;
        }

        
Get the 'Warnings' element value. Standard way to indicate successful processing of an OpenTravel message, but one in which warnings 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 are generated.

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

        
Get the list of 'AirReservation' element items.

Returns:
list
        public List<AirReservationgetAirReservationList() {
            return ;
        }

        
Set the list of 'AirReservation' element items.

Parameters:
list
        public void setAirReservationList(List<AirReservationlist) {
             = list;
        }

        
Get the number of 'AirReservation' element items.

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

        
Add a 'AirReservation' element item.

Parameters:
item
        public void addAirReservation(AirReservation item) {
            .add(item);
        }

        
Get 'AirReservation' element item by position.

Parameters:
index
Returns:
item
        public AirReservation getAirReservation(int index) {
            return .get(index);
        }

        
Remove all 'AirReservation' element items.
        public void clearAirReservationList() {
            .clear();
        }
        
Contains all booking response information pertaining to a completed reservation. 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="AirReservation" minOccurs="0" maxOccurs="9">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:AirReservationType">
         <xs:sequence>
           <xs:element type="ns:AirOfferChoiceType" name="Offer" minOccurs="0"/>
         </xs:sequence>
         <xs:attribute type="xs:string" use="optional" name="CreateDateTime"/>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
        public static class AirReservation
                extends
                    org.jibx.schema.org.opentravel._2012B.base.air.AirReservation
        {
            private AirOfferChoice offer;
            private String createDateTime;

            
Get the 'Offer' element value. Merchandising offer information.

Returns:
value
            public AirOfferChoice getOffer() {
                return ;
            }

            
Set the 'Offer' element value. Merchandising offer information.

Parameters:
offer
            public void setOffer(AirOfferChoice offer) {
                this. = offer;
            }

            
Get the 'CreateDateTime' attribute value. Provides the original PNR creation date/time.

Returns:
value
            public String getCreateDateTime() {
                return ;
            }

            
Set the 'CreateDateTime' attribute value. Provides the original PNR creation date/time.

Parameters:
createDateTime
            public void setCreateDateTime(String createDateTime) {
                this. = createDateTime;
            }
        }
    }
New to GrepCode? Check out our FAQ X