diff options
Diffstat (limited to 'Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/adressen')
2 files changed, 62 insertions, 0 deletions
diff --git a/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/adressen/AdressenBean.java b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/adressen/AdressenBean.java new file mode 100644 index 0000000..9046ed5 --- /dev/null +++ b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/adressen/AdressenBean.java @@ -0,0 +1,43 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package beans.adressen; + + +import beans.*; +import javax.ejb.Stateless; +import javax.jws.WebService; + +/** + * + * @author jmueller + */ +@Stateless(mappedName="AdressenBean") +public class AdressenBean implements AdressenRemote { + + + /** + * gibt zu einer Artikel-Id die Adresse des Lieferanten zurück + * @param artikel_id Die Artikel-Id + * @return Die Adresse des Lieferanten + */ + public String getLieferantenAdresseFuerArtikel( long artikel_id) { + if(artikel_id == 1) + return "Shimano, Merkelstr. 133, 12345 Dresden"; + else if (artikel_id == 2) + return "Siemens, Zumwinkelstr. 31, 123123 Berlin"; + else if (artikel_id == 3) + return "Schwalbe, Taubenweg 3, 54566 Hannover"; + else + return "Musterfirma, Musterstrasse 123, 12345 Musterstadt"; + + + } + + + // Add business logic below. (Right-click in editor and choose + // "EJB Methods > Add Business Method" or "Web Service > Add Operation") + +} diff --git a/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/adressen/AdressenRemote.java b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/adressen/AdressenRemote.java new file mode 100644 index 0000000..24970cf --- /dev/null +++ b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/beans/adressen/AdressenRemote.java @@ -0,0 +1,19 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package beans.adressen; + +import javax.ejb.Remote; + +/** + * + * @author jmueller + */ +@Remote +public interface AdressenRemote { + + String getLieferantenAdresseFuerArtikel(long artikel_id); + +} |
