/build.properties/src/com/framedobjects/dashwell/db/AbstractDbConnection.java

http://mobiledatanow.googlecode.com/ · Java · 130 lines · 73 code · 16 blank · 41 comment · 0 complexity · 6cfb910e6f954e4f99c80edda05cee78 MD5 · raw file

  1. /**
  2. *
  3. */
  4. package com.framedobjects.dashwell.db;
  5. import wsl.mdn.dataview.JdbcDriver;
  6. /**
  7. * This class describes all parameters required for a database connectivity.
  8. * @author Jens Richnow
  9. *
  10. */
  11. public class AbstractDbConnection {
  12. protected int connectionID = 0;
  13. protected int driverId = 0;
  14. protected JdbcDriver jdbcDriver = null;
  15. protected String driver = null;
  16. protected String name = null;
  17. protected String password = null;
  18. protected String url = null;
  19. protected String username = null;
  20. //protected String schema = null;
  21. protected int mirrorred = 0;
  22. protected DbSchema dbSchema = null;
  23. public AbstractDbConnection(int connectionID, int driverId, String name,
  24. String username, String password, String url, int mirrored){//String schema,
  25. this.connectionID = connectionID;
  26. this.driverId = driverId;
  27. this.name = name;
  28. this.username = username;
  29. this.password = password;
  30. this.url = url;
  31. //this.schema = schema;
  32. this.mirrorred = mirrored;
  33. }
  34. public AbstractDbConnection(int connectionID, String driver, String name,
  35. String username, String password, String url, int mirrored) {//String schema,
  36. this.connectionID = connectionID;
  37. this.driver = driver;
  38. this.name = name;
  39. this.username = username;
  40. this.password = password;
  41. this.url = url;
  42. //this.schema = schema;
  43. this.mirrorred = mirrored;
  44. }
  45. /**
  46. * @return Returns the connectionID.
  47. */
  48. public int getConnectionID() {
  49. return connectionID;
  50. }
  51. /**
  52. * @return Returns the dbSchema.
  53. */
  54. public DbSchema getDbSchema() {
  55. return dbSchema;
  56. }
  57. /**
  58. * @return Returns the driver.
  59. */
  60. public String getDriver() {
  61. return driver;
  62. }
  63. /**
  64. * @return Returns the mirrorred.
  65. */
  66. public int getMirrorred() {
  67. return mirrorred;
  68. }
  69. /**
  70. * @return Returns the name.
  71. */
  72. public String getName() {
  73. return name;
  74. }
  75. /**
  76. * @return Returns the password.
  77. */
  78. public String getPassword() {
  79. return password;
  80. }
  81. /**
  82. * @return Returns the schema.
  83. */
  84. /*public String getSchema() {
  85. return schema;
  86. }*/
  87. /**
  88. * @return Returns the url.
  89. */
  90. public String getUrl() {
  91. return url;
  92. }
  93. /**
  94. * @return Returns the username.
  95. */
  96. public String getUsername() {
  97. return username;
  98. }
  99. public void setDbSchema(DbSchema dbSchema) {
  100. this.dbSchema = dbSchema;
  101. }
  102. public int getDriverId() {
  103. return driverId;
  104. }
  105. public void setDriverId(int driverId) {
  106. this.driverId = driverId;
  107. }
  108. public JdbcDriver getJdbcDriver() {
  109. return jdbcDriver;
  110. }
  111. public void setJdbcDriver(JdbcDriver jdbcDriver) {
  112. this.jdbcDriver = jdbcDriver;
  113. }
  114. }