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/directories/web/DirectoriesApp.java 83
fr/paris/lutece/plugins/directories/web/DirectoriesApp.java 126
    public XPage viewDirectoryEntity( HttpServletRequest request )
    {
        int nId = Integer.parseInt( request.getParameter( PARAMETER_ID_ENTITY ) );
        Map<String, Object> model = getModel( );
        List<Response> listResponse = new ArrayList<>( );
        StringBuilder strBuilder = new StringBuilder( );
        DirectoryEntity directoryEntity = DirectoryEntityHome.findByPrimaryKey( nId );
        for ( DirectoryResponse directoryResponse : DirectoryResponseHome.getDirectoryResponsesListByIdEntity( nId ) )
        {
            Response response = ResponseHome.findByPrimaryKey( directoryResponse.getIdResponse( ) );
            if ( ( response.getFile( ) != null ) && ( response.getFile( ).getIdFile( ) > 0 ) )
            {
                File file = FileHome.findByPrimaryKey( response.getFile( ).getIdFile( ) );
                response.setFile( file );
            }
            listResponse.add( response );
        }
        directoryEntity.setResponses( listResponse );
        model.put( MARK_ENTITY, directoryEntity );
        List<Entry> listEntryFirstLevel = EntryService.getDirectoryEntryList( directoryEntity.getIdDirectory( ), true );

        for ( Entry entry : listEntryFirstLevel )
        {
            List<Response> listEntryResponse = listResponse.stream( ).filter( response -> response.getEntry( ).getIdEntry( ) == entry.getIdEntry( ) )
                    .collect( Collectors.toCollection( ArrayList::new ) );
            model.put( MARK_LIST_RESPONSES, listEntryResponse );
            EntryService.getHtmlEntryReadOnly( model, entry.getIdEntry( ), strBuilder, getLocale( request ), true );
Fichier Ligne
fr/paris/lutece/plugins/directories/business/DirectoryEntityDAO.java 148
fr/paris/lutece/plugins/directories/business/DirectoryEntityDAO.java 212
            daoUtil.executeQuery( );
            while ( daoUtil.next( ) )
            {
                DirectoryEntity directoryEntity = new DirectoryEntity( );
                int nIndex = 1;
                directoryEntity.setId( daoUtil.getInt( nIndex++ ) );
                directoryEntity.setIdDirectory( daoUtil.getInt( nIndex++ ) );
                directoryEntity.setIdCreator( daoUtil.getInt( nIndex++ ) );
                directoryEntity.setDateCreation( daoUtil.getTimestamp( nIndex++ ) );
                directoryEntity.setIdModificator( daoUtil.getInt( nIndex++ ) );
                directoryEntity.setUpdate( daoUtil.getTimestamp( nIndex++ ) );
                directoryEntity.setTitle( daoUtil.getString( nIndex++ ) );
                directoryEntityList.add( directoryEntity );
            }
        }
        return directoryEntityList;
    }
Fichier Ligne
fr/paris/lutece/plugins/directories/service/EntryService.java 97
fr/paris/lutece/plugins/directories/service/EntryService.java 130
    public static void getHtmlEntry( Map<String, Object> model, int nIdEntry, StringBuilder strBuilder, Locale locale, boolean bDisplayFront )
    {
        HtmlTemplate template;
        Entry entry = EntryHome.findByPrimaryKey( nIdEntry );
        List<Field> listField = new ArrayList<>( entry.getFields( ).size( ) );
        for ( Field field : entry.getFields( ) )
        {
            field = FieldHome.findByPrimaryKey( field.getIdField( ) );
            listField.add( field );
        }
        entry.setFields( listField );
        model.put( MARK_ENTRY, entry );
        model.put( MARK_LOCALE, locale );
        IEntryTypeService entryTypeService = EntryTypeServiceManager.getEntryTypeService( entry );