Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012A.golf;
  
  import java.util.List;
Information about the individual golfer for which the reservation is being requested. Schema fragment(s) for this class:
 <xs:complexType xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="GolferType">
   <xs:sequence>
     <xs:choice>
       <xs:element type="ns:PersonNameType" name="GolferInfo" minOccurs="0" maxOccurs="4"/>
       <xs:element name="Type" minOccurs="0" maxOccurs="4">
         <!-- Reference to inner class Type -->
       </xs:element>
     </xs:choice>
     <xs:element type="ns:AddressType" name="Address" minOccurs="0"/>
     <xs:element name="Telephone" minOccurs="0" maxOccurs="3">
       <xs:complexType>
         <xs:attributeGroup ref="ns:TelephoneGroup"/>
       </xs:complexType>
     </xs:element>
     <xs:element type="ns:EmailType" name="Email" minOccurs="0"/>
     <xs:element name="MembershipProgram" minOccurs="0" maxOccurs="99">
       <xs:complexType>
         <xs:attributeGroup ref="ns:CustomerLoyaltyGroup"/>
       </xs:complexType>
     </xs:element>
   </xs:sequence>
   <xs:attributeGroup ref="ns:GenderGroup"/>
   <xs:attributeGroup ref="ns:BirthDateGroup"/>
   <xs:attribute type="xs:string" use="optional" name="RPH"/>
 </xs:complexType>
 
 <xs:attributeGroup xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="BirthDateGroup">
   <xs:attribute type="xs:date" use="optional" name="BirthDate"/>
 </xs:attributeGroup>
 
 
 public class Golfer
 {
     private int choiceSelect = -1;
     private static final int GOLFER_INFO_LIST_CHOICE = 0;
     private static final int TYPE_LIST_CHOICE = 1;
     private List<PersonNamegolferInfoList = new ArrayList<PersonName>();
     private List<TypetypeList = new ArrayList<Type>();
     private Address address;
     private List<TelephoneGrouptelephoneList = new ArrayList<TelephoneGroup>();
     private Email email;
     private GenderGroup genderGroup;
     private LocalDate birthDate;
     private String RPH;
 
     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 GolferInfoList is current selection for choice.

Returns:
true if selection, false if not
 
     public boolean ifGolferInfoList() {
         return  == ;
     }

    
Get the list of 'GolferInfo' element items. The name of the golfer.

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

    
Set the list of 'GolferInfo' element items. The name of the golfer.

Parameters:
list
    public void setGolferInfoList(List<PersonNamelist) {
         = list;
    }

    
Get the number of 'GolferInfo' element items.

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

    
Add a 'GolferInfo' element item.

Parameters:
item
    public void addGolferInfo(PersonName item) {
        .add(item);
    }

    
Get 'GolferInfo' element item by position.

Parameters:
index
Returns:
item
    public PersonName getGolferInfo(int index) {
        return .get(index);
    }

    
Remove all 'GolferInfo' element items.
    public void clearGolferInfoList() {
        .clear();
    }

    
Check if TypeList is current selection for choice.

Returns:
true if selection, false if not
    public boolean ifTypeList() {
        return  == ;
    }

    
Get the list of 'Type' element items. A choice between entering name information for the golfer or summary golfer type qualifying information.

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

    
Set the list of 'Type' element items. A choice between entering name information for the golfer or summary golfer type qualifying information.

Parameters:
list
    public void setTypeList(List<Typelist) {
         = list;
    }

    
Get the number of 'Type' element items.

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

    
Add a 'Type' element item.

Parameters:
item
    public void addType(Type item) {
        .add(item);
    }

    
Get 'Type' element item by position.

Parameters:
index
Returns:
item
    public Type getType(int index) {
        return .get(index);
    }

    
Remove all 'Type' element items.
    public void clearTypeList() {
        .clear();
    }

    
Get the 'Address' element value. The address of the golfer.

Returns:
value
    public Address getAddress() {
        return ;
    }

    
Set the 'Address' element value. The address of the golfer.

Parameters:
address
    public void setAddress(Address address) {
        this. = address;
    }

    
Get the list of 'Telephone' element items. Telephone information for the golfer. Note that up to 3 unique phone numbers may be entered for the golfer, such as home, cell and work.

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

    
Set the list of 'Telephone' element items. Telephone information for the golfer. Note that up to 3 unique phone numbers may be entered for the golfer, such as home, cell and work.

Parameters:
list
    public void setTelephoneList(List<TelephoneGrouplist) {
         = list;
    }

    
Get the number of 'Telephone' element items.

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

    
Add a 'Telephone' element item.

Parameters:
item
    public void addTelephone(TelephoneGroup item) {
        .add(item);
    }

    
Get 'Telephone' element item by position.

Parameters:
index
Returns:
item
    public TelephoneGroup getTelephone(int index) {
        return .get(index);
    }

    
Remove all 'Telephone' element items.
    public void clearTelephoneList() {
        .clear();
    }

    
Get the 'Email' element value. An email address for the golfer.

Returns:
value
    public Email getEmail() {
        return ;
    }

    
Set the 'Email' element value. An email address for the golfer.

Parameters:
email
    public void setEmail(Email email) {
        this. = email;
    }

    
Get the list of 'MembershipProgram' element items. Membership program(s) associated with a golfer.

Returns:
list
        return ;
    }

    
Set the list of 'MembershipProgram' element items. Membership program(s) associated with a golfer.

Parameters:
list
    public void setMembershipProgramList(List<CustomerLoyaltyGrouplist) {
         = list;
    }

    
Get the number of 'MembershipProgram' element items.

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

    
Add a 'MembershipProgram' element item.

Parameters:
item
    public void addMembershipProgram(CustomerLoyaltyGroup item) {
        .add(item);
    }

    
Get 'MembershipProgram' element item by position.

Parameters:
index
Returns:
item
    public CustomerLoyaltyGroup getMembershipProgram(int index) {
        return .get(index);
    }

    
Remove all 'MembershipProgram' element items.
    public void clearMembershipProgramList() {
        .clear();
    }

    
Get the 'GenderGroup' attributeGroup value.

Returns:
value
    public GenderGroup getGenderGroup() {
        return ;
    }

    
Set the 'GenderGroup' attributeGroup value.

Parameters:
genderGroup
    public void setGenderGroup(GenderGroup genderGroup) {
        this. = genderGroup;
    }

    
Get the 'BirthDate' attribute value. Indicates the date of birth as indicated in the document, in ISO 8601 prescribed format.

Returns:
value
    public LocalDate getBirthDate() {
        return ;
    }

    
Set the 'BirthDate' attribute value. Indicates the date of birth as indicated in the document, in ISO 8601 prescribed format.

Parameters:
birthDate
    public void setBirthDate(LocalDate birthDate) {
        this. = birthDate;
    }

    
Get the 'RPH' attribute value. A unique ID that identifies this golfer.

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

    
Set the 'RPH' attribute value. A unique ID that identifies this golfer.

Parameters:
RPH
    public void setRPH(String RPH) {
        this. = RPH;
    }
    
Summary golfer type qualifying information.(Developer Notes): You may specify a golfer type using any of these methods: 1. Select a named value from the list (such as ClubMember) and enter a quantity. 2. Select the "Other_" option from the named list, enter your golfer type in the

Extension:
attribute and the quantity. Note, make sure the unique golfer type entered is known to your trading partners. 3. Enter an age qualifying code and a quantity.(Reference): OpenTravel Online Code List. 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="Type" minOccurs="0" maxOccurs="4">
   <xs:complexType>
     <xs:simpleContent>
       <xs:extension base="ns:GolferTypeEnum">
         <xs:attribute type="xs:string" use="optional" name="extension"/>
         <xs:attribute type="xs:string" use="optional" name="AgeQualifyingCode"/>
         <xs:attribute type="xs:string" use="optional" name="Quantity"/>
       </xs:extension>
     </xs:simpleContent>
   </xs:complexType>
 </xs:element>
 
    public static class Type
    {
        private GolferTypeEnum golferTypeEnum;
        private String extension;
        private String ageQualifyingCode;
        private String quantity;

        
Get the extension value.

Returns:
value
        public GolferTypeEnum getGolferTypeEnum() {
            return ;
        }

        
Set the extension value.

Parameters:
golferTypeEnum
        public void setGolferTypeEnum(GolferTypeEnum golferTypeEnum) {
            this. = golferTypeEnum;
        }

        
Get the 'extension' attribute value. A string value that represents an extended, enumerated value agreed upon between trading partners. Use this if you select the "Other_" enumerated value.

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

        
Set the 'extension' attribute value. A string value that represents an extended, enumerated value agreed upon between trading partners. Use this if you select the "Other_" enumerated value.

Parameters:
extension
        public void setExtension(String extension) {
            this. = extension;
        }

        
Get the 'AgeQualifyingCode' attribute value. An age qualifying code for this golfer. Use a value from the OpenTravel Age Qualifying Code List (AQC).

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

        
Set the 'AgeQualifyingCode' attribute value. An age qualifying code for this golfer. Use a value from the OpenTravel Age Qualifying Code List (AQC).

Parameters:
ageQualifyingCode
        public void setAgeQualifyingCode(String ageQualifyingCode) {
            this. = ageQualifyingCode;
        }

        
Get the 'Quantity' attribute value. The quantity of this type of golfer.

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

        
Set the 'Quantity' attribute value. The quantity of this type of golfer.

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