From do-not-reply at jboss.org Wed Jan 12 08:54:38 2011 Content-Type: multipart/mixed; boundary="===============6148514363292096657==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: exo-jcr-commits at lists.jboss.org Subject: [exo-jcr-commits] exo-jcr SVN: r3792 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/cleaner. Date: Wed, 12 Jan 2011 08:54:37 -0500 Message-ID: <201101121354.p0CDsb24032106@svn01.web.mwc.hst.phx2.redhat.com> --===============6148514363292096657== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: tolusha Date: 2011-01-12 08:54:37 -0500 (Wed, 12 Jan 2011) New Revision: 3792 Removed: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/= jcr/impl/util/jdbc/cleaner/MySQLSingleDBCleaner.java Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/= jcr/impl/util/jdbc/cleaner/DBCleanerService.java Log: EXOJCR-1150: DB clean on MySQL should not use iterating over all db Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/se= rvices/jcr/impl/util/jdbc/cleaner/DBCleanerService.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services= /jcr/impl/util/jdbc/cleaner/DBCleanerService.java 2011-01-12 13:42:15 UTC (= rev 3791) +++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services= /jcr/impl/util/jdbc/cleaner/DBCleanerService.java 2011-01-12 13:54:37 UTC (= rev 3792) @@ -207,10 +207,6 @@ { dbCleaner =3D new HSQLSingleDBCleaner(wsEntry, conn); } - else if (dbDialect =3D=3D DBConstants.DB_DIALECT_MYSQL || dbDiale= ct =3D=3D DBConstants.DB_DIALECT_MYSQL_UTF8) - { - dbCleaner =3D new MySQLSingleDBCleaner(wsEntry, conn); - } else { dbCleaner =3D new SingleDBCleaner(wsEntry, conn); Deleted: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/ser= vices/jcr/impl/util/jdbc/cleaner/MySQLSingleDBCleaner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services= /jcr/impl/util/jdbc/cleaner/MySQLSingleDBCleaner.java 2011-01-12 13:42:15 U= TC (rev 3791) +++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services= /jcr/impl/util/jdbc/cleaner/MySQLSingleDBCleaner.java 2011-01-12 13:54:37 U= TC (rev 3792) @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2003-2010 eXo Platform SAS. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see. - */ -package org.exoplatform.services.jcr.impl.util.jdbc.cleaner; - -import org.exoplatform.services.jcr.config.WorkspaceEntry; - -import java.sql.Connection; -import java.util.ArrayList; -import java.util.List; - -/** - * @author Anatoliy Bazko - * @version $Id$ - */ -public class MySQLSingleDBCleaner extends SingleDBCleaner -{ - - /** - * MySQLSingleDBCleaner constructor. - */ - public MySQLSingleDBCleaner(WorkspaceEntry wsEntry, Connection connecti= on) - { - super(wsEntry, connection, true); - } - - /** - * {@inheritDoc} - */ - @Override - protected List getDBCleanScripts() - { - List scripts =3D new ArrayList(commonSingleDBCleanSc= ripts); - scripts.add("delete from JCR_SITEM where I_CLASS=3D2 and CONTAINER_N= AME=3D'" + containerName + "'"); - - return scripts; - } -} --===============6148514363292096657==--