Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012A.cruise;
  
  import java.util.List;
The special service availability response message contains information about which special service packages are available for the given sailing. 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_CruiseSpecialServiceAvailRS">
   <xs:complexType>
     <xs:choice>
       <xs:sequence>
         <xs:element type="ns:SuccessType" name="Success"/>
         <xs:element type="ns:WarningsType" name="Warnings" minOccurs="0"/>
         <xs:element type="ns:SailingCategoryInfoType" name="SailingInfo"/>
         <xs:element name="SpecialServices" minOccurs="0">
           <!-- Reference to inner class SpecialServices -->
         </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 SpecialServiceAvailRS
 {
     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 SpecialServices specialServices;
     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 'SailingInfo' element value. Contains information related to the selected sailing.

Returns:
value
        return ;
    }

    
Set the 'SailingInfo' element value. Contains information related to the selected sailing.

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

    
Get the 'SpecialServices' element value.

Returns:
value
        return ;
    }

    
Set the 'SpecialServices' element value.

Parameters:
specialServices
    public void setSpecialServices(SpecialServices specialServices) {
        this. = specialServices;
    }

    
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 the list of special services available for the sailing, which meet the supplied query criteria. 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="SpecialServices" minOccurs="0">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="SpecialService" maxOccurs="150">
         <!-- Reference to inner class SpecialService -->
       </xs:element>
     </xs:sequence>
   </xs:complexType>
 </xs:element>
 
    public static class SpecialServices
    {
        private List<SpecialServicespecialServiceList = new ArrayList<SpecialService>();

        
Get the list of 'SpecialService' element items.

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

        
Set the list of 'SpecialService' element items.

Parameters:
list
        public void setSpecialServiceList(List<SpecialServicelist) {
             = list;
        }

        
Get the number of 'SpecialService' element items.

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

        
Add a 'SpecialService' element item.

Parameters:
item
        public void addSpecialService(SpecialService item) {
            .add(item);
        }

        
Get 'SpecialService' element item by position.

Parameters:
index
Returns:
item
        public SpecialService getSpecialService(int index) {
            return .get(index);
        }

        
Remove all 'SpecialService' element items.
        public void clearSpecialServiceList() {
            .clear();
        }
        
Contains the specific special service information. 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="SpecialService" maxOccurs="150">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:SpecialServiceType">
         <xs:sequence>
           <xs:element type="ns:PriceInfoType" name="PriceInfo" minOccurs="0" maxOccurs="5"/>
         </xs:sequence>
         <xs:attribute type="xs:string" use="optional" name="Description"/>
         <xs:attribute type="xs:string" use="optional" name="Status"/>
         <xs:attribute type="xs:boolean" use="optional" name="ServiceDateRequiredInd"/>
         <xs:attribute type="xs:boolean" use="optional" name="NbrOfYearsRequiredInd"/>
         <xs:attribute type="xs:string" use="optional" name="MinGuestsRequired"/>
         <xs:attribute type="xs:boolean" use="optional" name="UserRemarkRequiredInd"/>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
        public static class SpecialService
                extends
                    org.jibx.schema.org.opentravel._2012A.cruise.SpecialService
        {
            private List<PriceInfopriceInfoList = new ArrayList<PriceInfo>();
            private String description;
            private String status;
            private Boolean serviceDateRequiredInd;
            private Boolean nbrOfYearsRequiredInd;
            private String minGuestsRequired;
            private Boolean userRemarkRequiredInd;

            
Get the list of 'PriceInfo' element items. Information regarding pricing for special services when there is an associated cost.

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

            
Set the list of 'PriceInfo' element items. Information regarding pricing for special services when there is an associated cost.

Parameters:
list
            public void setPriceInfoList(List<PriceInfolist) {
                 = list;
            }

            
Get the number of 'PriceInfo' element items.

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

            
Add a 'PriceInfo' element item.

Parameters:
item
            public void addPriceInfo(PriceInfo item) {
                .add(item);
            }

            
Get 'PriceInfo' element item by position.

Parameters:
index
Returns:
item
            public PriceInfo getPriceInfo(int index) {
                return .get(index);
            }

            
Remove all 'PriceInfo' element items.
            public void clearPriceInfoList() {
                .clear();
            }

            
Get the 'Description' attribute value. Specifies the description of a special service.

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

            
Set the 'Description' attribute value. Specifies the description of a special service.

Parameters:
description
            public void setDescription(String description) {
                this. = description;
            }

            
Get the 'Status' attribute value. Specifies the booking status. Refer to OpenTravel Code list Status (STS).

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

            
Set the 'Status' attribute value. Specifies the booking status. Refer to OpenTravel Code list Status (STS).

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

            
Get the 'ServiceDateRequiredInd' attribute value. If true, a date (or date/time) needs to be provided to indicate when the special service should be delivered.

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

            
Set the 'ServiceDateRequiredInd' attribute value. If true, a date (or date/time) needs to be provided to indicate when the special service should be delivered.

Parameters:
serviceDateRequiredInd
            public void setServiceDateRequiredInd(Boolean serviceDateRequiredInd) {
                this. = serviceDateRequiredInd;
            }

            
Get the 'NbrOfYearsRequiredInd' attribute value. If true, the number of years pertaining to the event needs to be provided (e.g., the number of anniversary years, the age for a birthday).

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

            
Set the 'NbrOfYearsRequiredInd' attribute value. If true, the number of years pertaining to the event needs to be provided (e.g., the number of anniversary years, the age for a birthday).

Parameters:
nbrOfYearsRequiredInd
            public void setNbrOfYearsRequiredInd(Boolean nbrOfYearsRequiredInd) {
                this. = nbrOfYearsRequiredInd;
            }

            
Get the 'MinGuestsRequired' attribute value. The minimum number of guests required for this type of service.

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

            
Set the 'MinGuestsRequired' attribute value. The minimum number of guests required for this type of service.

Parameters:
minGuestsRequired
            public void setMinGuestsRequired(String minGuestsRequired) {
                this. = minGuestsRequired;
            }

            
Get the 'UserRemarkRequiredInd' attribute value. If true, a remark is required by the user when selecting a special service.

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

            
Set the 'UserRemarkRequiredInd' attribute value. If true, a remark is required by the user when selecting a special service.

Parameters:
userRemarkRequiredInd
            public void setUserRemarkRequiredInd(Boolean userRemarkRequiredInd) {
                this. = userRemarkRequiredInd;
            }
        }
    }
New to GrepCode? Check out our FAQ X