CPD Results
The following document contains the results of PMD's CPD 6.13.0.
Duplications
| File |
Line |
| fr/paris/lutece/plugins/identityimport/business/CandidateIdentityDAO.java |
116 |
| fr/paris/lutece/plugins/identityimport/business/CandidateIdentityHistoryDAO.java |
128 |
return Optional.ofNullable( candidateIdentity );
}
}
/**
* {@inheritDoc }
*/
@Override
public void delete( int nKey, Plugin plugin )
{
try ( final DAOUtil daoUtil = new DAOUtil( SQL_QUERY_DELETE, plugin ) )
{
daoUtil.setInt( 1, nKey );
daoUtil.executeUpdate( );
}
}
/**
* {@inheritDoc }
*/
@Override
public void deleteList( final List<Integer> idList, Plugin plugin )
{
if ( CollectionUtils.isNotEmpty( idList ) )
{
final String query = SQL_QUERY_DELETE_LISTS.replace( ID_LIST, idList.stream( ).map( String::valueOf ).collect( Collectors.joining( "," ) ) );
try ( final DAOUtil daoUtil = new DAOUtil( query, plugin ) )
{
daoUtil.executeUpdate( );
}
}
}
/**
* {@inheritDoc }
*/
@Override
public void store( CandidateIdentity candidateIdentity, Plugin plugin ) |
| File |
Line |
| fr/paris/lutece/plugins/identityimport/web/BatchJspBean.java |
304 |
| fr/paris/lutece/plugins/identityimport/web/BatchJspBean.java |
380 |
final Optional<String> idIdentityOpt = Optional.ofNullable( request.getParameter( PARAMETER_ID_CANDIDATEIDENTITY ) );
idIdentityOpt.ifPresent( idIdentity -> {
_currentIdentityId = Integer.parseInt( idIdentity );
final Optional<CandidateIdentity> optCandidateIdentity = CandidateIdentityHome.findByPrimaryKey( _currentIdentityId );
_candidateidentity = optCandidateIdentity.orElseThrow( ( ) -> new AppException( ERROR_RESOURCE_NOT_FOUND ) );
_candidateidentity.setAttributes( CandidateIdentityAttributeHome.getCandidateIdentityAttributesList( _currentIdentityId ) );
_wfCandidateIdentityBean = _wfIdentitiesBeanService.createWorkflowBean( _candidateidentity, _candidateidentity.getId( ),
_candidateidentity.getIdBatch( ), getUser( ) );
_wfIdentitiesBeanService.addHistory( _wfCandidateIdentityBean, request, getLocale( ) );
} ); |