diff --git a/li.strolch.agent/src/main/java/li/strolch/agent/impl/CachedElementMap.java b/li.strolch.agent/src/main/java/li/strolch/agent/impl/CachedElementMap.java index 20b1f04e0..9efb3f611 100644 --- a/li.strolch.agent/src/main/java/li/strolch/agent/impl/CachedElementMap.java +++ b/li.strolch.agent/src/main/java/li/strolch/agent/impl/CachedElementMap.java @@ -185,7 +185,7 @@ public abstract class CachedElementMap extends Tra throws StrolchException { T t = getDbDao(tx).queryBy(type, id, version); if (assertExists && t == null) { - String msg = "The element with type '{0}' and id '{1}' and version '{2}' does not exist!"; //$NON-NLS-1$ + String msg = "The element with type \"{0}\" and id \"{1}\" and version \"{2}\" does not exist!"; //$NON-NLS-1$ msg = MessageFormat.format(msg, type, id, version); throw new StrolchException(msg); } diff --git a/li.strolch.agent/src/main/java/li/strolch/agent/impl/TransientElementMap.java b/li.strolch.agent/src/main/java/li/strolch/agent/impl/TransientElementMap.java index dd590385a..21b9e2cd9 100644 --- a/li.strolch.agent/src/main/java/li/strolch/agent/impl/TransientElementMap.java +++ b/li.strolch.agent/src/main/java/li/strolch/agent/impl/TransientElementMap.java @@ -87,7 +87,7 @@ public abstract class TransientElementMap implemen T t = getBy(tx, StrolchConstants.TEMPLATE, type); if (assertExists && t == null) { - String msg = "The template with type '{0}' does not exist!"; //$NON-NLS-1$ + String msg = "The template with type \"{0}\" does not exist!"; //$NON-NLS-1$ throw new StrolchException(MessageFormat.format(msg, type)); } @@ -116,7 +116,7 @@ public abstract class TransientElementMap implemen } if (assertExists && t == null) { - String msg = "The element with type '{0}' and id '{1}' does not exist!"; //$NON-NLS-1$ + String msg = "The element with type \"{0}\" and id \"{1}\" does not exist!"; //$NON-NLS-1$ throw new StrolchException(MessageFormat.format(msg, type, id)); } @@ -135,7 +135,7 @@ public abstract class TransientElementMap implemen String id = refP.getValue(); T t = getBy(tx, type, id, false); if (assertExists && t == null) { - String msg = "The element with type '{0}' and id '{1}' does not exist for param '{2}'"; //$NON-NLS-1$ + String msg = "The element with type \"{0}\" and id \"{1}\" does not exist for param \"{2}\""; //$NON-NLS-1$ throw new StrolchException(MessageFormat.format(msg, type, id, refP.getLocator())); } return t; @@ -153,7 +153,7 @@ public abstract class TransientElementMap implemen .map(id -> { T t = getBy(tx, type, id, false); if (assertExists && t == null) { - String msg = "The element with type '{0}' and id '{1}' does not exist for param '{2}'"; //$NON-NLS-1$ + String msg = "The element with type \"{0}\" and id \"{1}\" does not exist for param \"{2}\""; //$NON-NLS-1$ throw new StrolchException(MessageFormat.format(msg, type, id, refP.getLocator())); } return t; @@ -256,7 +256,7 @@ public abstract class TransientElementMap implemen // assert no object already exists with this id if (byType.containsKey(element.getId())) { - String msg = "An element already exists with the id '{0}'. Elements of the same class must always have a unique id, regardless of their type!"; //$NON-NLS-1$ + String msg = "An element already exists with the id \"{0}\". Elements of the same class must always have a unique id, regardless of their type!"; //$NON-NLS-1$ msg = MessageFormat.format(msg, element.getId()); throw new StrolchPersistenceException(msg); } @@ -280,7 +280,7 @@ public abstract class TransientElementMap implemen // assert no object already exists with this id if (byType.containsKey(element.getId())) { - String msg = "An element already exists with the id '{0}'. Elements of the same class must always have a unique id, regardless of their type!"; //$NON-NLS-1$ + String msg = "An element already exists with the id \"{0}\". Elements of the same class must always have a unique id, regardless of their type!"; //$NON-NLS-1$ msg = MessageFormat.format(msg, element.getId()); throw new StrolchPersistenceException(msg); } @@ -306,14 +306,14 @@ public abstract class TransientElementMap implemen private void internalUpdate(StrolchTransaction tx, T element) { Map byType = this.elementMap.get(element.getType()); if (byType == null) { - String msg = "The element does not yet exist with the type '{0}' and id '{1}'. Use add() for new objects!"; //$NON-NLS-1$ + String msg = "The element does not yet exist with the type \"{0}\" and id \"{1}\". Use add() for new objects!"; //$NON-NLS-1$ msg = MessageFormat.format(msg, element.getType(), element.getId()); throw new StrolchPersistenceException(msg); } // assert no object already exists with this id if (!byType.containsKey(element.getId())) { - String msg = "The element does not yet exist with the type '{0}' and id '{1}'. Use add() for new objects!"; //$NON-NLS-1$ + String msg = "The element does not yet exist with the type \"{0}\" and id \"{1}\". Use add() for new objects!"; //$NON-NLS-1$ msg = MessageFormat.format(msg, element.getType(), element.getId()); throw new StrolchPersistenceException(msg); } diff --git a/li.strolch.agent/src/main/java/li/strolch/persistence/api/AbstractTransaction.java b/li.strolch.agent/src/main/java/li/strolch/persistence/api/AbstractTransaction.java index 7fc6c897e..c8ad0bf2f 100644 --- a/li.strolch.agent/src/main/java/li/strolch/persistence/api/AbstractTransaction.java +++ b/li.strolch.agent/src/main/java/li/strolch/persistence/api/AbstractTransaction.java @@ -614,7 +614,7 @@ public abstract class AbstractTransaction implements StrolchTransaction { ElementMapHelpers.assertIsRefParam(INTERPRETATION_ORDER_REF, refP); if (assertExists && refP.isEmpty()) { - String msg = "The Order with type '{0}' and id '{1}' does not exist for param '{2}'"; //$NON-NLS-1$ + String msg = "The Order with type \"{0}\" and id \"{1}\" does not exist for param \"{2}\""; //$NON-NLS-1$ throw new StrolchException(MessageFormat.format(msg, refP.getUom(), refP.getValue(), refP.getLocator())); } @@ -690,7 +690,7 @@ public abstract class AbstractTransaction implements StrolchTransaction { ElementMapHelpers.assertIsRefParam(INTERPRETATION_RESOURCE_REF, refP); if (assertExists && refP.isEmpty()) { - String msg = "The Resource with type '{0}' and id '{1}' does not exist for param '{2}'"; //$NON-NLS-1$ + String msg = "The Resource with type \"{0}\" and id \"{1}\" does not exist for param \"{2}\""; //$NON-NLS-1$ throw new StrolchException(MessageFormat.format(msg, refP.getUom(), refP.getValue(), refP.getLocator())); } @@ -778,7 +778,7 @@ public abstract class AbstractTransaction implements StrolchTransaction { ElementMapHelpers.assertIsRefParam(INTERPRETATION_ACTIVITY_REF, refP); if (assertExists && refP.isEmpty()) { - String msg = "The Activity with type '{0}' and id '{1}' does not exist for param '{2}'"; //$NON-NLS-1$ + String msg = "The Activity with type \"{0}\" and id \"{1}\" does not exist for param \"{2}\""; //$NON-NLS-1$ throw new StrolchException(MessageFormat.format(msg, refP.getUom(), refP.getValue(), refP.getLocator())); }