Fork me on GitHub

Résultats CPD

Le document suivant contient les résultats de l'inspection CPD CPD 6.13.0.

Duplicatas

Fichier Ligne
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 398
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 430
        try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECTALL_CATEGORY_CODE, plugin ) )
        {
            daoUtil.setString( 1 , strCategoryCode );
            daoUtil.executeQuery( );
            List<Favorite> listFavorites = new ArrayList<Favorite>();

            while ( daoUtil.next( ) )
            {
                Favorite favorite = new Favorite();
                int nIndex = 1;
                favorite.setId( daoUtil.getInt( nIndex++ ) );
                favorite.setLabel( daoUtil.getString( nIndex++ ) );
                favorite.setUrl( daoUtil.getString( nIndex++ ) );
                favorite.setIsActivated( daoUtil.getBoolean( nIndex++ ) );
                favorite.setProviderName(daoUtil.getString( nIndex++ ) );
                favorite.setRemoteId( daoUtil.getString( nIndex++ ) );
                favorite.setIsDefault( daoUtil.getBoolean( nIndex++ ) );
                favorite.setDescription( daoUtil.getString( nIndex++ ) );
                favorite.setPictogramme( daoUtil.getString( nIndex++ ) );
                favorite.setCategoryCode( daoUtil.getString( nIndex++ ) );
                
                listFavorites.add( favorite );
            }

            daoUtil.free( );
            return listFavorites;
        } 
    }
Fichier Ligne
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 366
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 401
            daoUtil.executeQuery( );
            List<Favorite> listFavorites = new ArrayList<Favorite>();

            while ( daoUtil.next( ) )
            {
                Favorite favorite = new Favorite();
                int nIndex = 1;
                favorite.setId( daoUtil.getInt( nIndex++ ) );
                favorite.setLabel( daoUtil.getString( nIndex++ ) );
                favorite.setUrl( daoUtil.getString( nIndex++ ) );
                favorite.setIsActivated( daoUtil.getBoolean( nIndex++ ) );
                favorite.setProviderName(daoUtil.getString( nIndex++ ) );
                favorite.setRemoteId( daoUtil.getString( nIndex++ ) );
                favorite.setIsDefault( daoUtil.getBoolean( nIndex++ ) );
                favorite.setDescription( daoUtil.getString( nIndex++ ) );
                favorite.setPictogramme( daoUtil.getString( nIndex++ ) );
                favorite.setCategoryCode( daoUtil.getString( nIndex++ ) );
                
                listFavorites.add( favorite );
            }

            daoUtil.free( );
            return listFavorites;
        } 
    }
    
    /**
     * {@inheritDoc }
     */
    @Override
    public List<Favorite> selectCategoryCodeFavoritesList( String strCategoryCode, Plugin plugin )
Fichier Ligne
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 309
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 400
            daoUtil.setString( 1 , strProviderName );
            daoUtil.executeQuery( );
            List<Favorite> listFavorites = new ArrayList<Favorite>();

            while ( daoUtil.next( ) )
            {
                Favorite favorite = new Favorite();
                int nIndex = 1;
                favorite.setId( daoUtil.getInt( nIndex++ ) );
                favorite.setLabel( daoUtil.getString( nIndex++ ) );
                favorite.setUrl( daoUtil.getString( nIndex++ ) );
                favorite.setIsActivated( daoUtil.getBoolean( nIndex++ ) );
                favorite.setProviderName(daoUtil.getString( nIndex++ ) );
                favorite.setRemoteId( daoUtil.getString( nIndex++ ) );
                favorite.setIsDefault( daoUtil.getBoolean( nIndex++ ) );
                favorite.setDescription( daoUtil.getString( nIndex++ ) );
                favorite.setPictogramme( daoUtil.getString( nIndex++ ) );
                favorite.setCategoryCode( daoUtil.getString( nIndex++ ) );
                
                listFavorites.add( favorite );
            }

            daoUtil.free( );
            return listFavorites;
        } 
    }
    
    /**
     * {@inheritDoc }
     */
    @Override
    public int countProviderNameRemoteId( String strProviderName, String strRemoteId, Plugin plugin )
Fichier Ligne
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 310
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 366
            daoUtil.executeQuery( );
            List<Favorite> listFavorites = new ArrayList<Favorite>();

            while ( daoUtil.next( ) )
            {
                Favorite favorite = new Favorite();
                int nIndex = 1;
                favorite.setId( daoUtil.getInt( nIndex++ ) );
                favorite.setLabel( daoUtil.getString( nIndex++ ) );
                favorite.setUrl( daoUtil.getString( nIndex++ ) );
                favorite.setIsActivated( daoUtil.getBoolean( nIndex++ ) );
                favorite.setProviderName(daoUtil.getString( nIndex++ ) );
                favorite.setRemoteId( daoUtil.getString( nIndex++ ) );
                favorite.setIsDefault( daoUtil.getBoolean( nIndex++ ) );
                favorite.setDescription( daoUtil.getString( nIndex++ ) );
                favorite.setPictogramme( daoUtil.getString( nIndex++ ) );
                favorite.setCategoryCode( daoUtil.getString( nIndex++ ) );
                
                listFavorites.add( favorite );
            }

            daoUtil.free( );
            return listFavorites;
        } 
    }
    
    /**
     * {@inheritDoc }
     */
    @Override
    public int countProviderNameRemoteId( String strProviderName, String strRemoteId, Plugin plugin )
Fichier Ligne
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 309
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 432
            daoUtil.setString( 1 , strProviderName );
            daoUtil.executeQuery( );
            List<Favorite> listFavorites = new ArrayList<Favorite>();

            while ( daoUtil.next( ) )
            {
                Favorite favorite = new Favorite();
                int nIndex = 1;
                favorite.setId( daoUtil.getInt( nIndex++ ) );
                favorite.setLabel( daoUtil.getString( nIndex++ ) );
                favorite.setUrl( daoUtil.getString( nIndex++ ) );
                favorite.setIsActivated( daoUtil.getBoolean( nIndex++ ) );
                favorite.setProviderName(daoUtil.getString( nIndex++ ) );
                favorite.setRemoteId( daoUtil.getString( nIndex++ ) );
                favorite.setIsDefault( daoUtil.getBoolean( nIndex++ ) );
                favorite.setDescription( daoUtil.getString( nIndex++ ) );
                favorite.setPictogramme( daoUtil.getString( nIndex++ ) );
                favorite.setCategoryCode( daoUtil.getString( nIndex++ ) );
                
                listFavorites.add( favorite );
            }

            daoUtil.free( );
            return listFavorites;
        } 
    }
Fichier Ligne
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 366
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 433
            daoUtil.executeQuery( );
            List<Favorite> listFavorites = new ArrayList<Favorite>();

            while ( daoUtil.next( ) )
            {
                Favorite favorite = new Favorite();
                int nIndex = 1;
                favorite.setId( daoUtil.getInt( nIndex++ ) );
                favorite.setLabel( daoUtil.getString( nIndex++ ) );
                favorite.setUrl( daoUtil.getString( nIndex++ ) );
                favorite.setIsActivated( daoUtil.getBoolean( nIndex++ ) );
                favorite.setProviderName(daoUtil.getString( nIndex++ ) );
                favorite.setRemoteId( daoUtil.getString( nIndex++ ) );
                favorite.setIsDefault( daoUtil.getBoolean( nIndex++ ) );
                favorite.setDescription( daoUtil.getString( nIndex++ ) );
                favorite.setPictogramme( daoUtil.getString( nIndex++ ) );
                favorite.setCategoryCode( daoUtil.getString( nIndex++ ) );
                
                listFavorites.add( favorite );
            }

            daoUtil.free( );
            return listFavorites;
        } 
    }
Fichier Ligne
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 197
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 311
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 367
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 402
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 434
            daoUtil.executeQuery(  );

            while ( daoUtil.next(  ) )
            {
                Favorite favorite = new Favorite(  );
                int nIndex = 1;
                
                favorite.setId( daoUtil.getInt( nIndex++ ) );
                favorite.setLabel( daoUtil.getString( nIndex++ ) );
                favorite.setUrl( daoUtil.getString( nIndex++ ) );
                favorite.setIsActivated( daoUtil.getBoolean( nIndex++ ) );
                favorite.setProviderName( daoUtil.getString( nIndex++ ) );
                favorite.setRemoteId( daoUtil.getString( nIndex++ ) );
                favorite.setIsDefault( daoUtil.getBoolean( nIndex++ ) );
                favorite.setDescription( daoUtil.getString( nIndex++ ) );
                favorite.setPictogramme( daoUtil.getString( nIndex++ ) );
                favorite.setCategoryCode( daoUtil.getString( nIndex++ ) );
Fichier Ligne
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 95
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 169
            int nIndex = 1;
            
            daoUtil.setInt( nIndex++ , favorite.getId( ) );
            daoUtil.setString( nIndex++ , favorite.getLabel( ) );
            daoUtil.setString( nIndex++ , favorite.getUrl( ) );
            daoUtil.setBoolean( nIndex++ , favorite.getIsActivated( ) );
            daoUtil.setString( nIndex++, favorite.getProviderName( ) );
            daoUtil.setString( nIndex++, favorite.getRemoteId( ) );
            daoUtil.setBoolean( nIndex++, favorite.getIsDefault( ) );
            daoUtil.setString( nIndex++, favorite.getDescription( ) );
            daoUtil.setString( nIndex++, favorite.getPictogramme( ) );
            daoUtil.setString( nIndex++, favorite.getCategoryCode( ) );
            
            daoUtil.executeUpdate( );
Fichier Ligne
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 127
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 201
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 315
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 371
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 406
fr/paris/lutece/plugins/mydashboard/modules/favorites/business/FavoriteDAO.java 438
                favorite = new Favorite();
                int nIndex = 1;
                
                favorite.setId( daoUtil.getInt( nIndex++ ) );
                favorite.setLabel( daoUtil.getString( nIndex++ ) );
                favorite.setUrl( daoUtil.getString( nIndex++ ) );
                favorite.setIsActivated( daoUtil.getBoolean( nIndex++ ) );
                favorite.setProviderName(daoUtil.getString( nIndex++ ) );
                favorite.setRemoteId( daoUtil.getString( nIndex++ ) );
                favorite.setIsDefault( daoUtil.getBoolean( nIndex++ ) );
                favorite.setDescription( daoUtil.getString( nIndex++ ) );
                favorite.setPictogramme( daoUtil.getString( nIndex++ ) );
                favorite.setCategoryCode( daoUtil.getString( nIndex++ ) );
Fichier Ligne
fr/paris/lutece/plugins/mydashboard/modules/favorites/web/MyDashboardCategoriesComponent.java 97
fr/paris/lutece/plugins/mydashboard/modules/favorites/web/includes/FavoritesInclude.java 34
        SubscriptionFilter sFilter = new SubscriptionFilter( );
        sFilter.setIdSubscriber( user.getName( ) );
        sFilter.setSubscriptionProvider( CategoriesSubscriptionProviderService.getInstance( ).getProviderName( ) );
        List<Subscription> listCategories = SubscriptionService.getInstance( ).findByFilter( sFilter );
        //get favorite categories about those subscriptions
        List<Category> listCategoriesSuscribed = new ArrayList<Category>( );
        for ( Subscription sub : listCategories )
        {
            Category category = CategoryHome.findByPrimaryKey( Integer.parseInt( sub.getIdSubscribedResource( ) ) );
            if ( category != null )
            {
                listCategoriesSuscribed.add( category );
            }
        }