Package org.deltava.beans.schedule
Class SelectCall
java.lang.Object
org.deltava.beans.schedule.SelectCall
- All Implemented Interfaces:
Serializable
,Comparable<SelectCall>
,ViewEntry
A bean to store Aircraft SELCAL data and reservations.
- Since:
- 1.0
- Version:
- 11.0
- Author:
- Luke
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(SelectCall sc2) Compares two beans by comparing the SELCAL codes.void
free()
Marks this SELCAL record as available.Returns the aircraft tail number.getCode()
Returns the SELCAL code for the aircraft.Returns the aircraft type.int
Returns the Pilot who has reserved this aircraft's SELCAL code.Returns the date this aircraft's SELCAL code was reserved.Returns the CSS row class name if in a table view.void
setAircraftCode
(String code) Updates the aircraft's tail number.void
Updates the aircraft's SELCAL code.void
setEquipmentType
(String eqType) Updates the aircraft equipment type.void
setReservedBy
(int id) Updates the Pilot reserving this aircraft's SELCAL code.void
setReservedOn
(Instant dt) Updates the date this SELCAL code was reserved.toString()
Displays the SELCAL code.
-
Constructor Details
-
SelectCall
Creates a new SELCAL bean.- Parameters:
aircraft
- the aircraft tail numbercode
- the SELCAL code- Throws:
NullPointerException
- if aircraft or code are nullIllegalArgumentException
- if code is not 4 or 5 characters
-
-
Method Details
-
getAircraftCode
Returns the aircraft tail number.- Returns:
- the tail number
- See Also:
-
getCode
Returns the SELCAL code for the aircraft.- Returns:
- the SELCAL code
- See Also:
-
getEquipmentType
-
getReservedBy
public int getReservedBy()Returns the Pilot who has reserved this aircraft's SELCAL code.- Returns:
- the Pilot's database ID
- See Also:
-
getReservedOn
Returns the date this aircraft's SELCAL code was reserved.- Returns:
- the date/time the SELCAL code was reserved.
- See Also:
-
free
public void free()Marks this SELCAL record as available. -
setAircraftCode
Updates the aircraft's tail number.- Parameters:
code
- the registration code- Throws:
NullPointerException
- if code is null- See Also:
-
setCode
Updates the aircraft's SELCAL code. This method interposes- Parameters:
code
- the SELCAL code- Throws:
NullPointerException
- if code is nullIllegalArgumentException
- if code is not 4 or 5characters- See Also:
-
setEquipmentType
Updates the aircraft equipment type.- Parameters:
eqType
- the equipment type- See Also:
-
setReservedBy
public void setReservedBy(int id) Updates the Pilot reserving this aircraft's SELCAL code.- Parameters:
id
- the Pilot's database ID- Throws:
IllegalArgumentException
- if id is negative- See Also:
-
setReservedOn
Updates the date this SELCAL code was reserved.- Parameters:
dt
- the date/time the aircraft code was reserved- See Also:
-
toString
-
compareTo
Compares two beans by comparing the SELCAL codes.- Specified by:
compareTo
in interfaceComparable<SelectCall>
-
getRowClassName
Returns the CSS row class name if in a table view.- Specified by:
getRowClassName
in interfaceViewEntry
- Returns:
- the CSS class name
-