|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectreservation.system.functions.Functions
reservation.system.functions.Create
This class hold Create structure. This object allows to create a new flight in the data base by calling the method create
in FlightSystem
.
Field Summary |
Fields inherited from class reservation.system.functions.Functions |
arg |
Fields inherited from interface reservation.Action |
fs, NUMBER_ARGUMENT_MAX |
Constructor Summary | |
Create()
|
Method Summary | |
(package private) void |
_check(java.lang.String[] arg)
Verify invariants : - Arguments not null - rows belongs to [1 Flight.ROWS_MAX ]
- rowsLength belongs to [1 Flight.ROW_LENGTH_MAX ]
|
java.lang.String |
execute()
Create a new flight in a database if the command create and their arguments are correct. |
static java.lang.String |
usage()
Display the usage for the command create . |
Methods inherited from class reservation.system.functions.Functions |
ArgumentIsValid, CheckBookingListNotEmpty, CheckFlightListNotEmpty, checkInteger, execute |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Create()
Method Detail |
public java.lang.String execute() throws java.lang.Exception
create
and their arguments are correct.
execute
in class Functions
java.lang.Exception
- if the flight is not created.void _check(java.lang.String[] arg) throws java.lang.Exception
- Arguments not null -rows
belongs to [1Flight.ROWS_MAX
] -rowsLength
belongs to [1Flight.ROW_LENGTH_MAX
]
_check
in class Functions
java.lang.Exception
- if the invariants is violatedpublic static java.lang.String usage()
create
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |