public class IlvSimpleReservation extends IlvAbstractReservation
IlvSimpleReservation
is a relatively simple, memory-based
implementation of the IlvReservation
interface that can
be extended in a straightforward manner for more complex needs.
IlvSimpleReservation
does not provide any connection to
a persistent datastore itself.Constructor and Description |
---|
IlvSimpleReservation(IlvResource resource,
IlvActivity activity)
Creates a new
IlvSimpleReservation that assigns the
specified resource and activity . |
Modifier and Type | Method and Description |
---|---|
IlvActivity |
getActivity()
Returns the activity for this reservation.
|
IlvResource |
getResource()
Returns the resource for this reservation.
|
void |
setResource(IlvResource resource)
Sets the resource for this reservation.
|
fireEvent, fireReservedResourceAboutToChange, fireReservedResourceChanged, getGanttModel, paramString, setGanttModelImpl, toString
public IlvSimpleReservation(IlvResource resource, IlvActivity activity)
IlvSimpleReservation
that assigns the
specified resource
and activity
.public IlvResource getResource()
public void setResource(IlvResource resource)
resource
must be a member of the same
data model. Before the resource is modified the reservation's data model,
if any, will fire an aboutToChange
ReservedResourceEvent
.
After the resource is modified, the reservation's data model will fire a
changed ReservedResourceEvent
.
The implementation of this method can use
IlvGanttModelUtil.checkValidMemberResource(ilog.views.gantt.IlvResource, ilog.views.gantt.IlvGanttModel)
to validate
resource
.
resource
- The resource.IllegalArgumentException
- if resource
is
null
or is not a member of the same data model as this
reservation.ReservationEvent
,
ReservationListener.reservationChanged(ilog.views.gantt.event.ReservationEvent)
public IlvActivity getActivity()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.