Class AssignmentInfo
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.assign.AssignmentInfo
- All Implemented Interfaces:
- Serializable,- Comparable<Object>,- IDBean,- ViewEntry,- Cacheable
A class to store Flight Assignments.
- Since:
- 1.0
- Version:
- 11.0
- Author:
- Luke
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionAssignmentInfo(String eqType) Creates a new Flight Assignment for a particular Equipment Type.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds an Assigned Flight to this Assignment.voidAdds a Flight Report to this Assignment.Returns the date/time this Assignment was assigned to the Pilot.Returns the individual Legs for this Assignment.Returns the date/time this Assignment was completed by the Pilot.Returns the equipment type for this assignment.intReturns the ID of the associated Online Event.Returns the Flight Reports linked to this Assignment.intReturns the Pilot Database ID for this Flight Assignment.Returns the CSS class for this object if rendered in a view table.Returns the status of this Assignment.booleanDetermines if all flights in this assignment are complete.booleanReturns if this Assignment should be automatically purged on a Schedule reload.booleanisRandom()Returns if this Assignment was randomly generated.booleanReturns if this Assignment should be made available again when complete.voidRemoves an unflown leg from this assignment.voidsetAssignDate(Instant dt) Updates the Date this Assignment was assigned to a Pilot.voidUpdates the Date this Assignment was completed.voidsetEventID(int id) Sets the associated Online Event for this Assignment.voidsetPilotID(int id) Updates the associated Pilot for this Assignment.voidsetPurgeable(boolean canPurge) Marks this Assignment as purgeable when the Schedule database is updated.voidsetRandom(boolean random) Marks this Assignment as randomly generated.voidsetRepeating(boolean repeating) Marks this Assignment as repeating (automatically regenerated when completed).voidsetStatus(AssignmentStatus status) Updates the status of this Flight Assignment.intsize()Returns the number of flight legs in this Assignment.Methods inherited from class org.deltava.beans.DatabaseBeancacheKey, compareTo, equals, getHexID, getID, hashCode, setID, validateID, validateID
- 
Constructor Details- 
AssignmentInfoCreates a new Flight Assignment for a particular Equipment Type.- Parameters:
- eqType- the equipment type code
- Throws:
- NullPointerException- if eqType is null
 
 
- 
- 
Method Details- 
getAssignmentsReturns the individual Legs for this Assignment.- Returns:
- a List of AssignmentInfo beans
- See Also:
 
- 
getFlightsReturns the Flight Reports linked to this Assignment.- Returns:
- a List of FlightReport beans
- See Also:
 
- 
getEquipmentTypeReturns the equipment type for this assignment.- Returns:
- the equipment type
 
- 
getEventIDpublic int getEventID()Returns the ID of the associated Online Event.- Returns:
- the Database ID of the associated Event, or zero if not linked to an event
- See Also:
 
- 
getPilotIDpublic int getPilotID()Returns the Pilot Database ID for this Flight Assignment.- Returns:
- the Database ID of the Assigned Pilot, or zero if unassigned
- See Also:
 
- 
getStatusReturns the status of this Assignment.- Returns:
- the AssignmentStatus
- See Also:
 
- 
getAssignDateReturns the date/time this Assignment was assigned to the Pilot.- Returns:
- the date/time assignment was made
- See Also:
 
- 
getCompletionDateReturns the date/time this Assignment was completed by the Pilot.- Returns:
- the date/time assignment was completed
- See Also:
 
- 
isCompletepublic boolean isComplete()Determines if all flights in this assignment are complete.- Returns:
- TRUE if all assignment flights are complete, otherwise FALS
 
- 
isRandompublic boolean isRandom()Returns if this Assignment was randomly generated.- Returns:
- TRUE if the assignment was randomly created, otherwise FALSE
- See Also:
 
- 
isRepeatingpublic boolean isRepeating()Returns if this Assignment should be made available again when complete.- Returns:
- TRUE if the assignment is auto-repeating, otherwise FALSE
- See Also:
 
- 
isPurgeablepublic boolean isPurgeable()Returns if this Assignment should be automatically purged on a Schedule reload.- Returns:
- TRUE if the assignment should be purged, otherwise FALSE
- See Also:
 
- 
sizepublic int size()Returns the number of flight legs in this Assignment.- Returns:
- the number of legs
 
- 
addAssignmentAdds an Assigned Flight to this Assignment.- Parameters:
- a- the assigned flight
 
- 
addFlightAdds a Flight Report to this Assignment. This will update the Pilot ID for this Assignment if not set.- Parameters:
- fr- the flight report
 
- 
setEventIDpublic void setEventID(int id) Sets the associated Online Event for this Assignment.- Parameters:
- id- the Event Database ID
- Throws:
- IllegalArgumentException- if id is negative
 
- 
setPilotIDpublic void setPilotID(int id) Updates the associated Pilot for this Assignment.- Parameters:
- id- the Pilot Database ID
- Throws:
- IllegalArgumentException- if id is negative
- See Also:
 
- 
setStatusUpdates the status of this Flight Assignment.- Parameters:
- status- the AssignmentStatus
- See Also:
 
- 
setRandompublic void setRandom(boolean random) Marks this Assignment as randomly generated.- Parameters:
- random- TRUE if generated from Find a Flight, otherwise FALSE
- See Also:
 
- 
setRepeatingpublic void setRepeating(boolean repeating) Marks this Assignment as repeating (automatically regenerated when completed).- Parameters:
- repeating- TRUE if automatically repeating, otherwise FALSE
- See Also:
 
- 
setPurgeablepublic void setPurgeable(boolean canPurge) Marks this Assignment as purgeable when the Schedule database is updated.- Parameters:
- canPurge- TRUE if the Assignment should be purged on a Schedule update.
- See Also:
 
- 
setAssignDateUpdates the Date this Assignment was assigned to a Pilot.- Parameters:
- dt- the date/time this Assignment was assigned
- See Also:
 
- 
setCompletionDateUpdates the Date this Assignment was completed.- Parameters:
- dt- the date/time this Assignment was completed
- See Also:
 
- 
removeRemoves an unflown leg from this assignment.- Parameters:
- rp- the RoutePair to remove
 
- 
getRowClassNameDescription copied from interface:ViewEntryReturns the CSS class for this object if rendered in a view table.- Specified by:
- getRowClassNamein interface- ViewEntry
- Returns:
- the CSS class name, or NULL if none
 
 
-