be.dvw.administration.services.instruments
Interface InstrumentService

All Known Implementing Classes:
InstrumentServiceCastorImpl

public interface InstrumentService

Service interface allowing to retrieve and manipulate scores in the persistence store (depending on the implementation used).


Method Summary
 void delete(int id)
          Method allowing to delete a instrument
 java.util.List getAll()
          Method returning the complete list of instruments.
 float getCurrentValue()
          Method returning the current value of the inventory
 float getPurchaseValue()
          Method returning the purchase value of the inventory
 int getTotalNumber()
          Method counting the total number of instruments in the inventory
 Instrument load(int id)
          Method returning a instrument corresponding to the id
 Instrument save(Instrument instrument, boolean newInstrument)
          Method allowing to store a instrument (both update and create)
 java.util.List search(java.lang.String searchString)
          Method allowing to search for instruments based on an search string suc as: 'name' = $name AND 'composer' = $composer OR 'arranger' = $arranger
 

Method Detail

getAll

public java.util.List getAll()
                      throws java.lang.Exception
Method returning the complete list of instruments.

Returns:
List of instruments
Throws:
java.lang.Exception

save

public Instrument save(Instrument instrument,
                       boolean newInstrument)
                throws java.lang.Exception
Method allowing to store a instrument (both update and create)

Returns:
the instrument as stored in the database
Throws:
java.lang.Exception

delete

public void delete(int id)
            throws java.lang.Exception
Method allowing to delete a instrument

Parameters:
id - the identifier of the instrument
Throws:
java.lang.Exception

load

public Instrument load(int id)
                throws java.lang.Exception
Method returning a instrument corresponding to the id

Parameters:
id -
Returns:
the instrument corresponding to the id
Throws:
java.lang.Exception

search

public java.util.List search(java.lang.String searchString)
                      throws java.lang.Exception
Method allowing to search for instruments based on an search string suc as: 'name' = $name AND 'composer' = $composer OR 'arranger' = $arranger

Parameters:
searchString -
Returns:
List of instruments containing the search result
Throws:
java.lang.Exception

getCurrentValue

public float getCurrentValue()
Method returning the current value of the inventory

Returns:
the current value of the inventory (all instruments) being the purchase value less the depreciation

getPurchaseValue

public float getPurchaseValue()
Method returning the purchase value of the inventory

Returns:
the purchase value

getTotalNumber

public int getTotalNumber()
Method counting the total number of instruments in the inventory

Returns:
number of instruments in the inventory


Copyright © 2005 VZW Koninklijke Muziekvereniging 'De Vrije Werklieden' Lebbeke. All Rights Reserved.