be.dvw.administration.services.instruments
Class InstrumentServiceCastorImpl

java.lang.Object
  extended bybe.dvw.administration.services.instruments.InstrumentServiceCastorImpl
All Implemented Interfaces:
InstrumentService

public class InstrumentServiceCastorImpl
extends java.lang.Object
implements InstrumentService

User: Toon Date: 4-jul-2005 Time: 19:31:26


Constructor Summary
InstrumentServiceCastorImpl()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstrumentServiceCastorImpl

public InstrumentServiceCastorImpl()
Method Detail

getAll

public java.util.List getAll()
                      throws java.lang.Exception
Description copied from interface: InstrumentService
Method returning the complete list of instruments.

Specified by:
getAll in interface InstrumentService
Returns:
List of instruments
Throws:
java.lang.Exception

load

public Instrument load(int id)
                throws java.io.IOException,
                       org.exolab.castor.xml.ValidationException,
                       org.exolab.castor.xml.MarshalException
Description copied from interface: InstrumentService
Method returning a instrument corresponding to the id

Specified by:
load in interface InstrumentService
Parameters:
id -
Returns:
the instrument corresponding to the id
Throws:
java.io.IOException
org.exolab.castor.xml.ValidationException
org.exolab.castor.xml.MarshalException

search

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

Specified by:
search in interface InstrumentService
Parameters:
searchString -
Returns:
List of instruments containing the search result
Throws:
java.lang.Exception

getPurchaseValue

public float getPurchaseValue()
Description copied from interface: InstrumentService
Method returning the purchase value of the inventory

Specified by:
getPurchaseValue in interface InstrumentService
Returns:
the purchase value

getTotalNumber

public int getTotalNumber()
Description copied from interface: InstrumentService
Method counting the total number of instruments in the inventory

Specified by:
getTotalNumber in interface InstrumentService
Returns:
number of instruments in the inventory

getCurrentValue

public float getCurrentValue()
Description copied from interface: InstrumentService
Method returning the current value of the inventory

Specified by:
getCurrentValue in interface InstrumentService
Returns:
the current value of the inventory (all instruments) being the purchase value less the depreciation

save

public Instrument save(Instrument instrument,
                       boolean newInstrument)
                throws org.exolab.castor.xml.MarshalException,
                       org.exolab.castor.xml.ValidationException,
                       java.io.IOException
Description copied from interface: InstrumentService
Method allowing to store a instrument (both update and create)

Specified by:
save in interface InstrumentService
Returns:
the instrument as stored in the database
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
java.io.IOException

delete

public void delete(int id)
            throws java.lang.Exception
Description copied from interface: InstrumentService
Method allowing to delete a instrument

Specified by:
delete in interface InstrumentService
Parameters:
id - the identifier of the instrument
Throws:
java.lang.Exception


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