Fork me on GitHub

CPD Results

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

Duplications

File Line
fr/paris/lutece/plugins/genericalert/business/TaskNotifyReminderConfigDAO.java 283
fr/paris/lutece/plugins/genericalert/business/TaskNotifyReminderConfigDAO.java 485
        while ( daoUtil.next( ) )
        {
            reminderAppointment = new ReminderAppointment( );

            int nIndex = 1;

            reminderAppointment.setIdTask( daoUtil.getInt( nIndex++ ) );
            reminderAppointment.setIdForm( daoUtil.getInt( nIndex++ ) );
            reminderAppointment.setRank( daoUtil.getInt( nIndex++ ) );
            reminderAppointment.setTimeToAlert( daoUtil.getInt( nIndex++ ) );
            reminderAppointment.setEmailNotify( daoUtil.getBoolean( nIndex++ ) );
            reminderAppointment.setSmsNotify( daoUtil.getBoolean( nIndex++ ) );
            reminderAppointment.setEmailAlertMessage( daoUtil.getString( nIndex++ ) );
            reminderAppointment.setSmsAlertMessage( daoUtil.getString( nIndex++ ) );
            reminderAppointment.setAlertSubject( daoUtil.getString( nIndex++ ) );
            reminderAppointment.setEmailCc( daoUtil.getString( nIndex++ ) );
            reminderAppointment.setNumberPhone( daoUtil.getString( nIndex++ ) );
            reminderAppointment.setIdStateAfter( daoUtil.getInt( nIndex ) );
File Line
fr/paris/lutece/plugins/genericalert/business/TaskNotifyReminderConfigDAO.java 101
fr/paris/lutece/plugins/genericalert/business/TaskNotifyReminderConfigDAO.java 134
        daoUtil.setInt( 1, nKey );
        daoUtil.executeQuery( );

        TaskNotifyReminderConfig taskReminderConfig = null;

        if ( daoUtil.next( ) )
        {
            taskReminderConfig = new TaskNotifyReminderConfig( );
            taskReminderConfig.setIdTask( daoUtil.getInt( 1 ) );
            taskReminderConfig.setIdForm( daoUtil.getInt( 2 ) );
            taskReminderConfig.setNbAlerts( daoUtil.getInt( 3 ) );
        }
        daoUtil.free( );
        if ( taskReminderConfig != null )
        {
            List<ReminderAppointment> listReminder = loadListReminderAppointment( taskReminderConfig.getIdTask( ), taskReminderConfig.getIdForm( ),
                    NotifyReminderPlugin.getPlugin( ) );

            if ( listReminder != null )
            {
                taskReminderConfig.setListReminderAppointment( listReminder );
            }
        }
        return taskReminderConfig;
    }

    /**
     * {@inheritDoc }
     */
    @Override
    public TaskNotifyReminderConfig loadConfigByIdForm( int idForm, Plugin plugin )
File Line
fr/paris/lutece/plugins/genericalert/business/TaskNotifyReminderConfigDAO.java 390
fr/paris/lutece/plugins/genericalert/business/TaskNotifyReminderConfigDAO.java 443
        daoUtil.setInt( nIndex++, reminderAppointment.getTimeToAlert( ) );
        daoUtil.setBoolean( nIndex++, reminderAppointment.isEmailNotify( ) );
        daoUtil.setBoolean( nIndex++, reminderAppointment.isSmsNotify( ) );
        daoUtil.setString( nIndex++, reminderAppointment.getEmailAlertMessage( ) );
        daoUtil.setString( nIndex++, reminderAppointment.getSmsAlertMessage( ) );
        daoUtil.setString( nIndex++, reminderAppointment.getAlertSubject( ) );
        daoUtil.setString( nIndex++, reminderAppointment.getEmailCc( ) );
        daoUtil.setString( nIndex++, reminderAppointment.getNumberPhone( ) );
        daoUtil.setInt( nIndex, reminderAppointment.getIdStateAfter( ) );