Source Code Cross Referenced for DatabaseFileInfo.java in  » Database-Client » squirrel-sql-2.6.5a » net » sourceforge » squirrel_sql » plugins » mssql » sql » dbfile » 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 » squirrel sql 2.6.5a » net.sourceforge.squirrel_sql.plugins.mssql.sql.dbfile 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package net.sourceforge.squirrel_sql.plugins.mssql.sql.dbfile;
002:
003:        /*
004:         * Copyright (C) 2004 Ryan Walberg <generalpf@yahoo.com>
005:         *
006:         * This library is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU Lesser General Public
008:         * License as published by the Free Software Foundation; either
009:         * version 2.1 of the License, or (at your option) any later version.
010:         *
011:         * This library is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         * Lesser General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU Lesser General Public
017:         * License along with this library; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
019:         */
020:
021:        import java.util.ArrayList;
022:        import java.util.HashMap;
023:
024:        public class DatabaseFileInfo {
025:
026:            private String _databaseName;
027:            private String _databaseSize;
028:            private String _owner;
029:            private short _compatibilityLevel;
030:            private String _createdDate;
031:            private HashMap<String, String> _options;
032:            private ArrayList<DatabaseFile> _dataFiles;
033:            private ArrayList<Object> _logFiles;
034:
035:            /** Creates a new instance of DatabaseFileInfo */
036:            public DatabaseFileInfo() {
037:                _options = new HashMap<String, String>();
038:                _dataFiles = new ArrayList<DatabaseFile>();
039:                _logFiles = new ArrayList<Object>();
040:            }
041:
042:            /**
043:             * Getter for property databaseSize.
044:             * @return Value of property databaseSize.
045:             */
046:            public String getDatabaseSize() {
047:                return this ._databaseSize;
048:            }
049:
050:            /**
051:             * Setter for property databaseSize.
052:             * @param databaseSize New value of property databaseSize.
053:             */
054:            public void setDatabaseSize(String databaseSize) {
055:                this ._databaseSize = databaseSize;
056:            }
057:
058:            /**
059:             * Getter for property owner.
060:             * @return Value of property owner.
061:             */
062:            public String getOwner() {
063:                return this ._owner;
064:            }
065:
066:            /**
067:             * Setter for property owner.
068:             * @param owner New value of property owner.
069:             */
070:            public void setOwner(String owner) {
071:                this ._owner = owner;
072:            }
073:
074:            /**
075:             * Getter for property compatibilityLevel.
076:             * @return Value of property compatibilityLevel.
077:             */
078:            public short getCompatibilityLevel() {
079:                return this ._compatibilityLevel;
080:            }
081:
082:            /**
083:             * Setter for property compatibilityLevel.
084:             * @param compatibilityLevel New value of property compatibilityLevel.
085:             */
086:            public void setCompatibilityLevel(short compatibilityLevel) {
087:                this ._compatibilityLevel = compatibilityLevel;
088:            }
089:
090:            /**
091:             * Getter for property createdDate.
092:             * @return Value of property createdDate.
093:             */
094:            public String getCreatedDate() {
095:                return this ._createdDate;
096:            }
097:
098:            /**
099:             * Setter for property createdDate.
100:             * @param createdDate New value of property createdDate.
101:             */
102:            public void setCreatedDate(String createdDate) {
103:                this ._createdDate = createdDate;
104:            }
105:
106:            public void setOption(String option, String value) {
107:                _options.put(option, value);
108:            }
109:
110:            public String getOption(String option) {
111:                if (_options.containsKey(option))
112:                    return _options.get(option);
113:                else
114:                    return "";
115:            }
116:
117:            /**
118:             * Getter for property databaseName.
119:             * @return Value of property databaseName.
120:             */
121:            public String getDatabaseName() {
122:                return this ._databaseName;
123:            }
124:
125:            /**
126:             * Setter for property databaseName.
127:             * @param databaseName New value of property databaseName.
128:             */
129:            public void setDatabaseName(String databaseName) {
130:                this ._databaseName = databaseName;
131:            }
132:
133:            public Object[] getLogFiles() {
134:                return this ._logFiles.toArray();
135:            }
136:
137:            public Object[] getDataFiles() {
138:                return this ._dataFiles.toArray();
139:            }
140:
141:            public void addLogFile(DatabaseFile file) {
142:                _logFiles.add(file);
143:            }
144:
145:            public void addDataFile(DatabaseFile file) {
146:                // not so simple -- we want to keep the filegroups together.
147:                for (int i = 0; i < _dataFiles.size(); i++) {
148:                    DatabaseFile f = _dataFiles.get(i);
149:                    if (f.getFilegroup().equals(file.getFilegroup())) {
150:                        // keep scanning until we're either EOL or find a different filegroup.
151:                        for (int j = i + 1; j < _dataFiles.size(); j++) {
152:                            f = _dataFiles.get(i);
153:                            if (!f.getFilegroup().equals(file.getFilegroup())) {
154:                                // j is the index of the first file in the next filegroup.
155:                                _dataFiles.add(j, file);
156:                                return;
157:                            }
158:                        }
159:                    }
160:                }
161:                // if we're still in this function, just add it at the end.
162:                _dataFiles.add(file);
163:            }
164:        }
ww__w._j_a__v_a___2___s_._c_o__m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.