com.ltu.smd116.dbp
Class DBFloor


public class DBFloor

This is the database provider for floors.

Author:
Daniel Nilsson

Constructor Summary
DBFloor()
          Create a new database provider for floors.

Method Summary
 voidaddFloor(FloorContainer data)
          Add data for a floor of the boat.
 FloorContainergetFloor(int floor)
          Get the data for a floor of the boat.
 SortedVectorgetFloors()
          Get all floors of the boat.
 voidremoveFloor(FloorContainer data)
          Remove a floor.
 voidupdateFloor(FloorContainer data)
          Modify the data of a floor.

Constructor Detail

DBFloor

public DBFloor()
Create a new database provider for floors.
Method Detail

addFloor

public void addFloor(FloorContainer data)
Add data for a floor of the boat.
Parameters:
data - The FloorContainer to store.

getFloor

public FloorContainer getFloor(int floor)
Get the data for a floor of the boat.
Parameters:
floor - The number of the floor you want.
Returns: A FloorContainer containing the requested floor.

getFloors

public SortedVector getFloors()
Get all floors of the boat.
Returns: A SortedVector of FloorContainers.

removeFloor

public void removeFloor(FloorContainer data)
Remove a floor.
Parameters:
data - The FloorContainer to remove.

updateFloor

public void updateFloor(FloorContainer data)
Modify the data of a floor.
Parameters:
data - The modified FloorContainer.