com.ltu.smd116.bl.booking
Class BLBooking

com.ltu.smd116.bl.BLCore
  |
  +--com.ltu.smd116.bl.booking.BLBooking
Direct Known Subclasses:
BLBookingAdm

public class BLBooking
extends BLCore


Field Summary
 protected ArticleDBParticleDBP
           
 protected ArticleTypeDBParticleTypeDBP
           
 protected InventoryDBPinventoryDBP
           
 protected InventoryTypeDBPinventoryTypeDBP
           
 protected PersonnelDBPpersonnelDBP
           
 protected ResourceDBPresourceDBP
           
 protected ResourceTypeDBPresourceTypeDBP
           
 protected ServiceDBPserviceDBP
           
 protected ServiceTypeDBPserviceTypeDBP
           
 protected UserDBPuserDBP
           

Constructor Summary
BLBooking()
           

Method Summary
 booleancancelBooking(BookingContainer booking)
          Cancels a booking.
 SortedVectorgetAllBookings()
          Get all bookings
 SortedVectorgetAllBookingsArticle(int id)
          Gets all bookings for the chosen Article's Id
 SortedVectorgetAllBookingsInventory(int id)
          Gets all bookings for the chosen Inventory's Id
 SortedVectorgetAllBookingsResource(int id)
          Gets all bookings for the chosen Resource's Id
 SortedVectorgetAllBookingsService(int id)
          Gets all bookings for the chosen Sevice's Id
 SortedVectorgetAllBookingsUser(int id)
          Gets all bookings for the chosen User's Id
 SortedVectorgetAllPersonnel()
           
 SortedVectorgetAllResources()
           
 SortedVectorgetAllServices()
          Gets all Services
 SortedVectorgetAllServicesManager(int id)
          Gets all Services for the chosen Manager's Id
 SortedVectorgetAllServicesResources(int id)
          Gets all Services for the chosen Resource's Id
 SortedVectorgetAllServicesType(int id)
          Gets all Services for the chosen Type's Id
 SortedVectorgetAllServicetypes()
          Get all Service types
 ArticleContainergetArticle(int id)
           
 BookingContainergetBooking(int id)
          Gets a booking for the chosen Id.
 InventoryContainergetInventory(int id)
           
 ResourceContainergetResource(int id)
          Get a Resource for the chosen Id
 TypeContainergetResourceType(int id)
           
 ServiceContainergetService(int id)
          Get a Service for the chosen Id
 TypeContainergetServicetype(int id)
          Get a Service Type for the chosen Id
 booleansetBooking(BookingContainer booking)
          Inserts a new or updates an existing booking.

Field Detail

articleDBP

protected ArticleDBP articleDBP

articleTypeDBP

protected ArticleTypeDBP articleTypeDBP

inventoryDBP

protected InventoryDBP inventoryDBP

inventoryTypeDBP

protected InventoryTypeDBP inventoryTypeDBP

personnelDBP

protected PersonnelDBP personnelDBP

resourceDBP

protected ResourceDBP resourceDBP

resourceTypeDBP

protected ResourceTypeDBP resourceTypeDBP

serviceDBP

protected ServiceDBP serviceDBP

serviceTypeDBP

protected ServiceTypeDBP serviceTypeDBP

userDBP

protected UserDBP userDBP
Constructor Detail

BLBooking

public BLBooking()
Method Detail

cancelBooking

public boolean cancelBooking(BookingContainer booking)
Cancels a booking. Sets the bookings activeflag to inactive.

getAllBookings

public SortedVector getAllBookings()
Get all bookings

getAllBookingsArticle

public SortedVector getAllBookingsArticle(int id)
Gets all bookings for the chosen Article's Id

getAllBookingsInventory

public SortedVector getAllBookingsInventory(int id)
Gets all bookings for the chosen Inventory's Id

getAllBookingsResource

public SortedVector getAllBookingsResource(int id)
Gets all bookings for the chosen Resource's Id

getAllBookingsService

public SortedVector getAllBookingsService(int id)
Gets all bookings for the chosen Sevice's Id

getAllBookingsUser

public SortedVector getAllBookingsUser(int id)
Gets all bookings for the chosen User's Id

getAllPersonnel

public SortedVector getAllPersonnel()

getAllResources

public SortedVector getAllResources()

getAllServices

public SortedVector getAllServices()
Gets all Services

getAllServicesManager

public SortedVector getAllServicesManager(int id)
Gets all Services for the chosen Manager's Id

getAllServicesResources

public SortedVector getAllServicesResources(int id)
Gets all Services for the chosen Resource's Id

getAllServicesType

public SortedVector getAllServicesType(int id)
Gets all Services for the chosen Type's Id

getAllServicetypes

public SortedVector getAllServicetypes()
Get all Service types

getArticle

public ArticleContainer getArticle(int id)

getBooking

public BookingContainer getBooking(int id)
Gets a booking for the chosen Id.

getInventory

public InventoryContainer getInventory(int id)

getResource

public ResourceContainer getResource(int id)
Get a Resource for the chosen Id

getResourceType

public TypeContainer getResourceType(int id)

getService

public ServiceContainer getService(int id)
Get a Service for the chosen Id

getServicetype

public TypeContainer getServicetype(int id)
Get a Service Type for the chosen Id

setBooking

public boolean setBooking(BookingContainer booking)
Inserts a new or updates an existing booking. If the PK is null, then it's an insert otherwise it's an update
Returns true if the transaction's ok, false otherwise. Sets the bookings activeflag to active.

Association Links

to Class com.ltu.smd116.dbp.InventoryDBP

to Class com.ltu.smd116.dbp.InventoryTypeDBP

to Class com.ltu.smd116.dbp.PersonnelDBP

to Class com.ltu.smd116.dbp.ResourceDBP

to Class com.ltu.smd116.dbp.ResourceTypeDBP

to Class com.ltu.smd116.dbp.ServiceDBP

to Class com.ltu.smd116.dbp.ServiceTypeDBP

to Class com.ltu.smd116.dbp.ArticleDBP

to Class com.ltu.smd116.dbp.ArticleTypeDBP

to Class com.ltu.smd116.dbp.UserDBP