Source Code Cross Referenced for InstanceInformations.java in  » Database-Client » dbmjui » fr » aliacom » dbmjui » beans » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database Client » dbmjui » fr.aliacom.dbmjui.beans 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Created on May 4, 2003
003:         *
004:         * Dbmjui is free software; you can redistribute it and/or
005:         * modify it under the terms of the GNU General Public License version 2 as
006:         * published by the Free Software Foundation.
007:         *  
008:         * Dbmjui is distributed in the hope that it will be useful,
009:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
010:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
011:         * General Public License for more details.
012:         *  
013:         * You should have received a copy of the GNU General Public
014:         * License along with dbmjui; see the file COPYING.  If not,
015:         * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
016:         * Boston, MA 02111-1307, USA.
017:         *
018:         */
019:        package fr.aliacom.dbmjui.beans;
020:
021:        import java.beans.PropertyChangeListener;
022:        import java.beans.PropertyChangeSupport;
023:
024:        import org.apache.log4j.Logger;
025:
026:        import fr.aliacom.dbmjui.DbInstance;
027:
028:        /**
029:         * @author tom
030:         *
031:         * (c) 2001, 2003 Thomas Cataldo
032:         */
033:        public class InstanceInformations {
034:
035:            private int state;
036:            private int data;
037:            private int dataMax;
038:            private int log;
039:            private int logMax;
040:            private int cchr;
041:            private int dchr;
042:            private int session;
043:            private int sessionMax;
044:            private String backUp;
045:            private boolean autologEnabled;
046:
047:            private String fullName;
048:            private String name;
049:            private String path;
050:            private String version;
051:
052:            private DbInstance dbi;
053:
054:            private PropertyChangeSupport pcs;
055:
056:            private static final Logger logger = Logger
057:                    .getLogger(InstanceInformations.class);
058:
059:            public InstanceInformations() {
060:                pcs = new PropertyChangeSupport(this );
061:            }
062:
063:            public void addPropertyChangeListener(String property,
064:                    PropertyChangeListener pcl) {
065:                logger.debug("pcl added prop=" + property + " : " + pcl);
066:                pcs.addPropertyChangeListener(property, pcl);
067:            }
068:
069:            public void addPropertyChangeListener(PropertyChangeListener pcl) {
070:                logger.debug("pcl added : " + pcl);
071:                pcs.addPropertyChangeListener(pcl);
072:            }
073:
074:            public void removePropertyChangeListener(String property,
075:                    PropertyChangeListener pcl) {
076:                logger.debug("pcl removed prop=" + property + " : " + pcl);
077:                pcs.removePropertyChangeListener(property, pcl);
078:            }
079:
080:            public void removePropertyChangeListener(PropertyChangeListener pcl) {
081:                logger.debug("pcl removed : " + pcl);
082:                pcs.removePropertyChangeListener(pcl);
083:            }
084:
085:            /**
086:             * @return the converter cache hit rate
087:             */
088:            public int getCchr() {
089:                return cchr;
090:            }
091:
092:            /**
093:             * @return used data in pages
094:             */
095:            public int getData() {
096:                return data;
097:            }
098:
099:            /**
100:             * @return max data in pages
101:             */
102:            public int getDataMax() {
103:                return dataMax;
104:            }
105:
106:            /**
107:             * @return the data cache hit rate
108:             */
109:            public int getDchr() {
110:                return dchr;
111:            }
112:
113:            /**
114:             * @return used log pages
115:             */
116:            public int getLog() {
117:                return log;
118:            }
119:
120:            /**
121:             * @return max log pages
122:             */
123:            public int getLogMax() {
124:                return logMax;
125:            }
126:
127:            /**
128:             * @return used sessions
129:             */
130:            public int getSession() {
131:                return session;
132:            }
133:
134:            /**
135:             * @return max number of session
136:             */
137:            public int getSessionMax() {
138:                return sessionMax;
139:            }
140:
141:            /**
142:             * @return one of the DbState constants
143:             */
144:            public int getState() {
145:                return state;
146:            }
147:
148:            /**
149:             * @param i
150:             */
151:            public void setCchr(int i) {
152:                cchr = i;
153:            }
154:
155:            /**
156:             * @param i
157:             */
158:            public void setData(int i) {
159:                int oldData = data;
160:                data = i;
161:                pcs.firePropertyChange("data", oldData, data);
162:            }
163:
164:            /**
165:             * @param i
166:             */
167:            public void setDataMax(int i) {
168:                int oldDataMax = dataMax;
169:                dataMax = i;
170:                pcs.firePropertyChange("dataMax", oldDataMax, dataMax);
171:            }
172:
173:            /**
174:             * @param i
175:             */
176:            public void setDchr(int i) {
177:                dchr = i;
178:            }
179:
180:            /**
181:             * @param i
182:             */
183:            public void setLog(int i) {
184:                int oldLog = log;
185:                log = i;
186:                pcs.firePropertyChange("log", oldLog, log);
187:            }
188:
189:            /**
190:             * @param i
191:             */
192:            public void setLogMax(int i) {
193:                logMax = i;
194:            }
195:
196:            /**
197:             * @param i
198:             */
199:            public void setSession(int i) {
200:                int oldSession = session;
201:                session = i;
202:                pcs.firePropertyChange("session", oldSession, session);
203:            }
204:
205:            /**
206:             * @param i
207:             */
208:            public void setSessionMax(int i) {
209:                sessionMax = i;
210:            }
211:
212:            /**
213:             * @param i
214:             */
215:            public void setState(int i) {
216:                int oldState = state;
217:                state = i;
218:                pcs.firePropertyChange("state", oldState, state);
219:            }
220:
221:            /**
222:             * @return XXX
223:             */
224:            public String getBackUp() {
225:                return backUp;
226:            }
227:
228:            /**
229:             * @param string
230:             */
231:            public void setBackUp(String string) {
232:                backUp = string;
233:            }
234:
235:            /**
236:             * @return XXX
237:             */
238:            public String getName() {
239:                return name;
240:            }
241:
242:            /**
243:             * 
244:             * @return the path to the database files
245:             */
246:            public String getPath() {
247:                return path;
248:            }
249:
250:            /**
251:             * @return the version of the SAPDB kernel
252:             */
253:            public String getVersion() {
254:                return version;
255:            }
256:
257:            /**
258:             * @param string
259:             */
260:            public void setName(String string) {
261:                name = string;
262:            }
263:
264:            /**
265:             * @param string
266:             */
267:            public void setPath(String string) {
268:                path = string;
269:            }
270:
271:            /**
272:             * @param string the version string
273:             */
274:            public void setVersion(String string) {
275:                version = string;
276:            }
277:
278:            /**
279:             * @return the database instance
280:             */
281:            public DbInstance getDbi() {
282:                return dbi;
283:            }
284:
285:            /**
286:             * @param instance
287:             */
288:            public void setDbi(DbInstance instance) {
289:                dbi = instance;
290:            }
291:
292:            /**
293:             * @return true if autolog is enabled
294:             */
295:            public boolean isAutologEnabled() {
296:                return autologEnabled;
297:            }
298:
299:            /**
300:             * @param b
301:             */
302:            public void setAutologEnabled(boolean b) {
303:                autologEnabled = b;
304:            }
305:
306:            /**
307:             * @return the name used in the dbi list
308:             */
309:            public String getFullName() {
310:                return fullName;
311:            }
312:
313:            /**
314:             * @param string
315:             */
316:            public void setFullName(String string) {
317:                fullName = string;
318:            }
319:
320:            public String toString() {
321:                return "InstanceInformations for name=" + name + " fullName="
322:                        + fullName;
323:            }
324:
325:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.