Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012A.cruise;
  
  import java.util.List;
This message provides confirmation of payment for each reservation and payment requested. Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="OTA_CruisePaymentRS">
   <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="ReservationPayment" minOccurs="0" maxOccurs="9">
           <!-- Reference to inner class ReservationPayment -->
         </xs:element>
       </xs:sequence>
       <xs:element type="ns:ErrorsType" name="Errors"/>
     </xs:choice>
     <xs:attributeGroup ref="ns:OTA_PayloadStdAttributes"/>
   </xs:complexType>
 </xs:element>
 
 
 public class PaymentRS
 {
     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 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. Indicates successful processing of an OpenTravel message.

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

    
Set the 'Success' element value. Indicates successful processing of an OpenTravel message.

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

    
Get the 'Warnings' element value. Used in conjunction with a successful processing of an OpenTravel message to provide warnings.

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

    
Set the 'Warnings' element value. Used in conjunction with a successful processing of an OpenTravel message to provide warnings.

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

    
Get the list of 'ReservationPayment' element items.

Returns:
list
        return ;
    }

    
Set the list of 'ReservationPayment' element items.

Parameters:
list
    public void setReservationPaymentList(List<ReservationPaymentlist) {
         = list;
    }

    
Get the number of 'ReservationPayment' element items.

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

    
Add a 'ReservationPayment' element item.

Parameters:
item
    public void addReservationPayment(ReservationPayment item) {
        .add(item);
    }

    
Get 'ReservationPayment' element item by position.

Parameters:
index
Returns:
item
    public ReservationPayment getReservationPayment(int index) {
        return .get(index);
    }

    
Remove all 'ReservationPayment' element items.
    public void clearReservationPaymentList() {
        .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 '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;
    }
    
Payment information for a reservation. Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="ReservationPayment" minOccurs="0" maxOccurs="9">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="ReservationID">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="ns:UniqueID_Type">
               <xs:attributeGroup ref="ns:ReservationStatusGroup"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="PaymentDetail" maxOccurs="9">
         <!-- Reference to inner class PaymentDetail -->
       </xs:element>
     </xs:sequence>
   </xs:complexType>
 </xs:element>
 
    public static class ReservationPayment
    {
        private UniqueID reservationIDUniqueID;
        private List<PaymentDetailpaymentDetailList = new ArrayList<PaymentDetail>();

        
Get the extension value.

Returns:
value
        public UniqueID getReservationIDUniqueID() {
            return ;
        }

        
Set the extension value.

Parameters:
reservationIDUniqueID
        public void setReservationIDUniqueID(UniqueID reservationIDUniqueID) {
            this. = reservationIDUniqueID;
        }

        
Get the 'ReservationStatusGroup' attributeGroup value. The status and last modified date of this reservation.

Returns:
value
            return ;
        }

        
Set the 'ReservationStatusGroup' attributeGroup value. The status and last modified date of this reservation.

Parameters:
reservationIDReservationStatusGroup
        public void setReservationIDReservationStatusGroup(
                ReservationStatusGroup reservationIDReservationStatusGroup) {
            this. = reservationIDReservationStatusGroup;
        }

        
Get the list of 'PaymentDetail' element items.

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

        
Set the list of 'PaymentDetail' element items.

Parameters:
list
        public void setPaymentDetailList(List<PaymentDetaillist) {
             = list;
        }

        
Get the number of 'PaymentDetail' element items.

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

        
Add a 'PaymentDetail' element item.

Parameters:
item
        public void addPaymentDetail(PaymentDetail item) {
            .add(item);
        }

        
Get 'PaymentDetail' element item by position.

Parameters:
index
Returns:
item
        public PaymentDetail getPaymentDetail(int index) {
            return .get(index);
        }

        
Remove all 'PaymentDetail' element items.
        public void clearPaymentDetailList() {
            .clear();
        }
        
The details of the payment applied. Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="PaymentDetail" maxOccurs="9">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:PaymentDetailType">
         <xs:sequence>
           <xs:element type="ns:WarningsType" name="Warnings" minOccurs="0"/>
         </xs:sequence>
         <xs:attribute type="xs:string" use="optional" name="ReferenceID"/>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
        public static class PaymentDetail
                extends
                    org.jibx.schema.org.opentravel._2012A.base.PaymentDetail
        {
            private Warnings warnings;
            private String referenceID;

            
Get the 'Warnings' element value. Used to specify warnings for this payment.

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

            
Set the 'Warnings' element value. Used to specify warnings for this payment.

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

            
Get the 'ReferenceID' attribute value. Reference to the payment posting.

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

            
Set the 'ReferenceID' attribute value. Reference to the payment posting.

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