01: package net.sourceforge.squirrel_sql.plugins.hibernate.configuration;
02:
03: import java.io.File;
04:
05: public class HibernateConfiguration {
06: private String _provider;
07: private String _name;
08: private String[] _classpathEntries = new String[0];
09: private boolean _userDefinedProvider;
10: private boolean _jpa;
11: private String _persistenceUnitName;
12:
13: public String getProvider() {
14: return _provider;
15: }
16:
17: public void setProvider(String provider) {
18: this ._provider = provider;
19: }
20:
21: public String getName() {
22: return _name;
23: }
24:
25: public void setName(String name) {
26: this ._name = name;
27: }
28:
29: public String[] getClassPathEntries() {
30: return _classpathEntries;
31: }
32:
33: public void setClassPathEntries(String[] classPathEntries) {
34: _classpathEntries = classPathEntries;
35: }
36:
37: public String toString() {
38: return _name;
39: }
40:
41: public void setUserDefinedProvider(boolean userDefinedProvider) {
42: _userDefinedProvider = userDefinedProvider;
43: }
44:
45: public boolean isUserDefinedProvider() {
46: return _userDefinedProvider;
47: }
48:
49: public boolean isJPA() {
50: return _jpa;
51: }
52:
53: public void setJPA(boolean b) {
54: _jpa = b;
55: }
56:
57: public void setPersistenceUnitName(String persistenceUnitName) {
58: _persistenceUnitName = persistenceUnitName;
59: }
60:
61: public String getPersistenceUnitName() {
62: return _persistenceUnitName;
63: }
64:
65: public String classpathAsString() {
66: if (0 == _classpathEntries.length) {
67: return "";
68: } else {
69: String ret = _classpathEntries[0];
70:
71: for (String _classpathEntry : _classpathEntries) {
72: ret += File.pathSeparator + _classpathEntry;
73: }
74:
75: return ret;
76: }
77: }
78: }
|