code: private void removeChildrenItems(JDBCStorageConnection conn, ResultSet resultSet) throws SQLException, IllegalNameException,
        IllegalStateException, UnsupportedOperationException, InvalidItemStateException, RepositoryException
     {
        String parentId = resultSet.getString(DBConstants.COLUMN_ID);
        String selectStatement = "select * from " + iTable + " where I_CLASS = 1 and PARENT_ID = '" + parentId + "'";
        String deleteStatement = "delete from " + iTable + " where I_CLASS = 1 and PARENT_ID = '" + parentId + "'";
  
        // traversing down to the bottom of the tree
        PreparedStatement statement = conn.getJdbcConnection().prepareStatement(selectStatement);
        ResultSet selResult = statement.executeQuery();
        try
        {
           while (selResult.next())
           {
              removeChildrenItems(conn, selResult);
           }
        }
        finally
        {
           JDBCUtils.freeResources(selResult, statement, null);
        }
        
        // remove properties
        NodeData node = createNodeData(resultSet);
        for (PropertyData prop : conn.getChildPropertiesData(node))
        {
           conn.delete(prop, new SimpleChangedSizeHandler());
        }
  
        // remove nodes
        statement = conn.getJdbcConnection().prepareStatement(deleteStatement);
        try
        {
           statement.execute();
        }
        finally
        {
           JDBCUtils.freeResources(null, statement, null);
        }
     }
docs: Removes all children items.