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 cabin hold response message is used to return the list of cabins with the status of thier hold request. 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_CruiseCabinHoldRS">
   <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="SelectedSailing" maxOccurs="3">
           <!-- Reference to inner class SelectedSailing -->
         </xs:element>
         <xs:element ref="ns:TPA_Extensions" minOccurs="0"/>
       </xs:sequence>
       <xs:element type="ns:ErrorsType" name="Errors"/>
     </xs:choice>
     <xs:attributeGroup ref="ns:OTA_PayloadStdAttributes"/>
   </xs:complexType>
 </xs:element>
 
 
 public class CabinHoldRS
 {
     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 TPAExtensions TPAExtensions;
     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 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 'SelectedSailing' element items.

Returns:
list
        return ;
    }

    
Set the list of 'SelectedSailing' element items.

Parameters:
list
    public void setSelectedSailingList(List<SelectedSailinglist) {
         = list;
    }

    
Get the number of 'SelectedSailing' element items.

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

    
Add a 'SelectedSailing' element item.

Parameters:
item
    public void addSelectedSailing(SelectedSailing item) {
        .add(item);
    }

    
Get 'SelectedSailing' element item by position.

Parameters:
index
Returns:
item
    public SelectedSailing getSelectedSailing(int index) {
        return .get(index);
    }

    
Remove all 'SelectedSailing' element items.
    public void clearSelectedSailingList() {
        .clear();
    }

    
Get the 'TPA_Extensions' element value.

Returns:
value
    public TPAExtensions getTPAExtensions() {
        return ;
    }

    
Set the 'TPA_Extensions' element value.

Parameters:
TPAExtensions
    public void setTPAExtensions(TPAExtensions TPAExtensions) {
        this. = TPAExtensions;
    }

    
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;
    }
    
Contains information related to the selected sailing. Typically the selected sailing is one of the sailings returned in the previous sailing availability response. 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="SelectedSailing" maxOccurs="3">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="SelectedCabin" maxOccurs="4">
         <!-- Reference to inner class SelectedCabin -->
       </xs:element>
       <xs:element name="Dining" minOccurs="0" maxOccurs="5">
         <xs:complexType>
           <xs:attributeGroup ref="ns:CruiseDiningGroup"/>
         </xs:complexType>
       </xs:element>
       <xs:element name="Insurance" minOccurs="0" maxOccurs="9">
         <xs:complexType>
           <xs:attributeGroup ref="ns:CruiseInsuranceGroup"/>
         </xs:complexType>
       </xs:element>
       <xs:element type="ns:CruiseProfileType" name="CruiseProfiles" minOccurs="0" maxOccurs="3"/>
       <xs:element type="ns:AcceptedPaymentsType" name="AcceptedPayments" minOccurs="0"/>
       <xs:element type="ns:ParagraphType" name="Information" minOccurs="0" maxOccurs="5"/>
     </xs:sequence>
     <xs:attributeGroup ref="ns:SelectedSailingGroup"/>
   </xs:complexType>
 </xs:element>
 
    public static class SelectedSailing
    {
        private List<SelectedCabinselectedCabinList = new ArrayList<SelectedCabin>();
        private List<CruiseDiningGroupdiningList = new ArrayList<CruiseDiningGroup>();
        private List<CruiseProfilecruiseProfileList = new ArrayList<CruiseProfile>();
        private AcceptedPayments acceptedPayments;
        private List<ParagraphinformationList = new ArrayList<Paragraph>();
        private SelectedSailingGroup selectedSailingGroup;

        
Get the list of 'SelectedCabin' element items.

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

        
Set the list of 'SelectedCabin' element items.

Parameters:
list
        public void setSelectedCabinList(List<SelectedCabinlist) {
             = list;
        }

        
Get the number of 'SelectedCabin' element items.

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

        
Add a 'SelectedCabin' element item.

Parameters:
item
        public void addSelectedCabin(SelectedCabin item) {
            .add(item);
        }

        
Get 'SelectedCabin' element item by position.

Parameters:
index
Returns:
item
        public SelectedCabin getSelectedCabin(int index) {
            return .get(index);
        }

        
Remove all 'SelectedCabin' element items.
        public void clearSelectedCabinList() {
            .clear();
        }

        
Get the list of 'Dining' element items. A list of dining options with the availability status.

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

        
Set the list of 'Dining' element items. A list of dining options with the availability status.

Parameters:
list
        public void setDiningList(List<CruiseDiningGrouplist) {
             = list;
        }

        
Get the number of 'Dining' element items.

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

        
Add a 'Dining' element item.

Parameters:
item
        public void addDining(CruiseDiningGroup item) {
            .add(item);
        }

        
Get 'Dining' element item by position.

Parameters:
index
Returns:
item
        public CruiseDiningGroup getDining(int index) {
            return .get(index);
        }

        
Remove all 'Dining' element items.
        public void clearDiningList() {
            .clear();
        }

        
Get the list of 'Insurance' element items. A list of insurances with the availability status.

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

        
Set the list of 'Insurance' element items. A list of insurances with the availability status.

Parameters:
list
        public void setInsuranceList(List<CruiseInsuranceGrouplist) {
             = list;
        }

        
Get the number of 'Insurance' element items.

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

        
Add a 'Insurance' element item.

Parameters:
item
        public void addInsurance(CruiseInsuranceGroup item) {
            .add(item);
        }

        
Get 'Insurance' element item by position.

Parameters:
index
Returns:
item
        public CruiseInsuranceGroup getInsurance(int index) {
            return .get(index);
        }

        
Remove all 'Insurance' element items.
        public void clearInsuranceList() {
            .clear();
        }

        
Get the list of 'CruiseProfiles' element items. Specifies the cruise profile options for this reservation.

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

        
Set the list of 'CruiseProfiles' element items. Specifies the cruise profile options for this reservation.

Parameters:
list
        public void setCruiseProfileList(List<CruiseProfilelist) {
             = list;
        }

        
Get the number of 'CruiseProfiles' element items.

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

        
Add a 'CruiseProfiles' element item.

Parameters:
item
        public void addCruiseProfile(CruiseProfile item) {
            .add(item);
        }

        
Get 'CruiseProfiles' element item by position.

Parameters:
index
Returns:
item
        public CruiseProfile getCruiseProfile(int index) {
            return .get(index);
        }

        
Remove all 'CruiseProfiles' element items.
        public void clearCruiseProfileList() {
            .clear();
        }

        
Get the 'AcceptedPayments' element value. Specifies the Payment Options Information

Returns:
value
        public AcceptedPayments getAcceptedPayments() {
            return ;
        }

        
Set the 'AcceptedPayments' element value. Specifies the Payment Options Information

Parameters:
acceptedPayments
        public void setAcceptedPayments(AcceptedPayments acceptedPayments) {
            this. = acceptedPayments;
        }

        
Get the list of 'Information' element items. Contains information such as advisories or marketing messages returned by the cruise line.

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

        
Set the list of 'Information' element items. Contains information such as advisories or marketing messages returned by the cruise line.

Parameters:
list
        public void setInformationList(List<Paragraphlist) {
             = list;
        }

        
Get the number of 'Information' element items.

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

        
Add a 'Information' element item.

Parameters:
item
        public void addInformation(Paragraph item) {
            .add(item);
        }

        
Get 'Information' element item by position.

Parameters:
index
Returns:
item
        public Paragraph getInformation(int index) {
            return .get(index);
        }

        
Remove all 'Information' element items.
        public void clearInformationList() {
            .clear();
        }

        
Get the 'SelectedSailingGroup' attributeGroup value.

Returns:
value
        public SelectedSailingGroup getSelectedSailingGroup() {
            return ;
        }

        
Set the 'SelectedSailingGroup' attributeGroup value.

Parameters:
selectedSailingGroup
        public void setSelectedSailingGroup(
                SelectedSailingGroup selectedSailingGroup) {
            this. = selectedSailingGroup;
        }
        
Cabins for the given sailing for which a hold has been requested. 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="SelectedCabin" maxOccurs="4">
   <xs:complexType>
     <xs:attribute type="xs:string" use="optional" name="Status"/>
     <xs:attribute type="xs:dateTime" use="optional" name="ReleaseDateTime"/>
     <xs:attributeGroup ref="ns:CruiseCabinGroup"/>
   </xs:complexType>
 </xs:element>
 
        public static class SelectedCabin
        {
            private String status;
            private DateTime releaseDateTime;
            private CruiseCabinGroup cruiseCabinGroup;

            
Get the 'Status' attribute value. Specifies the status of the category. Refer to OpenTravel Code table Status (STS).

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

            
Set the 'Status' attribute value. Specifies the status of the category. Refer to OpenTravel Code table Status (STS).

Parameters:
status
            public void setStatus(String status) {
                this. = status;
            }

            
Get the 'ReleaseDateTime' attribute value. Date the held cabin will be released back to inventory.

Returns:
value
            public DateTime getReleaseDateTime() {
                return ;
            }

            
Set the 'ReleaseDateTime' attribute value. Date the held cabin will be released back to inventory.

Parameters:
releaseDateTime
            public void setReleaseDateTime(DateTime releaseDateTime) {
                this. = releaseDateTime;
            }

            
Get the 'CruiseCabinGroup' attributeGroup value.

Returns:
value
            public CruiseCabinGroup getCruiseCabinGroup() {
                return ;
            }

            
Set the 'CruiseCabinGroup' attributeGroup value.

Parameters:
cruiseCabinGroup
            public void setCruiseCabinGroup(CruiseCabinGroup cruiseCabinGroup) {
                this. = cruiseCabinGroup;
            }
        }
    }
New to GrepCode? Check out our FAQ X