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/helpdesk/business/SubjectDAO.java 431
fr/paris/lutece/plugins/helpdesk/business/ThemeDAO.java 393
        }
    }

    /**
     * Insert a new record in the table.
     *
     * @param nIdAbstractSubject The id of the object Subject
     * @param nIdFaq The parent id of the object Faq
     * @param plugin The Plugin using this data access service
     */
    public synchronized void insertLinkToFaq( int nIdAbstractSubject, int nIdFaq, Plugin plugin )
    {
        try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT_LN_FAQ, plugin ) )
        {
        	daoUtil.setInt( 1, nIdAbstractSubject );
            daoUtil.setInt( 2, nIdFaq );

            daoUtil.executeUpdate(  );
        }
    }

    /**
     * delete a record in the table.
     *
     * @param nIdAbstractSubject The id of the object Subject
     * @param nIdFaq The parent id of the object Faq
     * @param plugin The Plugin using this data access service
     */
    public synchronized void deleteLinkToFaq( int nIdAbstractSubject, int nIdFaq, Plugin plugin )
    {
        try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_DELETE_LN_FAQ, plugin ) )
        {
        	daoUtil.setInt( 1, nIdAbstractSubject );
            daoUtil.setInt( 2, nIdFaq );

            daoUtil.executeUpdate(  );
        }
    }

    /**
     * delete a record in the table.
     *
     * @param nIdAbstractSubject The id of the object Subject
     * @param plugin The Plugin using this data access service
     */
    public synchronized void deleteAllLinksToFaq( int nIdAbstractSubject, Plugin plugin )
    {
        try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_DELETE_ALL_LN_FAQ, plugin ) )
        {
        	daoUtil.setInt( 1, nIdAbstractSubject );

            daoUtil.executeUpdate(  );
        }
    }
}
Fichier Ligne
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 250
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 283
        	daoUtil.setInt( 1, nIdUser );
            daoUtil.executeQuery(  );

            while ( daoUtil.next(  ) )
            {
                VisitorQuestion visitorQuestion = new VisitorQuestion(  );
                visitorQuestion.setIdVisitorQuestion( daoUtil.getInt( 1 ) );
                visitorQuestion.setLastname( daoUtil.getString( 2 ) );
                visitorQuestion.setFirstname( daoUtil.getString( 3 ) );
                visitorQuestion.setEmail( daoUtil.getString( 4 ) );
                visitorQuestion.setQuestion( daoUtil.getString( 5 ) );
                visitorQuestion.setAnswer( daoUtil.getString( 6 ) );
                visitorQuestion.setDate( daoUtil.getDate( 7 ) );
                visitorQuestion.setIdUser( daoUtil.getInt( 8 ) );
                visitorQuestion.setIdTheme( daoUtil.getInt( 9 ) );
                list.add( visitorQuestion );
            }

            return list;
        }
    }

    /**
     * Find all objects
     * @param nIdTheme The theme ID
     * @param plugin The Plugin using this data access service
     * @return A Collection of objects
     */
    public Collection<VisitorQuestion> findByTheme( int nIdTheme, Plugin plugin )
Fichier Ligne
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 218
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 251
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 284
        	daoUtil.executeQuery(  );

            while ( daoUtil.next(  ) )
            {
                VisitorQuestion visitorQuestion = new VisitorQuestion(  );
                visitorQuestion.setIdVisitorQuestion( daoUtil.getInt( 1 ) );
                visitorQuestion.setLastname( daoUtil.getString( 2 ) );
                visitorQuestion.setFirstname( daoUtil.getString( 3 ) );
                visitorQuestion.setEmail( daoUtil.getString( 4 ) );
                visitorQuestion.setQuestion( daoUtil.getString( 5 ) );
                visitorQuestion.setAnswer( daoUtil.getString( 6 ) );
                visitorQuestion.setDate( daoUtil.getDate( 7 ) );
                visitorQuestion.setIdUser( daoUtil.getInt( 8 ) );
                visitorQuestion.setIdTheme( daoUtil.getInt( 9 ) );
                list.add( visitorQuestion );
            }

            return list;
        }
    }

    /**
     * Find all objects
     * @param nIdUser The User ID
     * @param plugin The Plugin using this data access service
     * @return A Collection of objects
     */
    public Collection<VisitorQuestion> findByUser( int nIdUser, Plugin plugin )
Fichier Ligne
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 283
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 317
        	daoUtil.setInt( 1, nIdTheme );
            daoUtil.executeQuery(  );

            while ( daoUtil.next(  ) )
            {
                VisitorQuestion visitorQuestion = new VisitorQuestion(  );
                visitorQuestion.setIdVisitorQuestion( daoUtil.getInt( 1 ) );
                visitorQuestion.setLastname( daoUtil.getString( 2 ) );
                visitorQuestion.setFirstname( daoUtil.getString( 3 ) );
                visitorQuestion.setEmail( daoUtil.getString( 4 ) );
                visitorQuestion.setQuestion( daoUtil.getString( 5 ) );
                visitorQuestion.setAnswer( daoUtil.getString( 6 ) );
                visitorQuestion.setDate( daoUtil.getDate( 7 ) );
                visitorQuestion.setIdUser( daoUtil.getInt( 8 ) );
                visitorQuestion.setIdTheme( daoUtil.getInt( 9 ) );
                list.add( visitorQuestion );
            }

            return list;
        }
    }
Fichier Ligne
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 250
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 317
        	daoUtil.setInt( 1, nIdUser );
            daoUtil.executeQuery(  );

            while ( daoUtil.next(  ) )
            {
                VisitorQuestion visitorQuestion = new VisitorQuestion(  );
                visitorQuestion.setIdVisitorQuestion( daoUtil.getInt( 1 ) );
                visitorQuestion.setLastname( daoUtil.getString( 2 ) );
                visitorQuestion.setFirstname( daoUtil.getString( 3 ) );
                visitorQuestion.setEmail( daoUtil.getString( 4 ) );
                visitorQuestion.setQuestion( daoUtil.getString( 5 ) );
                visitorQuestion.setAnswer( daoUtil.getString( 6 ) );
                visitorQuestion.setDate( daoUtil.getDate( 7 ) );
                visitorQuestion.setIdUser( daoUtil.getInt( 8 ) );
                visitorQuestion.setIdTheme( daoUtil.getInt( 9 ) );
                list.add( visitorQuestion );
            }

            return list;
        }
    }
Fichier Ligne
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 218
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 318
        	daoUtil.executeQuery(  );

            while ( daoUtil.next(  ) )
            {
                VisitorQuestion visitorQuestion = new VisitorQuestion(  );
                visitorQuestion.setIdVisitorQuestion( daoUtil.getInt( 1 ) );
                visitorQuestion.setLastname( daoUtil.getString( 2 ) );
                visitorQuestion.setFirstname( daoUtil.getString( 3 ) );
                visitorQuestion.setEmail( daoUtil.getString( 4 ) );
                visitorQuestion.setQuestion( daoUtil.getString( 5 ) );
                visitorQuestion.setAnswer( daoUtil.getString( 6 ) );
                visitorQuestion.setDate( daoUtil.getDate( 7 ) );
                visitorQuestion.setIdUser( daoUtil.getInt( 8 ) );
                visitorQuestion.setIdTheme( daoUtil.getInt( 9 ) );
                list.add( visitorQuestion );
            }

            return list;
        }
    }
Fichier Ligne
fr/paris/lutece/plugins/helpdesk/business/ThemeDAO.java 288
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 316
        	daoUtil.setString( 1, "" ); // answer == "" -> not archived question
            daoUtil.setInt( 2, nIdTheme );
            daoUtil.executeQuery(  );

            while ( daoUtil.next(  ) )
            {
                VisitorQuestion visitorQuestion = new VisitorQuestion(  );
                visitorQuestion.setIdVisitorQuestion( daoUtil.getInt( 1 ) );
                visitorQuestion.setLastname( daoUtil.getString( 2 ) );
                visitorQuestion.setFirstname( daoUtil.getString( 3 ) );
                visitorQuestion.setEmail( daoUtil.getString( 4 ) );
                visitorQuestion.setQuestion( daoUtil.getString( 5 ) );
                visitorQuestion.setAnswer( daoUtil.getString( 6 ) );
                visitorQuestion.setDate( daoUtil.getDate( 7 ) );
                visitorQuestion.setIdUser( daoUtil.getInt( 8 ) );
                visitorQuestion.setIdTheme( nIdTheme );
Fichier Ligne
fr/paris/lutece/plugins/helpdesk/business/ThemeDAO.java 289
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 283
            daoUtil.setInt( 2, nIdTheme );
            daoUtil.executeQuery(  );

            while ( daoUtil.next(  ) )
            {
                VisitorQuestion visitorQuestion = new VisitorQuestion(  );
                visitorQuestion.setIdVisitorQuestion( daoUtil.getInt( 1 ) );
                visitorQuestion.setLastname( daoUtil.getString( 2 ) );
                visitorQuestion.setFirstname( daoUtil.getString( 3 ) );
                visitorQuestion.setEmail( daoUtil.getString( 4 ) );
                visitorQuestion.setQuestion( daoUtil.getString( 5 ) );
                visitorQuestion.setAnswer( daoUtil.getString( 6 ) );
                visitorQuestion.setDate( daoUtil.getDate( 7 ) );
                visitorQuestion.setIdUser( daoUtil.getInt( 8 ) );
                visitorQuestion.setIdTheme( nIdTheme );
Fichier Ligne
fr/paris/lutece/plugins/helpdesk/business/ThemeDAO.java 289
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 250
            daoUtil.setInt( 2, nIdTheme );
            daoUtil.executeQuery(  );

            while ( daoUtil.next(  ) )
            {
                VisitorQuestion visitorQuestion = new VisitorQuestion(  );
                visitorQuestion.setIdVisitorQuestion( daoUtil.getInt( 1 ) );
                visitorQuestion.setLastname( daoUtil.getString( 2 ) );
                visitorQuestion.setFirstname( daoUtil.getString( 3 ) );
                visitorQuestion.setEmail( daoUtil.getString( 4 ) );
                visitorQuestion.setQuestion( daoUtil.getString( 5 ) );
                visitorQuestion.setAnswer( daoUtil.getString( 6 ) );
                visitorQuestion.setDate( daoUtil.getDate( 7 ) );
                visitorQuestion.setIdUser( daoUtil.getInt( 8 ) );
                visitorQuestion.setIdTheme( nIdTheme );
Fichier Ligne
fr/paris/lutece/plugins/helpdesk/business/ThemeDAO.java 290
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 218
            daoUtil.executeQuery(  );

            while ( daoUtil.next(  ) )
            {
                VisitorQuestion visitorQuestion = new VisitorQuestion(  );
                visitorQuestion.setIdVisitorQuestion( daoUtil.getInt( 1 ) );
                visitorQuestion.setLastname( daoUtil.getString( 2 ) );
                visitorQuestion.setFirstname( daoUtil.getString( 3 ) );
                visitorQuestion.setEmail( daoUtil.getString( 4 ) );
                visitorQuestion.setQuestion( daoUtil.getString( 5 ) );
                visitorQuestion.setAnswer( daoUtil.getString( 6 ) );
                visitorQuestion.setDate( daoUtil.getDate( 7 ) );
                visitorQuestion.setIdUser( daoUtil.getInt( 8 ) );
                visitorQuestion.setIdTheme( nIdTheme );
Fichier Ligne
fr/paris/lutece/plugins/helpdesk/business/QuestionAnswerDAO.java 105
fr/paris/lutece/plugins/helpdesk/business/QuestionAnswerDAO.java 213
            daoUtil.setInt( 1, questionAnswer.getIdQuestionAnswer(  ) );
            daoUtil.setString( 2, questionAnswer.getQuestion(  ) );
            daoUtil.setString( 3, questionAnswer.getAnswer(  ) );
            daoUtil.setInt( 4, questionAnswer.getIdSubject(  ) );

            if ( questionAnswer.isEnabled(  ) )
            {
                daoUtil.setInt( 5, 1 );
            }

            else
            {
                daoUtil.setInt( 5, 0 );
            }

            daoUtil.setTimestamp( 6, new Timestamp( questionAnswer.getCreationDate(  ).getTime(  ) ) );
            daoUtil.setInt( 7, questionAnswer.getIdOrder( ) );

            daoUtil.executeUpdate(  );
Fichier Ligne
fr/paris/lutece/plugins/helpdesk/business/QuestionAnswerDAO.java 245
fr/paris/lutece/plugins/helpdesk/business/QuestionAnswerDAO.java 334
        	List<QuestionAnswer> listQuestionAnswer = new ArrayList<>(  );
        	daoUtil.executeQuery(  );

            while ( daoUtil.next(  ) )
            {
                QuestionAnswer questionanswer = new QuestionAnswer(  );
                questionanswer.setIdQuestionAnswer( daoUtil.getInt( 1 ) );
                questionanswer.setQuestion( daoUtil.getString( 2 ) );
                questionanswer.setAnswer( daoUtil.getString( 3 ) );
                questionanswer.setIdSubject( daoUtil.getInt( 4 ) );
                questionanswer.setStatus( daoUtil.getInt( 5 ) );
                questionanswer.setCreationDate( daoUtil.getTimestamp( 6 ) );
                questionanswer.setIdOrder( daoUtil.getInt( 7 ) );
                listQuestionAnswer.add( questionanswer );
            }
            return listQuestionAnswer;
        }
    }

    /**
     * load the data of QuestionAnswer from the table
     *
     * @param strKeywords The keywords which are searched in question/answer
     * @param plugin The Plugin using this data access service
     * @return The collection of QuestionAnswer object
     */
    public List<QuestionAnswer> findByKeywords( String strKeywords, Plugin plugin )
Fichier Ligne
fr/paris/lutece/plugins/helpdesk/business/QuestionAnswerDAO.java 246
fr/paris/lutece/plugins/helpdesk/business/QuestionAnswerDAO.java 304
fr/paris/lutece/plugins/helpdesk/business/QuestionAnswerDAO.java 335
        	daoUtil.executeQuery(  );

            while ( daoUtil.next(  ) )
            {
                QuestionAnswer questionanswer = new QuestionAnswer(  );
                questionanswer.setIdQuestionAnswer( daoUtil.getInt( 1 ) );
                questionanswer.setQuestion( daoUtil.getString( 2 ) );
                questionanswer.setAnswer( daoUtil.getString( 3 ) );
                questionanswer.setIdSubject( daoUtil.getInt( 4 ) );
                questionanswer.setStatus( daoUtil.getInt( 5 ) );
                questionanswer.setCreationDate( daoUtil.getTimestamp( 6 ) );
                questionanswer.setIdOrder( daoUtil.getInt( 7 ) );
                listQuestionAnswer.add( questionanswer );
            }
            return listQuestionAnswer;
        }
    }

    /**
     * load the data of QuestionAnswer from the table
     *
     * @param strKeywords The keywords which are searched in question/answer
     * @param plugin The Plugin using this data access service
     * @return The collection of QuestionAnswer object
     */
    public List<QuestionAnswer> findByKeywords( String strKeywords, Plugin plugin )
Fichier Ligne
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 169
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 222
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 255
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 288
fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java 322
                visitorQuestion = new VisitorQuestion(  );
                visitorQuestion.setIdVisitorQuestion( daoUtil.getInt( 1 ) );
                visitorQuestion.setLastname( daoUtil.getString( 2 ) );
                visitorQuestion.setFirstname( daoUtil.getString( 3 ) );
                visitorQuestion.setEmail( daoUtil.getString( 4 ) );
                visitorQuestion.setQuestion( daoUtil.getString( 5 ) );
                visitorQuestion.setAnswer( daoUtil.getString( 6 ) );
                visitorQuestion.setDate( daoUtil.getDate( 7 ) );
                visitorQuestion.setIdUser( daoUtil.getInt( 8 ) );
                visitorQuestion.setIdTheme( daoUtil.getInt( 9 ) );