Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012A.loyalty;
  
  import java.util.List;
The CertificateCreateRS allows businesses to communicate with their loyalty service provider to generate redemption certificates for their customers. 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_LoyaltyCertificateCreateRS">
   <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="LoyaltyCertificateDetail" minOccurs="0" maxOccurs="999">
           <!-- Reference to inner class LoyaltyCertificateDetail -->
         </xs:element>
         <xs:element name="Customer" minOccurs="0" maxOccurs="999">
           <!-- Reference to inner class Customer -->
         </xs:element>
         <xs:element type="ns:LoyaltyTravelInfoType" name="TravelInfo" minOccurs="0" maxOccurs="99"/>
         <xs:element type="ns:AccountInfoType" name="AccountInfo" minOccurs="0" maxOccurs="999"/>
       </xs:sequence>
       <xs:element type="ns:ErrorsType" name="Errors"/>
     </xs:choice>
     <xs:attributeGroup ref="ns:OTA_PayloadStdAttributes"/>
   </xs:complexType>
 </xs:element>
 
 
 public class CertificateCreateRS
 {
     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 List<CustomercustomerList = new ArrayList<Customer>();
     private List<AccountInfoaccountInfoList = new ArrayList<AccountInfo>();
     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. An element that is not intended to contain any data. The mere presence of a success element within the response message indicates that the incoming request message was processed successfully.

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

    
Set the 'Success' element value. An element that is not intended to contain any data. The mere presence of a success element within the response message indicates that the incoming request message was processed successfully.

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

    
Get the 'Warnings' element value. Indicates that the recipient of the request message identified one or more business-level warnings/errors, but the message itself was successfully processed.

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

    
Set the 'Warnings' element value. Indicates that the recipient of the request message identified one or more business-level warnings/errors, but the message itself was successfully processed.

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

    
Get the list of 'LoyaltyCertificateDetail' element items.

Returns:
list
        return ;
    }

    
Set the list of 'LoyaltyCertificateDetail' element items.

Parameters:
list
    public void setLoyaltyCertificateDetailList(
            List<LoyaltyCertificateDetaillist) {
         = list;
    }

    
Get the number of 'LoyaltyCertificateDetail' element items.

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

    
Add a 'LoyaltyCertificateDetail' element item.

Parameters:
item
        .add(item);
    }

    
Get 'LoyaltyCertificateDetail' element item by position.

Parameters:
index
Returns:
item
        return .get(index);
    }

    
Remove all 'LoyaltyCertificateDetail' element items.
    public void clearLoyaltyCertificateDetailList() {
    }

    
Get the list of 'Customer' element items.

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

    
Set the list of 'Customer' element items.

Parameters:
list
    public void setCustomerList(List<Customerlist) {
         = list;
    }

    
Get the number of 'Customer' element items.

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

    
Add a 'Customer' element item.

Parameters:
item
    public void addCustomer(Customer item) {
        .add(item);
    }

    
Get 'Customer' element item by position.

Parameters:
index
Returns:
item
    public Customer getCustomer(int index) {
        return .get(index);
    }

    
Remove all 'Customer' element items.
    public void clearCustomerList() {
        .clear();
    }

    
Get the list of 'TravelInfo' element items. Travel information for created certificates.

Returns:
list
        return ;
    }

    
Set the list of 'TravelInfo' element items. Travel information for created certificates.

Parameters:
list
    public void setTravelInfoList(List<LoyaltyTravelInfolist) {
         = list;
    }

    
Get the number of 'TravelInfo' element items.

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

    
Add a 'TravelInfo' element item.

Parameters:
item
    public void addTravelInfo(LoyaltyTravelInfo item) {
        .add(item);
    }

    
Get 'TravelInfo' element item by position.

Parameters:
index
Returns:
item
    public LoyaltyTravelInfo getTravelInfo(int index) {
        return .get(index);
    }

    
Remove all 'TravelInfo' element items.
    public void clearTravelInfoList() {
        .clear();
    }

    
Get the list of 'AccountInfo' element items. Loyalty account information used to create certificate.

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

    
Set the list of 'AccountInfo' element items. Loyalty account information used to create certificate.

Parameters:
list
    public void setAccountInfoList(List<AccountInfolist) {
         = list;
    }

    
Get the number of 'AccountInfo' element items.

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

    
Add a 'AccountInfo' element item.

Parameters:
item
    public void addAccountInfo(AccountInfo item) {
        .add(item);
    }

    
Get 'AccountInfo' element item by position.

Parameters:
index
Returns:
item
    public AccountInfo getAccountInfo(int index) {
        return .get(index);
    }

    
Remove all 'AccountInfo' element items.
    public void clearAccountInfoList() {
        .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. Indicates that an error occurred in the processing of the incoming request message. An error is defined as a malformed XML message that could not be processed.

Returns:
value
    public Errors getErrors() {
        return ;
    }

    
Set the 'Errors' element value. Indicates that an error occurred in the processing of the incoming request message. An error is defined as a malformed XML message that could not be processed.

Parameters:
errors
    public void setErrors(Errors errors) {
        this. = errors;
    }

    
Get the 'OTA_PayloadStdAttributes' attributeGroup value.

Returns:
value
        return ;
    }

    
Set the 'OTA_PayloadStdAttributes' attributeGroup value.

Parameters:
OTAPayloadStdAttributes
    public void setOTAPayloadStdAttributes(
            OTAPayloadStdAttributes OTAPayloadStdAttributes) {
        this. = OTAPayloadStdAttributes;
    }
    
Details about the loyalty certificate, including certifacte number and type. 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="LoyaltyCertificateDetail" minOccurs="0" maxOccurs="999">
   <xs:complexType>
     <xs:attributeGroup ref="ns:LoyaltyCertificateNumberGroup"/>
     <xs:attribute type="xs:string" use="optional" name="CustomerRPH"/>
     <xs:attribute type="xs:string" use="optional" name="CertificateType"/>
     <xs:attribute type="xs:int" use="optional" name="CertificateRefNumber"/>
   </xs:complexType>
 </xs:element>
 
    public static class LoyaltyCertificateDetail
    {
        private String customerRPH;
        private String certificate;
        private Integer certificateRefNumber;

        
Get the 'LoyaltyCertificateNumberGroup' attributeGroup value.

Returns:
value
            return ;
        }

        
Set the 'LoyaltyCertificateNumberGroup' attributeGroup value.

Parameters:
loyaltyCertificateNumberGroup
        public void setLoyaltyCertificateNumberGroup(
                LoyaltyCertificateNumberGroup loyaltyCertificateNumberGroup) {
            this. = loyaltyCertificateNumberGroup;
        }

        
Get the 'CustomerRPH' attribute value. Reference of the customer the certificate is created for.

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

        
Set the 'CustomerRPH' attribute value. Reference of the customer the certificate is created for.

Parameters:
customerRPH
        public void setCustomerRPH(String customerRPH) {
            this. = customerRPH;
        }

        
Get the 'CertificateType' attribute value. Describes the currency type to be deducted (e.g. miles, points, vouchers, stays.)

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

        
Set the 'CertificateType' attribute value. Describes the currency type to be deducted (e.g. miles, points, vouchers, stays.)

Parameters:
certificate
        public void setCertificate(String certificate) {
            this. = certificate;
        }

        
Get the 'CertificateRefNumber' attribute value. A unique reference for the created certificate.

Returns:
value
        public Integer getCertificateRefNumber() {
            return ;
        }

        
Set the 'CertificateRefNumber' attribute value. A unique reference for the created certificate.

Parameters:
certificateRefNumber
        public void setCertificateRefNumber(Integer certificateRefNumber) {
            this. = certificateRefNumber;
        }
    }
    
Customer for whom a certificate is created. 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="Customer" minOccurs="0" maxOccurs="999">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:PersonNameType">
         <xs:attribute type="xs:string" use="optional" name="RPH"/>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
    public static class Customer extends PersonName
    {
        private String RPH;

        
Get the 'RPH' attribute value. The Reference Place Holder (RPH) is an index code used to identify an instance in a collection of like items (e.g. used to assign individual passengers or clients to particular itinerary items).

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

        
Set the 'RPH' attribute value. The Reference Place Holder (RPH) is an index code used to identify an instance in a collection of like items (e.g. used to assign individual passengers or clients to particular itinerary items).

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