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 Unhold Request message requests that the specified cabin, currently held for a given sailing, be released back into inventory by the sailing vendor. 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_CruiseCabinUnholdRS">
   <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:sequence>
       <xs:element type="ns:ErrorsType" name="Errors"/>
     </xs:choice>
     <xs:attributeGroup ref="ns:OTA_PayloadStdAttributes"/>
   </xs:complexType>
 </xs:element>
 
 
 public class CabinUnholdRS
 {
     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. 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();
    }

    
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(s). 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:sequence>
     <xs:attributeGroup ref="ns:SelectedSailingGroup"/>
   </xs:complexType>
 </xs:element>
 
    public static class SelectedSailing
    {
        private List<SelectedCabinselectedCabinList = new ArrayList<SelectedCabin>();
        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 '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 release is being 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:attributeGroup ref="ns:CruiseCabinGroup"/>
   </xs:complexType>
 </xs:element>
 
        public static class SelectedCabin
        {
            private String status;
            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 '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