diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-07-05 10:06:55 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-07-06 09:22:44 +0200 |
commit | 32af292b745b7226bacc3f34d612437664af0ba3 (patch) | |
tree | 538d0b9852eaeb08ad685d426ea61c8170210e40 /sonar-db/src/main/java/org/sonar/db/AbstractDao.java | |
parent | 1df148803610cd54f182b8636f01c0e6ece92b19 (diff) | |
download | sonarqube-32af292b745b7226bacc3f34d612437664af0ba3.tar.gz sonarqube-32af292b745b7226bacc3f34d612437664af0ba3.zip |
Move some classes from sonar-server to sonar-db
Diffstat (limited to 'sonar-db/src/main/java/org/sonar/db/AbstractDao.java')
-rw-r--r-- | sonar-db/src/main/java/org/sonar/db/AbstractDao.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/AbstractDao.java b/sonar-db/src/main/java/org/sonar/db/AbstractDao.java new file mode 100644 index 00000000000..245f0e87ec9 --- /dev/null +++ b/sonar-db/src/main/java/org/sonar/db/AbstractDao.java @@ -0,0 +1,41 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * SonarQube is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.db; + +import org.sonar.api.utils.System2; + +public abstract class AbstractDao implements Dao { + + private final MyBatis myBatis; + private final System2 system2; + + public AbstractDao(MyBatis myBatis, System2 system2) { + this.myBatis = myBatis; + this.system2 = system2; + } + + protected MyBatis myBatis() { + return myBatis; + } + + protected long now() { + return system2.now(); + } +} |