Skip to content
Browse files

不要となったDbUtilを削除。

  • Loading branch information...
1 parent f132638 commit 0a48f614ab2027871ca38f76e9340868b53b0544 @sasasin committed Jan 2, 2012
Showing with 0 additions and 56 deletions.
  1. +0 −56 sreader/src/main/java/net/sasasin/sreader/util/DbUtil.java
View
56 sreader/src/main/java/net/sasasin/sreader/util/DbUtil.java
@@ -1,56 +0,0 @@
-/*
- * SReader is RSS/Atom feed reader with full text.
- *
- * Copyright (C) 2011, Shinnosuke Suzuki <sasasin@sasasin.net>
- *
- * This program 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 any later version.
- *
- * This program 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, see <http://www.gnu.org/licenses/>.
- */
-package net.sasasin.sreader.util;
-
-import java.sql.Clob;
-import java.sql.SQLException;
-
-import org.hibernate.SessionFactory;
-import org.hibernate.cfg.Configuration;
-
-/**
- * @author sasasin
- *
- */
-public class DbUtil {
-
- private static SessionFactory sf;
-
- public static SessionFactory getSessionFactory() {
- if (sf == null){
- sf = new Configuration().configure()
- .buildSessionFactory();
- }
- return sf;
- }
-
- public static Clob stringToClob(String str){
- return getSessionFactory().openSession().getLobHelper().createClob(str);
- }
-
- public static String clobToString(Clob clob) {
- try {
- return clob.getSubString(1, (int) clob.length());
- } catch (SQLException e) {
- e.printStackTrace();
- return "";
- }
- }
-}

0 comments on commit 0a48f61

Please sign in to comment.
Something went wrong with that request. Please try again.