diff options
| author | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
|---|---|---|
| committer | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
| commit | 33613a85afc4b1481367fbe92a17ee59c240250b (patch) | |
| tree | 670b842326116b376b505ec2263878912fca97e2 /Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/lieferant | |
| download | Studium-master.tar.gz Studium-master.tar.bz2 | |
Diffstat (limited to 'Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/lieferant')
2 files changed, 70 insertions, 0 deletions
diff --git a/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/lieferant/LieferantBean.java b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/lieferant/LieferantBean.java new file mode 100644 index 0000000..2fb1a16 --- /dev/null +++ b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/lieferant/LieferantBean.java @@ -0,0 +1,48 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package beans.lieferant; + +import beans.*; +import beans.lager.LagerRemote; +import beans.artikelManager.ArtikelManagerRemote; +import beans.adressen.AdressenRemote; +import exceptions.IllegalerWertException; +import exceptions.UnbekanntesEntityException; +import javax.ejb.EJB; +import javax.ejb.Stateless; + +/** + * + * @author jmueller + */ +@Stateless(mappedName="LieferantBean") +public class LieferantBean implements LieferantRemote { + @EJB + private ArtikelManagerRemote artikelManagerBean; + @EJB + private LagerRemote lagerBean; + @EJB + private AdressenRemote adressenBean; + + + + /** + * bestellt eine bestimmte Anzahl von Artikeln nach + * @param id die Id des Artikels + * @param anzahl die Anzahl + */ + // TODO: Session Bean erstellen die die Adresse des Lieferanten für bestimmte + // Artikel heraussucht + public void bestelleNach(long id, long anzahl) throws UnbekanntesEntityException, IllegalerWertException{ + System.out.println("Lieferant: bestelleNach("+id+","+anzahl+")"); + lagerBean.bucheArtikelEin(id, anzahl); + + System.out.println("Bestellung erfolgt bei: " + adressenBean.getLieferantenAdresseFuerArtikel(id) ); + } + + + +} diff --git a/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/lieferant/LieferantRemote.java b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/lieferant/LieferantRemote.java new file mode 100644 index 0000000..9a4a63f --- /dev/null +++ b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/lieferant/LieferantRemote.java @@ -0,0 +1,22 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package beans.lieferant; + +import exceptions.IllegalerWertException; +import exceptions.UnbekanntesEntityException; +import javax.ejb.Remote; + +/** + * + * @author jmueller + */ +@Remote +public interface LieferantRemote { + + void bestelleNach(long id, long anzahl) throws UnbekanntesEntityException, IllegalerWertException; + + +} |
