Fork me on GitHub

CPD Results

The following document contains the results of PMD's CPD 6.13.0.

Duplications

File Line
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 226
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 294
			daoUtil.executeQuery();
		
			List<ExtendFeedback> listExtendFeedbacks = new ArrayList<>(  );
			IResourceExtenderHistoryService resoucrExtenderHistoryService = SpringContextService.getBean( ResourceExtenderHistoryService.BEAN_SERVICE );
			while ( daoUtil.next(  ) )
			{
				int nIndex = 1;
                ExtendFeedback extendFeedback = new ExtendFeedback(  );
                extendFeedback.setId( daoUtil.getInt( nIndex++ ) );
                ResourceExtenderHistory resourceExtenderHistory = resoucrExtenderHistoryService.findByPrimary( daoUtil.getInt(  nIndex++ ) );
                extendFeedback.setResourceExtenderHistory( resourceExtenderHistory );
                extendFeedback.setIdResource( daoUtil.getInt( nIndex++ ) );
                extendFeedback.setResourceType( daoUtil.getString( nIndex++ ) );
                extendFeedback.setComment( daoUtil.getString( nIndex++ ) );
                extendFeedback.setUpdateStatusDate( daoUtil.getTimestamp( nIndex++ ) );
                extendFeedback.setFeedbackType( daoUtil.getString( nIndex++ ) );
                extendFeedback.setStatus( daoUtil.getBoolean( nIndex++ ) );
                extendFeedback.setLuteceUserName( daoUtil.getString( nIndex++ ) );
                extendFeedback.setEmail( daoUtil.getString( nIndex++ ) );
                
                listExtendFeedbacks.add( extendFeedback );
			}
	
			return listExtendFeedbacks;
		}
	}
File Line
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 115
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 258
			daoUtil.setInt( 1 , nId );
			daoUtil.executeQuery();
		
			ExtendFeedback extendFeedback = null;
			int nIndex = 1;
			if ( daoUtil.next() )
			{
				extendFeedback = new ExtendFeedback();
				IResourceExtenderHistoryService resoucrExtenderHistoryService = SpringContextService.getBean( ResourceExtenderHistoryService.BEAN_SERVICE );
                extendFeedback.setId( daoUtil.getInt( nIndex++ ) );
                ResourceExtenderHistory resourceExtenderHistory = resoucrExtenderHistoryService.findByPrimary( daoUtil.getInt(  nIndex++ ) );
                extendFeedback.setResourceExtenderHistory( resourceExtenderHistory );
                extendFeedback.setIdResource( daoUtil.getInt(  nIndex++ ) );
                extendFeedback.setResourceType( daoUtil.getString(  nIndex++ ) );
                extendFeedback.setComment( daoUtil.getString(  nIndex++ ) );
                extendFeedback.setUpdateStatusDate( daoUtil.getTimestamp( nIndex++ ) );
                extendFeedback.setFeedbackType( daoUtil.getString(  nIndex++ ) );
                extendFeedback.setStatus( daoUtil.getBoolean( nIndex++ ) );
                extendFeedback.setLuteceUserName( daoUtil.getString( nIndex++ ) );
                extendFeedback.setEmail( daoUtil.getString( nIndex++ ) );
			}
		
			return Optional.ofNullable( extendFeedback );
		}
    }

        
    /**
     * {@inheritDoc }
     */
    @Override
	public void delete( int nExtendFeedbackId, Plugin plugin )
File Line
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 191
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 228
			daoUtil.executeQuery(  );
			IResourceExtenderHistoryService resoucrExtenderHistoryService = SpringContextService.getBean( ResourceExtenderHistoryService.BEAN_SERVICE );
			while ( daoUtil.next(  ) )
			{
				int nIndex = 1;
                ExtendFeedback extendFeedback = new ExtendFeedback(  );
                extendFeedback.setId( daoUtil.getInt( nIndex++ ) );
                ResourceExtenderHistory resourceExtenderHistory = resoucrExtenderHistoryService.findByPrimary( daoUtil.getInt(  nIndex++ ) );
                extendFeedback.setResourceExtenderHistory( resourceExtenderHistory );
                extendFeedback.setIdResource( daoUtil.getInt( nIndex++ ) );
                extendFeedback.setResourceType( daoUtil.getString( nIndex++ ) );
                extendFeedback.setComment( daoUtil.getString( nIndex++ ) );
                extendFeedback.setUpdateStatusDate( daoUtil.getTimestamp( nIndex++ ) );
                extendFeedback.setFeedbackType( daoUtil.getString( nIndex++ ) );
                extendFeedback.setStatus( daoUtil.getBoolean( nIndex++ ) );
                extendFeedback.setLuteceUserName( daoUtil.getString( nIndex++ ) );
                extendFeedback.setEmail( daoUtil.getString( nIndex++ ) );
                
                listExtendFeedbacks.add( extendFeedback );
			}
	
			return listExtendFeedbacks;
		}
	}

    /**
     * {@inheritDoc }
     */
	@Override
	public List<ExtendFeedback> findAllByIdAndTypeResource( int nIdResource, String strResourceType, Plugin plugin )
File Line
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 191
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 296
			daoUtil.executeQuery(  );
			IResourceExtenderHistoryService resoucrExtenderHistoryService = SpringContextService.getBean( ResourceExtenderHistoryService.BEAN_SERVICE );
			while ( daoUtil.next(  ) )
			{
				int nIndex = 1;
                ExtendFeedback extendFeedback = new ExtendFeedback(  );
                extendFeedback.setId( daoUtil.getInt( nIndex++ ) );
                ResourceExtenderHistory resourceExtenderHistory = resoucrExtenderHistoryService.findByPrimary( daoUtil.getInt(  nIndex++ ) );
                extendFeedback.setResourceExtenderHistory( resourceExtenderHistory );
                extendFeedback.setIdResource( daoUtil.getInt( nIndex++ ) );
                extendFeedback.setResourceType( daoUtil.getString( nIndex++ ) );
                extendFeedback.setComment( daoUtil.getString( nIndex++ ) );
                extendFeedback.setUpdateStatusDate( daoUtil.getTimestamp( nIndex++ ) );
                extendFeedback.setFeedbackType( daoUtil.getString( nIndex++ ) );
                extendFeedback.setStatus( daoUtil.getBoolean( nIndex++ ) );
                extendFeedback.setLuteceUserName( daoUtil.getString( nIndex++ ) );
                extendFeedback.setEmail( daoUtil.getString( nIndex++ ) );
                
                listExtendFeedbacks.add( extendFeedback );
			}
	
			return listExtendFeedbacks;
		}
	}
File Line
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 123
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 196
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 233
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 266
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 301
				IResourceExtenderHistoryService resoucrExtenderHistoryService = SpringContextService.getBean( ResourceExtenderHistoryService.BEAN_SERVICE );
                extendFeedback.setId( daoUtil.getInt( nIndex++ ) );
                ResourceExtenderHistory resourceExtenderHistory = resoucrExtenderHistoryService.findByPrimary( daoUtil.getInt(  nIndex++ ) );
                extendFeedback.setResourceExtenderHistory( resourceExtenderHistory );
                extendFeedback.setIdResource( daoUtil.getInt(  nIndex++ ) );
                extendFeedback.setResourceType( daoUtil.getString(  nIndex++ ) );
                extendFeedback.setComment( daoUtil.getString(  nIndex++ ) );
                extendFeedback.setUpdateStatusDate( daoUtil.getTimestamp( nIndex++ ) );
                extendFeedback.setFeedbackType( daoUtil.getString(  nIndex++ ) );
                extendFeedback.setStatus( daoUtil.getBoolean( nIndex++ ) );
                extendFeedback.setLuteceUserName( daoUtil.getString( nIndex++ ) );
                extendFeedback.setEmail( daoUtil.getString( nIndex++ ) );
File Line
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 86
fr/paris/lutece/plugins/extend/modules/feedback/business/ExtendFeedbackDAO.java 162
		try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT , Statement.RETURN_GENERATED_KEYS, plugin ) )
		{              
            int nIndex = 1;
            daoUtil.setLong ( nIndex++, extendFeedback.getResourceExtenderHistory( ).getIdHistory( ) );
            daoUtil.setInt ( nIndex++, extendFeedback.getIdResource ( ) );
            daoUtil.setString ( nIndex++, extendFeedback.getResourceType ( ) );
            daoUtil.setString ( nIndex++, extendFeedback.getComment ( ) );
            daoUtil.setTimestamp( nIndex++, new Timestamp( new Date( ).getTime( ) ) );
            daoUtil.setString ( nIndex++, extendFeedback.getFeedbackType( ) );
            daoUtil.setString ( nIndex++, extendFeedback.getLuteceUserName( ) );