From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../exceptions/AuftragsAbwicklungException.java | 22 ++++++++++++++++ .../exceptions/IdBereitsVergebenException.java | 19 ++++++++++++++ .../java/exceptions/IllegalerWertException.java | 26 +++++++++++++++++++ .../exceptions/UnbekanntesEntityException.java | 29 ++++++++++++++++++++++ 4 files changed, 96 insertions(+) create mode 100644 Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/AuftragsAbwicklungException.java create mode 100644 Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/IdBereitsVergebenException.java create mode 100644 Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/IllegalerWertException.java create mode 100644 Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/UnbekanntesEntityException.java (limited to 'Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions') diff --git a/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/AuftragsAbwicklungException.java b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/AuftragsAbwicklungException.java new file mode 100644 index 0000000..8aa5574 --- /dev/null +++ b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/AuftragsAbwicklungException.java @@ -0,0 +1,22 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package exceptions; + +import javax.ejb.ApplicationException; + +/** + * + * @author jmueller + */ +@ApplicationException(rollback=true) +public class AuftragsAbwicklungException extends Exception { + private static final long serialVersionUID = 1L; + + public AuftragsAbwicklungException(String msg){ + super("Auftrag konnte nicht Abgewickelt werden: " + msg); + } + +} diff --git a/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/IdBereitsVergebenException.java b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/IdBereitsVergebenException.java new file mode 100644 index 0000000..685b931 --- /dev/null +++ b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/IdBereitsVergebenException.java @@ -0,0 +1,19 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package exceptions; + +import javax.ejb.ApplicationException; + +/** + * + * @author Jan + */ +@ApplicationException(rollback=true) +public class IdBereitsVergebenException extends Exception{ + public IdBereitsVergebenException(String msg) { + super(msg); + } +} diff --git a/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/IllegalerWertException.java b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/IllegalerWertException.java new file mode 100644 index 0000000..eb21936 --- /dev/null +++ b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/IllegalerWertException.java @@ -0,0 +1,26 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package exceptions; + +import javax.ejb.ApplicationException; + +/** + * + * @author Jan + */ +@ApplicationException(rollback=true) +public class IllegalerWertException extends Exception { + + public IllegalerWertException(String msg) { + super(msg); + } + + public IllegalerWertException(String variablenName, Object wert) { + super("Illegaler Wert: [" + variablenName+ " = " + wert.toString() +"]"); + } + + +} diff --git a/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/UnbekanntesEntityException.java b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/UnbekanntesEntityException.java new file mode 100644 index 0000000..0d1c405 --- /dev/null +++ b/Master/Daten- und Systemintegration/Praktikum/DSI-Praktikum-1_ausgang/DSI1-ausgang/DSI-ejb/src/java/exceptions/UnbekanntesEntityException.java @@ -0,0 +1,29 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package exceptions; + +import javax.ejb.ApplicationException; + +/** + * + * @author jmueller + */ +@ApplicationException(rollback=true) +public class UnbekanntesEntityException extends Exception { + + /** + * Constructs an instance of UnbekannterArtikelException with the specified detail message. + * @param msg the detail message. + */ + public UnbekanntesEntityException(String msg) { + super(msg); + } + + public UnbekanntesEntityException(String typ, long id) { + super("Unbekanntes Entity vom Typ: " + typ + " [id="+ id +"]"); + } + +} -- cgit v1.2.3