2 * This is a common dao with basic CRUD operations and is not limited to any
3 * persistent layer implementation
5 * Copyright (C) 2008 Imran M Yousuf (imyousuf@smartitengineering.com)
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 3 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 package com
.smartitengineering
.exim
.impl
;
21 import com
.smartitengineering
.exim
.AssociationConfig
;
24 * Default implementation of {@link AssociationConfig} for representing an
25 * association's configuraiton
29 public class AssociationConfigImpl
implements AssociationConfig
{
30 private AssociationType associationType
;
31 private boolean itToBeExportedAsUri
;
32 private boolean transientAssociation
;
33 private boolean eagerSet
;
34 private boolean stringProviderImplemented
;
36 private String accessorName
;
38 public void setAssociationType(AssociationType associationType
) {
39 this.associationType
= associationType
;
42 public void setEagerSet(boolean eagerSet
) {
43 this.eagerSet
= eagerSet
;
46 public void setItToBeExportedAsUri(boolean itToBeExportedAsUri
) {
47 this.itToBeExportedAsUri
= itToBeExportedAsUri
;
50 public void setName(String name
) {
54 public void setAccessorName(String accessorName
) {
55 this.accessorName
= accessorName
;
58 public void setStringProviderImplemented(boolean stringProviderImplemented
) {
59 this.stringProviderImplemented
= stringProviderImplemented
;
62 public void setTransient(boolean transientAssociation
) {
63 this.transientAssociation
= transientAssociation
;
66 public boolean isItToBeExportedAsUri() {
67 return itToBeExportedAsUri
;
70 public boolean isTransient() {
71 return transientAssociation
;
74 public AssociationType
getAssociationType() {
75 return associationType
;
78 public String
getName() {
82 public String
getAccessorName() {
86 public boolean isEagerSet() {
90 public boolean isStringProviderImplemented() {
91 return stringProviderImplemented
;
95 public String
toString() {
96 StringBuilder toStringBuilder
= new StringBuilder();
97 toStringBuilder
.append(super.toString());
98 toStringBuilder
.append("\n");
99 toStringBuilder
.append("\nassociationType: ");
100 toStringBuilder
.append(associationType
);
101 toStringBuilder
.append("\nitToBeExportedAsUri: ");
102 toStringBuilder
.append(itToBeExportedAsUri
);
103 toStringBuilder
.append("\ntransientAssociation: ");
104 toStringBuilder
.append(transientAssociation
);
105 toStringBuilder
.append("\neagerSet: ");
106 toStringBuilder
.append(eagerSet
);
107 toStringBuilder
.append("\nstringProviderImplemented: ");
108 toStringBuilder
.append(stringProviderImplemented
);
109 toStringBuilder
.append("\nname: ");
110 toStringBuilder
.append(name
);
111 return toStringBuilder
.toString();