org.ota.hotel
Class Offer.OfferRules.OfferRule

java.lang.Object
  extended by org.ota.hotel.Offer.OfferRules.OfferRule
Enclosing class:
Offer.OfferRules

public static class Offer.OfferRules.OfferRule
extends java.lang.Object

Defines conditions for which the offer applies. 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="OfferRule" maxOccurs="99">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="DateRestriction" minOccurs="0" maxOccurs="5">
         <!-- Reference to inner class DateRestriction -->
       </xs:element>
       <xs:element type="ns:LengthsOfStayType" name="LengthsOfStay" minOccurs="0"/>
       <xs:element type="ns:DOW_RestrictionsType" name="DOW_Restrictions" minOccurs="0"/>
       <xs:element name="Occupancy" minOccurs="0" maxOccurs="5">
         <!-- Reference to inner class Occupancy -->
       </xs:element>
       <xs:element name="Inventories" minOccurs="0">
         <!-- Reference to inner class Inventories -->
       </xs:element>
     </xs:sequence>
     <xs:attribute type="ns:DayOfWeekType" use="optional" name="StayOverDate"/>
     <xs:attribute type="xs:int" use="optional" name="MinTotalOccupancy"/>
     <xs:attribute type="xs:int" use="optional" name="MaxTotalOccupancy"/>
     <xs:attribute type="xs:int" use="optional" name="MaxContiguousBookings"/>
     <xs:attribute type="xs:string" use="optional" name="MaxAdvancedBookingOffset"/>
     <xs:attribute type="xs:string" use="optional" name="MinAdvancedBookingOffset"/>
   </xs:complexType>
 </xs:element>
 


Nested Class Summary
static class Offer.OfferRules.OfferRule.DateRestriction
          Defines date restrictions for booking and/or stays with this offer.
static class Offer.OfferRules.OfferRule.Inventories
          Collection of inventory.
static class Offer.OfferRules.OfferRule.Occupancy
          Provides parameters of occupancy limits.
 
Constructor Summary
Offer.OfferRules.OfferRule()
           
 
Method Summary
 void addDateRestriction(Offer.OfferRules.OfferRule.DateRestriction item)
          Add a 'DateRestriction' element item.
 void addOccupancy(Offer.OfferRules.OfferRule.Occupancy item)
          Add a 'Occupancy' element item.
 void clearDateRestrictions()
          Remove all 'DateRestriction' element items.
 void clearOccupancies()
          Remove all 'Occupancy' element items.
 Offer.OfferRules.OfferRule.DateRestriction getDateRestriction(int index)
          Get 'DateRestriction' element item by position.
 java.util.List<Offer.OfferRules.OfferRule.DateRestriction> getDateRestrictions()
          Get the list of 'DateRestriction' element items.
 DOWRestrictions getDOWRestrictions()
          Get the 'DOW_Restrictions' element value.
 Offer.OfferRules.OfferRule.Inventories getInventories()
          Get the 'Inventories' element value.
 LengthsOfStay getLengthsOfStay()
          Get the 'LengthsOfStay' element value.
 java.lang.String getMaxAdvancedBookingOffset()
          Get the 'MaxAdvancedBookingOffset' attribute value.
 java.lang.Integer getMaxContiguousBookings()
          Get the 'MaxContiguousBookings' attribute value.
 java.lang.Integer getMaxTotalOccupancy()
          Get the 'MaxTotalOccupancy' attribute value.
 java.lang.String getMinAdvancedBookingOffset()
          Get the 'MinAdvancedBookingOffset' attribute value.
 java.lang.Integer getMinTotalOccupancy()
          Get the 'MinTotalOccupancy' attribute value.
 java.util.List<Offer.OfferRules.OfferRule.Occupancy> getOccupancies()
          Get the list of 'Occupancy' element items.
 Offer.OfferRules.OfferRule.Occupancy getOccupancy(int index)
          Get 'Occupancy' element item by position.
 DayOfWeek getStayOverDate()
          Get the 'StayOverDate' attribute value.
 void setDateRestrictions(java.util.List<Offer.OfferRules.OfferRule.DateRestriction> list)
          Set the list of 'DateRestriction' element items.
 void setDOWRestrictions(DOWRestrictions DOWRestrictions)
          Set the 'DOW_Restrictions' element value.
 void setInventories(Offer.OfferRules.OfferRule.Inventories inventories)
          Set the 'Inventories' element value.
 void setLengthsOfStay(LengthsOfStay lengthsOfStay)
          Set the 'LengthsOfStay' element value.
 void setMaxAdvancedBookingOffset(java.lang.String maxAdvancedBookingOffset)
          Set the 'MaxAdvancedBookingOffset' attribute value.
 void setMaxContiguousBookings(java.lang.Integer maxContiguousBookings)
          Set the 'MaxContiguousBookings' attribute value.
 void setMaxTotalOccupancy(java.lang.Integer maxTotalOccupancy)
          Set the 'MaxTotalOccupancy' attribute value.
 void setMinAdvancedBookingOffset(java.lang.String minAdvancedBookingOffset)
          Set the 'MinAdvancedBookingOffset' attribute value.
 void setMinTotalOccupancy(java.lang.Integer minTotalOccupancy)
          Set the 'MinTotalOccupancy' attribute value.
 void setOccupancies(java.util.List<Offer.OfferRules.OfferRule.Occupancy> list)
          Set the list of 'Occupancy' element items.
 void setStayOverDate(DayOfWeek stayOverDate)
          Set the 'StayOverDate' attribute value.
 int sizeDateRestrictions()
          Get the number of 'DateRestriction' element items.
 int sizeOccupancies()
          Get the number of 'Occupancy' element items.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Offer.OfferRules.OfferRule

public Offer.OfferRules.OfferRule()
Method Detail

getDateRestrictions

public java.util.List<Offer.OfferRules.OfferRule.DateRestriction> getDateRestrictions()
Get the list of 'DateRestriction' element items.

Returns:
list

setDateRestrictions

public void setDateRestrictions(java.util.List<Offer.OfferRules.OfferRule.DateRestriction> list)
Set the list of 'DateRestriction' element items.

Parameters:
list -

sizeDateRestrictions

public int sizeDateRestrictions()
Get the number of 'DateRestriction' element items.

Returns:
count

addDateRestriction

public void addDateRestriction(Offer.OfferRules.OfferRule.DateRestriction item)
Add a 'DateRestriction' element item.

Parameters:
item -

getDateRestriction

public Offer.OfferRules.OfferRule.DateRestriction getDateRestriction(int index)
Get 'DateRestriction' element item by position.

Parameters:
index -
Returns:
item

clearDateRestrictions

public void clearDateRestrictions()
Remove all 'DateRestriction' element items.


getLengthsOfStay

public LengthsOfStay getLengthsOfStay()
Get the 'LengthsOfStay' element value. A collection of lengths of stay.

Returns:
value

setLengthsOfStay

public void setLengthsOfStay(LengthsOfStay lengthsOfStay)
Set the 'LengthsOfStay' element value. A collection of lengths of stay.

Parameters:
lengthsOfStay -

getDOWRestrictions

public DOWRestrictions getDOWRestrictions()
Get the 'DOW_Restrictions' element value. A collection of Day Of Week restrictions.

Returns:
value

setDOWRestrictions

public void setDOWRestrictions(DOWRestrictions DOWRestrictions)
Set the 'DOW_Restrictions' element value. A collection of Day Of Week restrictions.

Parameters:
DOWRestrictions -

getOccupancies

public java.util.List<Offer.OfferRules.OfferRule.Occupancy> getOccupancies()
Get the list of 'Occupancy' element items.

Returns:
list

setOccupancies

public void setOccupancies(java.util.List<Offer.OfferRules.OfferRule.Occupancy> list)
Set the list of 'Occupancy' element items.

Parameters:
list -

sizeOccupancies

public int sizeOccupancies()
Get the number of 'Occupancy' element items.

Returns:
count

addOccupancy

public void addOccupancy(Offer.OfferRules.OfferRule.Occupancy item)
Add a 'Occupancy' element item.

Parameters:
item -

getOccupancy

public Offer.OfferRules.OfferRule.Occupancy getOccupancy(int index)
Get 'Occupancy' element item by position.

Parameters:
index -
Returns:
item

clearOccupancies

public void clearOccupancies()
Remove all 'Occupancy' element items.


getInventories

public Offer.OfferRules.OfferRule.Inventories getInventories()
Get the 'Inventories' element value.

Returns:
value

setInventories

public void setInventories(Offer.OfferRules.OfferRule.Inventories inventories)
Set the 'Inventories' element value.

Parameters:
inventories -

getStayOverDate

public DayOfWeek getStayOverDate()
Get the 'StayOverDate' attribute value. Indicates a specific day on which the guest must stay over in order to be eligible for the offer.

Returns:
value

setStayOverDate

public void setStayOverDate(DayOfWeek stayOverDate)
Set the 'StayOverDate' attribute value. Indicates a specific day on which the guest must stay over in order to be eligible for the offer.

Parameters:
stayOverDate -

getMinTotalOccupancy

public java.lang.Integer getMinTotalOccupancy()
Get the 'MinTotalOccupancy' attribute value. Defines the minimum number of total occupants required for a rate plan.

Returns:
value

setMinTotalOccupancy

public void setMinTotalOccupancy(java.lang.Integer minTotalOccupancy)
Set the 'MinTotalOccupancy' attribute value. Defines the minimum number of total occupants required for a rate plan.

Parameters:
minTotalOccupancy -

getMaxTotalOccupancy

public java.lang.Integer getMaxTotalOccupancy()
Get the 'MaxTotalOccupancy' attribute value. Defines the maximum number of total occupants allowed for a rate plan.

Returns:
value

setMaxTotalOccupancy

public void setMaxTotalOccupancy(java.lang.Integer maxTotalOccupancy)
Set the 'MaxTotalOccupancy' attribute value. Defines the maximum number of total occupants allowed for a rate plan.

Parameters:
maxTotalOccupancy -

getMaxContiguousBookings

public java.lang.Integer getMaxContiguousBookings()
Get the 'MaxContiguousBookings' attribute value. The maximum number of times a rate may be booked contiguously within a reservation (often used with packages).

Returns:
value

setMaxContiguousBookings

public void setMaxContiguousBookings(java.lang.Integer maxContiguousBookings)
Set the 'MaxContiguousBookings' attribute value. The maximum number of times a rate may be booked contiguously within a reservation (often used with packages).

Parameters:
maxContiguousBookings -

getMaxAdvancedBookingOffset

public java.lang.String getMaxAdvancedBookingOffset()
Get the 'MaxAdvancedBookingOffset' attribute value. Maximum days before the arrival date for which this offer may be booked.

Returns:
value

setMaxAdvancedBookingOffset

public void setMaxAdvancedBookingOffset(java.lang.String maxAdvancedBookingOffset)
Set the 'MaxAdvancedBookingOffset' attribute value. Maximum days before the arrival date for which this offer may be booked.

Parameters:
maxAdvancedBookingOffset -

getMinAdvancedBookingOffset

public java.lang.String getMinAdvancedBookingOffset()
Get the 'MinAdvancedBookingOffset' attribute value. Minimum days before the arrival date for which this offer may be booked.

Returns:
value

setMinAdvancedBookingOffset

public void setMinAdvancedBookingOffset(java.lang.String minAdvancedBookingOffset)
Set the 'MinAdvancedBookingOffset' attribute value. Minimum days before the arrival date for which this offer may be booked.

Parameters:
minAdvancedBookingOffset -