KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > appmappersistence > HibernateApplicationMap


1 /*
2  * Shark Hibernate MapPersistence - Open Wide
3  */

4
5 package org.enhydra.shark.appmappersistence;
6
7 import org.enhydra.shark.api.internal.appmappersistence.ApplicationMap;
8
9 /**
10  * Implementation of ApplicationMap interface. If value for field is not set,
11  * field will have value 'null'.
12  *
13  * @author Vladislav Pernin
14  */

15 public class HibernateApplicationMap implements ApplicationMap {
16
17     private String JavaDoc toolAgentName;
18
19     private String JavaDoc username;
20
21     private String JavaDoc password;
22
23     private String JavaDoc applicationName;
24
25     private Integer JavaDoc applicationMode;
26
27     private String JavaDoc processDefId;
28
29     private String JavaDoc packageId;
30
31     private String JavaDoc applicationDefinitionId;
32
33     private int id;
34
35     public HibernateApplicationMap() {
36     }
37
38     public HibernateApplicationMap(String JavaDoc toolAgentName, String JavaDoc username,
39             String JavaDoc password, String JavaDoc appName, Integer JavaDoc appMode) {
40
41         setToolAgentClassName(toolAgentName);
42         setUsername(username);
43         setPassword(password);
44         setApplicationName(appName);
45         setApplicationMode(appMode);
46
47     }
48
49     public String JavaDoc getToolAgentClassName() {
50         return toolAgentName;
51     }
52
53     public void setToolAgentClassName(String JavaDoc name) {
54         if (name != null && !name.trim().equals(""))
55             this.toolAgentName = name;
56         else
57             this.toolAgentName = null;
58     }
59
60     public String JavaDoc getPackageId() {
61         return packageId;
62     }
63
64     public void setPackageId(String JavaDoc packageId) {
65         if (packageId != null && !packageId.trim().equals(""))
66             this.packageId = packageId;
67         else
68             this.packageId = null;
69     }
70
71     public String JavaDoc getApplicationDefinitionId() {
72         return applicationDefinitionId;
73     }
74
75     public void setApplicationDefinitionId(String JavaDoc applicationDefinitionId) {
76         if (applicationDefinitionId != null
77                 && !applicationDefinitionId.trim().equals(""))
78             this.applicationDefinitionId = applicationDefinitionId;
79         else
80             this.applicationDefinitionId = null;
81     }
82
83     public String JavaDoc getProcessDefinitionId() {
84         return processDefId;
85     }
86
87     public void setProcessDefinitionId(String JavaDoc processDefId) {
88         if (processDefId != null && !processDefId.trim().equals(""))
89             this.processDefId = processDefId;
90         else
91             this.processDefId = null;
92     }
93
94     public String JavaDoc getUsername() {
95         return username;
96     }
97
98     public void setUsername(String JavaDoc username) {
99         this.username = username;
100     }
101
102     public String JavaDoc getPassword() {
103         return password;
104     }
105
106     public void setPassword(String JavaDoc password) {
107         this.password = password;
108     }
109
110     public String JavaDoc getApplicationName() {
111         return applicationName;
112     }
113
114     public void setApplicationName(String JavaDoc appName) {
115         if (appName != null && !appName.trim().equals(""))
116             this.applicationName = appName;
117         else
118             this.applicationName = null;
119     }
120
121     public Integer JavaDoc getApplicationMode() {
122         return applicationMode;
123     }
124
125     public void setApplicationMode(Integer JavaDoc appMode) {
126         this.applicationMode = appMode;
127     }
128   
129     public int getId() {
130         return id;
131     }
132
133     public void setId(int i) {
134         id = i;
135     }
136
137     public String JavaDoc toString() {
138         String JavaDoc retVal = "";
139         retVal += "toolAgentClassName=" + toolAgentName + "\n";
140         retVal += "username=" + username + "\n";
141         retVal += "password=" + password + "\n";
142         retVal += "applicationName=" + applicationName + "\n";
143         retVal += "applicationMode=" + applicationMode + "\n";
144         retVal += "processDefId=" + processDefId + "\n";
145         retVal += "packageId=" + packageId + "\n";
146         retVal += "applicationDefinitionId=" + applicationDefinitionId + "\n";
147         return retVal;
148     }
149 }
Popular Tags