From 096e59af226471117db217b143ad974a437cc5be Mon Sep 17 00:00:00 2001 From: Imran M Yousuf Date: Mon, 29 Jun 2009 16:08:04 +0700 Subject: [PATCH] Implement toString for the API domain implementation classes Signed-off-by: Imran M Yousuf --- .../exim/impl/AssociationConfigImpl.java | 23 +++++++++++++- .../exim/impl/EximResourceConfigImpl.java | 36 ++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/smart-exim/smart-exim-api/src/main/java/com/smartitengineering/exim/impl/AssociationConfigImpl.java b/smart-exim/smart-exim-api/src/main/java/com/smartitengineering/exim/impl/AssociationConfigImpl.java index 53d9825..b1490d9 100644 --- a/smart-exim/smart-exim-api/src/main/java/com/smartitengineering/exim/impl/AssociationConfigImpl.java +++ b/smart-exim/smart-exim-api/src/main/java/com/smartitengineering/exim/impl/AssociationConfigImpl.java @@ -79,6 +79,27 @@ public class AssociationConfigImpl implements AssociationConfig{ } public boolean isStringProviderImplemented() { - return isStringProviderImplemented(); + return stringProviderImplemented; } + + @Override + public String toString() { + StringBuilder toStringBuilder = new StringBuilder(); + toStringBuilder.append(super.toString()); + toStringBuilder.append("\n"); + toStringBuilder.append("\nassociationType: "); + toStringBuilder.append(associationType); + toStringBuilder.append("\nitToBeExportedAsUri: "); + toStringBuilder.append(itToBeExportedAsUri); + toStringBuilder.append("\ntransientAssociation: "); + toStringBuilder.append(transientAssociation); + toStringBuilder.append("\neagerSet: "); + toStringBuilder.append(eagerSet); + toStringBuilder.append("\nstringProviderImplemented: "); + toStringBuilder.append(stringProviderImplemented); + toStringBuilder.append("\nname: "); + toStringBuilder.append(name); + return toStringBuilder.toString(); + } + } diff --git a/smart-exim/smart-exim-api/src/main/java/com/smartitengineering/exim/impl/EximResourceConfigImpl.java b/smart-exim/smart-exim-api/src/main/java/com/smartitengineering/exim/impl/EximResourceConfigImpl.java index dba4277..76c5600 100644 --- a/smart-exim/smart-exim-api/src/main/java/com/smartitengineering/exim/impl/EximResourceConfigImpl.java +++ b/smart-exim/smart-exim-api/src/main/java/com/smartitengineering/exim/impl/EximResourceConfigImpl.java @@ -136,4 +136,40 @@ public class EximResourceConfigImpl public String getName() { return name; } + + @Override + public String toString() { + StringBuilder toStringBuilder = new StringBuilder(); + toStringBuilder.append(super.toString()); + toStringBuilder.append("\n"); + toStringBuilder.append("\nassociateExportPolicyAsUri: "); + toStringBuilder.append(associateExportPolicyAsUri); + toStringBuilder.append("\naccessByPropertyEnabled: "); + toStringBuilder.append(accessByPropertyEnabled); + toStringBuilder.append("\nidentityCustomizerImplemented: "); + toStringBuilder.append(identityCustomizerImplemented); + toStringBuilder.append("\nexporterImplemented: "); + toStringBuilder.append(exporterImplemented); + toStringBuilder.append("\nimporterImplemented: "); + toStringBuilder.append(importerImplemented); + toStringBuilder.append("\ndomainClass: "); + toStringBuilder.append(domainClass); + toStringBuilder.append("\npathToResource: "); + toStringBuilder.append(pathToResource); + toStringBuilder.append("\nidPrefix: "); + toStringBuilder.append(idPrefix); + toStringBuilder.append("\nidPropertyName: "); + toStringBuilder.append(idPropertyName); + toStringBuilder.append("\nname: "); + toStringBuilder.append(name); + toStringBuilder.append("\nassociationConfigs: "); + for(Map.Entry configEntry : associationConfigs.entrySet()) { + toStringBuilder.append("\n\t"); + toStringBuilder.append(configEntry.getKey()); + toStringBuilder.append(": "); + toStringBuilder.append(configEntry.getValue().toString().replaceAll( + "\n", "\n\t\t")); + } + return toStringBuilder.toString(); + } } -- 2.11.4.GIT