cad.simcad.dummies
Class DumPersistentDataLinkI

java.lang.Object
  |
  +--cad.simcad.dummies.DumPersistentDataLinkI
All Implemented Interfaces:
PersistentDataLink

public class DumPersistentDataLinkI
extends java.lang.Object
implements PersistentDataLink

Author:
Administrator

Field Summary
 int _serial
           
 
Constructor Summary
DumPersistentDataLinkI()
          Creates a new instance of DumPersistentDataLinkI
 
Method Summary
 void achievedUpdate(Id incId, boolean achieved)
          return a vector with all the teams.
 Id associateTeam(Team t, EmergencyVehicule e)
          associate a team and an emergencyVehicule
 Form compareForm(Form f)
           
 java.util.Vector get12HoursAllIncident()
          return a vector with the incident which take place in the last 12 hours.
 java.util.Vector getAllForm()
          return a vector with all the form.
 java.util.Vector getAllImcompleteIncident()
          return a vector with all the incident which are not complete.
 java.util.Vector getAllTeams()
           
 java.util.Vector getAllVehicule()
          return a vector of all the emergency vehicule
 EmergencyVehicule getAssociatedVehicule(Id incId)
          return the emergencyVehicule with the ID vehicId
 void IncVehiculeAssociation(Id incId, Id vehiculeId)
          Establish in the db an association between an Incident and a Emergency Vehicle
 Id insertEmergencyVehicule(EmergencyVehicule ev)
          insert a new emergency vehicule in the database
 void insertTeam(Team t)
          insertion of a new team in the db
 void insertTeam(Team t, EmergencyVehicule e)
          insert a team in the db and associate this team with an EmergencyVehicule
 boolean isAchieved(Id incId)
          methode renvoyant true si l'incident dont l'id est passe en argument est cloture.
 Form saveForm(Form f)
          insertion of a new form in the database
 Incident saveIncident(Incident i, Id formId)
          insertion of a new incident in the database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_serial

public int _serial
Constructor Detail

DumPersistentDataLinkI

public DumPersistentDataLinkI()
Creates a new instance of DumPersistentDataLinkI

Method Detail

achievedUpdate

public void achievedUpdate(Id incId,
                           boolean achieved)
return a vector with all the teams.

Specified by:
achievedUpdate in interface PersistentDataLink
Pre:
/
Returns:
return a vector with all the teams.
Throws:
persistentDataException - if there is a problem in the physical access in the db.
Post:
nothing has changed.

associateTeam

public Id associateTeam(Team t,
                        EmergencyVehicule e)
                 throws PersistentDataException
associate a team and an emergencyVehicule

Specified by:
associateTeam in interface PersistentDataLink
Pre:
/
Returns:
the id of the EmergencyVehicuel
Throws:
persistenDataException - if there is a problem in the physical access in the db
PersistentDataException
Post:
the new team has been associated with the emergencyVehicule e

get12HoursAllIncident

public java.util.Vector get12HoursAllIncident()
return a vector with the incident which take place in the last 12 hours.

Specified by:
get12HoursAllIncident in interface PersistentDataLink
Pre:
/
Returns:
return a vector with all the incident which take place in the last 12 hours.
Throws:
persistentDataException - if there is a problem in the physical access in the db.
Post:
nothing has changed.

getAllForm

public java.util.Vector getAllForm()
return a vector with all the form.

Specified by:
getAllForm in interface PersistentDataLink
Pre:
/
Returns:
return a vector with all the form.
Throws:
persistentDataException - if there is a problem in the physical access in the db.
Post:
nothing has changed.

getAllImcompleteIncident

public java.util.Vector getAllImcompleteIncident()
return a vector with all the incident which are not complete.

Specified by:
getAllImcompleteIncident in interface PersistentDataLink
Pre:
/
Returns:
return a vector with all the incident which are not complete.
Throws:
persistentDataException - if there is a problem in the physical access in the db.
Post:
nothing has changed.

getAllTeams

public java.util.Vector getAllTeams()
                             throws PersistentDataException
Specified by:
getAllTeams in interface PersistentDataLink
PersistentDataException

getAllVehicule

public java.util.Vector getAllVehicule()
return a vector of all the emergency vehicule

Specified by:
getAllVehicule in interface PersistentDataLink
Pre:
/
Returns:
return a vector of all the emergency vehicule.
Throws:
persistentDataException - if there is a problem in the physical access in the db.
Post:
nothing has changed.

insertEmergencyVehicule

public Id insertEmergencyVehicule(EmergencyVehicule ev)
insert a new emergency vehicule in the database

Specified by:
insertEmergencyVehicule in interface PersistentDataLink
Pre:
/
Returns:
the id of the new emergency vehicule
Throws:
persistendDataException - if there is a problem in the physical access in the db.
Post:
the emergency vehicule e has been added in the database

insertTeam

public void insertTeam(Team t)
                throws PersistentDataException
insertion of a new team in the db

Specified by:
insertTeam in interface PersistentDataLink
Pre:
the team t is a new team
Returns:
/
Throws:
persistenDataException - if there is a problem in the physical access in the db
PersistentDataException
Post:
the new team t has been added in the db

insertTeam

public void insertTeam(Team t,
                       EmergencyVehicule e)
                throws PersistentDataException
insert a team in the db and associate this team with an EmergencyVehicule

Specified by:
insertTeam in interface PersistentDataLink
Pre:
the team t is a new team, the emergencyVehicule e exist in the db
Returns:
/
Throws:
persistentDataException - if there is a problem in the physical access in the db
PersistentDataException
Post:
the team t has been added in the db and has been associated with the emergencyVehicule e

saveForm

public Form saveForm(Form f)
insertion of a new form in the database

Specified by:
saveForm in interface PersistentDataLink
Pre:
the form f does not have an id.
Returns:
the form f.
Throws:
persistentDataException - if there is a problem in the physical recording in db.
Post:
the form f has been added in the database and its id has been filled.

saveIncident

public Incident saveIncident(Incident i,
                             Id formId)
insertion of a new incident in the database

Specified by:
saveIncident in interface PersistentDataLink
Pre:
the incident i does not have an id.
Returns:
the incident i.
Throws:
persistentDataException - if there is a problem in the physical recording in db.
Post:
the incident i has been added in the database and its id has been filled.

getAssociatedVehicule

public EmergencyVehicule getAssociatedVehicule(Id incId)
                                        throws PersistentDataException
Description copied from interface: PersistentDataLink
return the emergencyVehicule with the ID vehicId

Specified by:
getAssociatedVehicule in interface PersistentDataLink
Returns:
the ErmergencyVehicule object associated with the ID vehicId
PersistentDataException

IncVehiculeAssociation

public void IncVehiculeAssociation(Id incId,
                                   Id vehiculeId)
                            throws PersistentDataException
Description copied from interface: PersistentDataLink
Establish in the db an association between an Incident and a Emergency Vehicle

Specified by:
IncVehiculeAssociation in interface PersistentDataLink
Returns:
/
PersistentDataException

compareForm

public Form compareForm(Form f)
                 throws PersistentDataException
Specified by:
compareForm in interface PersistentDataLink
PersistentDataException

isAchieved

public boolean isAchieved(Id incId)
                   throws PersistentDataException
methode renvoyant true si l'incident dont l'id est passe en argument est cloture. false si l'incident n'est pas fini

Specified by:
isAchieved in interface PersistentDataLink
PersistentDataException

Logo

With the help of www.sourceforge.net and www.info.ucl.ac.be