Examples of DummyRepair


Examples of org.exoplatform.services.jcr.impl.checker.DummyRepair

    */
   protected InspectionQuery getSelectQuery() throws SQLException
   {
      return new InspectionQuery("SELECT * FROM " + getTableName() + " WHERE " + getParentColumn() + "='/"
         + workspaceEntry.getUniqueName() + "/" + CacheableLockManagerImpl.LOCKS + "'", new String[]{getIdColumn()},
         "Locks table match", new DummyRepair());
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.checker.DummyRepair

   protected InspectionQuery getDeleteQuery(String nodeId) throws SQLException
   {
      return new InspectionQuery("DELETE FROM " + getTableName() + " WHERE " + getIdColumn() + "='/"
         + workspaceEntry.getUniqueName() + "/" + CacheableLockManagerImpl.LOCKS + "/" + nodeId + "'", new String[]{},
         "", new DummyRepair());
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.checker.DummyRepair

            ? "select PROPERTY_ID, ORDER_NUM, STORAGE_DESC from JCR_MVALUE where STORAGE_DESC is not null"
            : "select V.PROPERTY_ID, V.ORDER_NUM, V.STORAGE_DESC from JCR_SVALUE V, JCR_SITEM I"
               + " where I.CONTAINER_NAME='" + jdbcDataContainer.containerName
               + "' and V.PROPERTY_ID = I.ID and STORAGE_DESC is not null",
            new String[]{DBConstants.COLUMN_VPROPERTY_ID, DBConstants.COLUMN_VORDERNUM,
               DBConstants.COLUMN_VSTORAGE_DESC}, "Items with value data stored in value storage", new DummyRepair());

      lockInspectionQuery =
         new InspectionQuery(jdbcDataContainer.multiDb ? "select distinct PARENT_ID from JCR_MITEM where I_CLASS=2 AND"
            + " (NAME='[http://www.jcp.org/jcr/1.0]lockOwner' OR NAME='[http://www.jcp.org/jcr/1.0]lockIsDeep')"
            : "select distinct PARENT_ID from JCR_SITEM WHERE CONTAINER_NAME='" + jdbcDataContainer.containerName + "'"
               + " AND I_CLASS=2 and (NAME='[http://www.jcp.org/jcr/1.0]lockOwner'"
               + " OR NAME='[http://www.jcp.org/jcr/1.0]lockIsDeep')", new String[]{DBConstants.COLUMN_PARENTID},
            "Items which have jcr:lockOwner and jcr:lockIsDeep properties", new DummyRepair());

      // ITEM tables
      itemsInspectionQuery.add(new InspectionQuery(jdbcDataContainer.multiDb
         ? "select * from JCR_MITEM I where NOT EXISTS(select * from JCR_MITEM P where P.ID = I.PARENT_ID)"
         : "select * from JCR_SITEM I where I.CONTAINER_NAME='" + jdbcDataContainer.containerName
            + "' and NOT EXISTS(select * from JCR_SITEM P where P.ID = I.PARENT_ID)", new String[]{
         DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME, DBConstants.COLUMN_CLASS},
            "Items that do not have parent nodes", new RootAsParentAssigner(jdbcDataContainer
               .getConnectionFactory())));

      String statement =
         jdbcDataContainer.multiDb
            ? "select * from JCR_MITEM P where P.I_CLASS=2 and P.P_MULTIVALUED=? and NOT EXISTS(select * from JCR_MVALUE V "
               + "where V.PROPERTY_ID=P.ID)" : "select * from JCR_SITEM P where P.CONTAINER_NAME='"
               + jdbcDataContainer.containerName + "' and P.I_CLASS=2"
               + " and P.P_MULTIVALUED=? and NOT EXISTS(select * from JCR_SVALUE V where V.PROPERTY_ID=P.ID)";

      if (jdbcDataContainer.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_PGSQL))
      {
         statement = statement.replace("?", "'f'");
      }
      else if (jdbcDataContainer.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_HSQLDB))
      {
         statement = statement.replace("?", "FALSE");
      }
      else
      {
         statement = statement.replace("?", "0");
      }

      itemsInspectionQuery.add(new InspectionQuery(statement, new String[]{DBConstants.COLUMN_ID,
         DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME},
         "A node that has a single valued properties with nothing declared in the VALUE table.", new PropertyRemover(
            jdbcDataContainer.getConnectionFactory(), nodeTypeManager)));

      itemsInspectionQuery.add(new InspectionQuery(jdbcDataContainer.multiDb
         ? "select * from JCR_MITEM N where N.I_CLASS=1 and NOT EXISTS "
            + "(select * from JCR_MITEM P where P.I_CLASS=2 and P.PARENT_ID=N.ID "
            + "and P.NAME='[http://www.jcp.org/jcr/1.0]primaryType')"
         : "select * from JCR_SITEM N where N.CONTAINER_NAME='" + jdbcDataContainer.containerName
            + "' and N.I_CLASS=1 and NOT EXISTS (select * from JCR_SITEM P "
            + "where P.I_CLASS=2 and P.PARENT_ID=N.ID and P.NAME='[http://www.jcp.org/jcr/1.0]primaryType' "
            + "and P.CONTAINER_NAME='" + jdbcDataContainer.containerName + "')", new String[]{DBConstants.COLUMN_ID,
         DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME}, "A node that doesn't have primary type property",
         new NodeRemover(jdbcDataContainer.getConnectionFactory(), jdbcDataContainer.multiDb ? "JCR_MITEM"
            : "JCR_SITEM", nodeTypeManager)));

      itemsInspectionQuery.add(new InspectionQuery(jdbcDataContainer.multiDb
         ? "select * from JCR_MVALUE V where NOT EXISTS(select * from JCR_MITEM P "
            + "where V.PROPERTY_ID = P.ID and P.I_CLASS=2)"
         : "select * from JCR_SVALUE V where NOT EXISTS(select * from JCR_SITEM P "
            + "where V.PROPERTY_ID = P.ID and P.I_CLASS=2)", new String[]{DBConstants.COLUMN_ID,
         DBConstants.COLUMN_VPROPERTY_ID}, "All value records that has not related property record",
         new ValueRecordsRemover(jdbcDataContainer.getConnectionFactory(), jdbcDataContainer.containerName,
            jdbcDataContainer.multiDb)));

      // The differences in the queries by DB dialect.
      if (jdbcDataContainer.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_SYBASE))
      {
         statement =
            jdbcDataContainer.multiDb
               ? "select * from JCR_MVALUE where (STORAGE_DESC is not null and not DATA like null)"
               : "select V.* from JCR_SVALUE V, JCR_SITEM I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
                  + jdbcDataContainer.containerName + "' AND ((STORAGE_DESC is not null and not DATA like null))";
      }
      else if (jdbcDataContainer.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_ORACLE)
         || jdbcDataContainer.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_ORACLEOCI))
      {
         statement =
            jdbcDataContainer.multiDb
               ? "select * from JCR_MVALUE where (STORAGE_DESC is not null and DATA is not null)"
               : "select V.* from JCR_SVALUE V, JCR_SITEM I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
                  + jdbcDataContainer.containerName + "' AND (STORAGE_DESC is not null and DATA is not null)";
      }
      else
      {
         statement =
            jdbcDataContainer.multiDb
               ? "select * from JCR_MVALUE where (STORAGE_DESC is not null and DATA is not null)"
               : "select V.* from JCR_SVALUE V, JCR_SITEM I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
                  + jdbcDataContainer.containerName + "' AND ((STORAGE_DESC is not null and DATA is not null))";
      }
      itemsInspectionQuery.add(new InspectionQuery(statement, new String[]{DBConstants.COLUMN_ID},
         "Incorrect VALUE records. Both fields STORAGE_DESC and DATA contain not null value.", new DummyRepair()));

      itemsInspectionQuery.add(new InspectionQuery(jdbcDataContainer.multiDb
         ? "select * from JCR_MITEM I where I.ID = I.PARENT_ID and I.NAME <> '" + Constants.ROOT_PARENT_NAME + "'"
         : "select * from JCR_SITEM I where I.ID = I.PARENT_ID and I.CONTAINER_NAME='"
            + jdbcDataContainer.containerName + "' and I.NAME <> '" + Constants.ROOT_PARENT_NAME + "'", new String[]{
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.checker.DummyRepair

         new InspectionQuery(singleDatabase ? "select V.PROPERTY_ID, V.ORDER_NUM, V.STORAGE_DESC from " + valueTable
            + " V, " + itemTable + " I" + " where I.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName
            + "' and V.PROPERTY_ID = I.ID and STORAGE_DESC is not null"
            : "select PROPERTY_ID, ORDER_NUM, STORAGE_DESC from " + valueTable + " where STORAGE_DESC is not null",
            new String[]{DBConstants.COLUMN_VPROPERTY_ID, DBConstants.COLUMN_VORDERNUM,
               DBConstants.COLUMN_VSTORAGE_DESC}, "Items with value data stored in value storage", new DummyRepair());

      lockInspectionQuery =
         new InspectionQuery(singleDatabase ? "select distinct PARENT_ID from " + itemTable + " WHERE CONTAINER_NAME='"
            + jdbcDataContainer.containerConfig.containerName + "'"
            + " AND I_CLASS=2 and (NAME='[http://www.jcp.org/jcr/1.0]lockOwner'"
            + " OR NAME='[http://www.jcp.org/jcr/1.0]lockIsDeep')" : "select distinct PARENT_ID from " + itemTable
            + " where I_CLASS=2 AND"
            + " (NAME='[http://www.jcp.org/jcr/1.0]lockOwner' OR NAME='[http://www.jcp.org/jcr/1.0]lockIsDeep')",
            new String[]{DBConstants.COLUMN_PARENTID}, "Items which have jcr:lockOwner and jcr:lockIsDeep properties",
            new DummyRepair());

      // ITEM tables
      itemsInspectionQuery.add(new InspectionQuery(singleDatabase ? "select * from " + itemTable
         + " I where I.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName
         + "' and NOT EXISTS(select * from " + itemTable + " P where P.ID = I.PARENT_ID)" : "select * from "
         + itemTable + " I where NOT EXISTS(select * from " + itemTable + " P where P.ID = I.PARENT_ID)", new String[]{
         DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME, DBConstants.COLUMN_CLASS},
         "Items that do not have parent nodes", new RootAsParentAssigner(jdbcDataContainer.getConnectionFactory(),
            jdbcDataContainer.containerConfig)));

      String statement =
         singleDatabase ? "select * from " + itemTable + " P where P.CONTAINER_NAME='"
            + jdbcDataContainer.containerConfig.containerName + "' and P.I_CLASS=2"
            + " and P.P_MULTIVALUED=? and NOT EXISTS( select * from " + valueTable + " V where V.PROPERTY_ID=P.ID)"
            : "select * from " + itemTable
               + " P where P.I_CLASS=2 and P.P_MULTIVALUED=? and NOT EXISTS( select * from " + valueTable + " V "
               + "where V.PROPERTY_ID=P.ID)";

      if (jdbcDataContainer.containerConfig.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_PGSQL)
         || jdbcDataContainer.containerConfig.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_PGSQL_SCS))
      {
         statement = statement.replace("?", "'f'");
      }
      else if (jdbcDataContainer.containerConfig.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_HSQLDB))
      {
         statement = statement.replace("?", "FALSE");
      }
      else
      {
         statement = statement.replace("?", "0");
      }

      itemsInspectionQuery.add(new InspectionQuery(statement, new String[]{DBConstants.COLUMN_ID,
         DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME},
         "A node that has a single valued properties with nothing declared in the VALUE table.", new PropertyRemover(
            jdbcDataContainer.getConnectionFactory(), jdbcDataContainer.containerConfig, nodeTypeManager)));

      itemsInspectionQuery.add(new InspectionQuery(singleDatabase ? "select * from " + itemTable
         + " N where N.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName
         + "' and N.I_CLASS=1 and NOT EXISTS (select * from " + itemTable + " P "
         + "where P.I_CLASS=2 and P.PARENT_ID=N.ID and P.NAME='[http://www.jcp.org/jcr/1.0]primaryType' "
         + "and P.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName + "')" : "select * from "
         + itemTable + " N where N.I_CLASS=1 and NOT EXISTS " + "(select * from " + itemTable
         + " P where P.I_CLASS=2 and P.PARENT_ID=N.ID " + "and P.NAME='[http://www.jcp.org/jcr/1.0]primaryType')",
         new String[]{DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME},
         "A node that doesn't have primary type property", new NodeRemover(jdbcDataContainer.getConnectionFactory(),
            jdbcDataContainer.containerConfig, nodeTypeManager)));

      itemsInspectionQuery.add(new InspectionQuery(singleDatabase ? "select * from " + valueTable
         + " V where NOT EXISTS(select * from " + itemTable + " P " + "where V.PROPERTY_ID = P.ID and P.I_CLASS=2)"
         : "select * from " + valueTable + " V where NOT EXISTS(select * from " + itemTable + " P "
            + "where V.PROPERTY_ID = P.ID and P.I_CLASS=2)", new String[]{DBConstants.COLUMN_ID,
         DBConstants.COLUMN_VPROPERTY_ID}, "All value records that has not related property record",
         new ValueRecordsRemover(jdbcDataContainer.getConnectionFactory(), jdbcDataContainer.containerConfig)));

      // The differences in the queries by DB dialect.
      if (jdbcDataContainer.containerConfig.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_SYBASE))
      {
         statement =
            singleDatabase ? "select V.* from " + valueTable + " V, " + itemTable
               + " I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
               + jdbcDataContainer.containerConfig.containerName
               + "' AND ((STORAGE_DESC is not null and not DATA like null))" : "select * from " + valueTable
               + " where (STORAGE_DESC is not null and not DATA like null)";
      }
      else if (jdbcDataContainer.containerConfig.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_ORACLE)
         || jdbcDataContainer.containerConfig.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_ORACLEOCI))
      {
         statement =
            singleDatabase ? "select V.* from " + valueTable + " V, " + itemTable
               + " I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
               + jdbcDataContainer.containerConfig.containerName
               + "' AND (STORAGE_DESC is not null and DATA is not null)" : "select * from " + valueTable
               + " where (STORAGE_DESC is not null and DATA is not null)";
      }
      else
      {
         statement =
            singleDatabase ? "select V.* from " + valueTable + " V, " + itemTable
               + " I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
               + jdbcDataContainer.containerConfig.containerName
               + "' AND ((STORAGE_DESC is not null and DATA is not null))" : "select * from " + valueTable
               + " where (STORAGE_DESC is not null and DATA is not null)";
      }
      itemsInspectionQuery.add(new InspectionQuery(statement, new String[]{DBConstants.COLUMN_ID},
         "Incorrect VALUE records. Both fields STORAGE_DESC and DATA contain not null value.", new DummyRepair()));

      itemsInspectionQuery.add(new InspectionQuery(singleDatabase ? "select * from " + itemTable
         + " I where I.ID = I.PARENT_ID and I.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName
         + "' and I.NAME <> '" + Constants.ROOT_PARENT_NAME + "'" : "select * from " + itemTable
         + " I where I.ID = I.PARENT_ID and I.NAME <> '" + Constants.ROOT_PARENT_NAME + "'", new String[]{
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.checker.DummyRepair

    * {@inheritDoc}
    */
   protected InspectionQuery getSelectQuery() throws SQLException
   {
      return new InspectionQuery("SELECT * FROM " + getTableName() + " WHERE " + getParentColumn() + "='/"
         + CacheableLockManagerImpl.LOCKS + "'", new String[]{getIdColumn()}, "Locks table match", new DummyRepair());
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.checker.DummyRepair

    * {@inheritDoc}
    */
   protected InspectionQuery getDeleteQuery(String nodeId) throws SQLException
   {
      return new InspectionQuery("DELETE FROM " + getTableName() + " WHERE " + getIdColumn() + "='/"
         + CacheableLockManagerImpl.LOCKS + "/" + nodeId + "'", new String[]{}, "", new DummyRepair());
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.checker.DummyRepair

    */
   protected InspectionQuery getSelectQuery() throws SQLException
   {
      return new InspectionQuery("SELECT * FROM " + getTableName() + " WHERE " + getParentColumn() + "='/"
         + workspaceEntry.getUniqueName() + "/" + CacheableLockManagerImpl.LOCKS + "'", new String[]{getIdColumn()},
         "Locks table match", new DummyRepair());
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.checker.DummyRepair

   protected InspectionQuery getDeleteQuery(String nodeId) throws SQLException
   {
      return new InspectionQuery("DELETE FROM " + getTableName() + " WHERE " + getIdColumn() + "='/"
         + workspaceEntry.getUniqueName() + "/" + CacheableLockManagerImpl.LOCKS + "/" + nodeId + "'", new String[]{},
         "", new DummyRepair());
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.checker.DummyRepair

            ? "select PROPERTY_ID, ORDER_NUM, STORAGE_DESC from JCR_MVALUE where STORAGE_DESC is not null"
            : "select V.PROPERTY_ID, V.ORDER_NUM, V.STORAGE_DESC from JCR_SVALUE V, JCR_SITEM I"
               + " where I.CONTAINER_NAME='" + jdbcDataContainer.containerName
               + "' and V.PROPERTY_ID = I.ID and STORAGE_DESC is not null",
            new String[]{DBConstants.COLUMN_VPROPERTY_ID, DBConstants.COLUMN_VORDERNUM,
               DBConstants.COLUMN_VSTORAGE_DESC}, "Items with value data stored in value storage", new DummyRepair());

      lockInspectionQuery =
         new InspectionQuery(jdbcDataContainer.multiDb ? "select distinct PARENT_ID from JCR_MITEM where I_CLASS=2 AND"
            + " (NAME='[http://www.jcp.org/jcr/1.0]lockOwner' OR NAME='[http://www.jcp.org/jcr/1.0]lockIsDeep')"
            : "select distinct PARENT_ID from JCR_SITEM WHERE CONTAINER_NAME='" + jdbcDataContainer.containerName + "'"
               + " AND I_CLASS=2 and (NAME='[http://www.jcp.org/jcr/1.0]lockOwner'"
               + " OR NAME='[http://www.jcp.org/jcr/1.0]lockIsDeep')", new String[]{DBConstants.COLUMN_PARENTID},
            "Items which have jcr:lockOwner and jcr:lockIsDeep properties", new DummyRepair());

      // ITEM tables
      itemsInspectionQuery.add(new InspectionQuery(jdbcDataContainer.multiDb
         ? "select * from JCR_MITEM I where NOT EXISTS(select * from JCR_MITEM P where P.ID = I.PARENT_ID)"
         : "select * from JCR_SITEM I where I.CONTAINER_NAME='" + jdbcDataContainer.containerName
            + "' and NOT EXISTS(select * from JCR_SITEM P where P.ID = I.PARENT_ID)", new String[]{
         DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME, DBConstants.COLUMN_CLASS},
            "Items that do not have parent nodes", new RootAsParentAssigner(jdbcDataContainer
               .getConnectionFactory())));

      itemsInspectionQuery
         .add(new InspectionQueryFilteredMultivaluedProperties(
            jdbcDataContainer.multiDb
               ? "select * from JCR_MITEM P where P.I_CLASS=2 and P.P_MULTIVALUED=? and NOT EXISTS( select * from JCR_MVALUE V "
                  + "where V.PROPERTY_ID=P.ID)" : "select * from JCR_SITEM P where P.CONTAINER_NAME='"
                  + jdbcDataContainer.containerName + "' and P.I_CLASS=2"
                  + " and P.P_MULTIVALUED=? and NOT EXISTS( select * from JCR_SVALUE V where V.PROPERTY_ID=P.ID)",
            new String[]{DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME},
            "A node that has a single valued properties with nothing declared in the VALUE table.",
            new PropertyRemover(jdbcDataContainer.getConnectionFactory(), nodeTypeManager)));

      itemsInspectionQuery.add(new InspectionQuery(jdbcDataContainer.multiDb
         ? "select * from JCR_MITEM N where N.I_CLASS=1 and NOT EXISTS "
            + "(select * from JCR_MITEM P where P.I_CLASS=2 and P.PARENT_ID=N.ID "
            + "and P.NAME='[http://www.jcp.org/jcr/1.0]primaryType')"
         : "select * from JCR_SITEM N where N.CONTAINER_NAME='" + jdbcDataContainer.containerName
            + "' and N.I_CLASS=1 and NOT EXISTS (select * from JCR_SITEM P "
            + "where P.I_CLASS=2 and P.PARENT_ID=N.ID and P.NAME='[http://www.jcp.org/jcr/1.0]primaryType' "
            + "and P.CONTAINER_NAME='" + jdbcDataContainer.containerName + "')", new String[]{DBConstants.COLUMN_ID,
         DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME}, "A node that doesn't have primary type property",
         new NodeRemover(jdbcDataContainer.getConnectionFactory(), nodeTypeManager)));

      itemsInspectionQuery.add(new InspectionQuery(jdbcDataContainer.multiDb
         ? "select * from JCR_MVALUE V where NOT EXISTS(select * from JCR_MITEM P "
            + "where V.PROPERTY_ID = P.ID and P.I_CLASS=2)"
         : "select * from JCR_SVALUE V where NOT EXISTS(select * from JCR_SITEM P "
            + "where V.PROPERTY_ID = P.ID and P.I_CLASS=2)", new String[]{DBConstants.COLUMN_ID,
         DBConstants.COLUMN_VPROPERTY_ID}, "All value records that has not related property record",
         new ValueRecordsRemover(jdbcDataContainer.getConnectionFactory(), jdbcDataContainer.containerName,
            jdbcDataContainer.multiDb)));

      // The differences in the queries by DB dialect.
      String statement;
      if (jdbcDataContainer.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_SYBASE))
      {
         statement =
            jdbcDataContainer.multiDb
               ? "select * from JCR_MVALUE where (STORAGE_DESC is not null and not DATA like null)"
               : "select V.* from JCR_SVALUE V, JCR_SITEM I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
                  + jdbcDataContainer.containerName + "' AND ((STORAGE_DESC is not null and not DATA like null))";
      }
      else if (jdbcDataContainer.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_ORACLE)
         || jdbcDataContainer.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_ORACLEOCI))
      {
         statement =
            jdbcDataContainer.multiDb
               ? "select * from JCR_MVALUE where (STORAGE_DESC is not null and DATA is not null)"
               : "select V.* from JCR_SVALUE V, JCR_SITEM I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
                  + jdbcDataContainer.containerName + "' AND (STORAGE_DESC is not null and DATA is not null)";
      }
      else
      {
         statement =
            jdbcDataContainer.multiDb
               ? "select * from JCR_MVALUE where (STORAGE_DESC is not null and DATA is not null)"
               : "select V.* from JCR_SVALUE V, JCR_SITEM I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
                  + jdbcDataContainer.containerName + "' AND ((STORAGE_DESC is not null and DATA is not null))";
      }
      itemsInspectionQuery.add(new InspectionQuery(statement, new String[]{DBConstants.COLUMN_ID},
         "Incorrect VALUE records. Both fields STORAGE_DESC and DATA contain not null value.", new DummyRepair()));

      itemsInspectionQuery.add(new InspectionQuery(jdbcDataContainer.multiDb
         ? "select * from JCR_MITEM I where I.ID = I.PARENT_ID and I.NAME <> '" + Constants.ROOT_PARENT_NAME + "'"
         : "select * from JCR_SITEM I where I.ID = I.PARENT_ID and I.CONTAINER_NAME='"
            + jdbcDataContainer.containerName + "' and I.NAME <> '" + Constants.ROOT_PARENT_NAME + "'", new String[]{
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.checker.DummyRepair

    * {@inheritDoc}
    */
   protected InspectionQuery getSelectQuery() throws SQLException
   {
      return new InspectionQuery("SELECT * FROM " + getTableName(), new String[]{getIdColumn()}, "Locks table match",
         new DummyRepair());
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.