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/geocodes/business/CityDAO.java |
281 |
fr/paris/lutece/plugins/geocodes/business/CountryDAO.java |
268 |
List<City> cityList = new ArrayList<>( );
StringBuilder builder = new StringBuilder( );
if ( !listIds.isEmpty( ) )
{
for( int i = 0 ; i < listIds.size(); i++ ) {
builder.append( "?," );
}
String placeHolders = builder.deleteCharAt( builder.length( ) -1 ).toString( );
String stmt = SQL_QUERY_SELECTALL_BY_IDS + placeHolders + ")";
try ( DAOUtil daoUtil = new DAOUtil( stmt, plugin ) )
{
int index = 1;
for( Integer n : listIds ) {
daoUtil.setInt( index++, n );
}
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{ |
Fichier |
Ligne |
fr/paris/lutece/plugins/geocodes/business/CityDAO.java |
94 |
fr/paris/lutece/plugins/geocodes/business/CityDAO.java |
122 |
daoUtil.setInt( 1 , nKey );
daoUtil.executeQuery( );
City city = null;
if ( daoUtil.next( ) )
{
city = new City();
int nIndex = 1;
city.setId( daoUtil.getInt( nIndex++ ) );
city.setCodeCountry( daoUtil.getString( nIndex++ ) );
city.setCode( daoUtil.getString( nIndex++ ) );
city.setValue( daoUtil.getString( nIndex++ ) );
city.setCodeZone( daoUtil.getString( nIndex ) );
}
return Optional.ofNullable( city );
}
}
/**
* {@inheritDoc }
*/
@Override
public Optional<City> loadByCode( String strCode, Plugin plugin ) |
Fichier |
Ligne |
fr/paris/lutece/plugins/geocodes/business/CityDAO.java |
184 |
fr/paris/lutece/plugins/geocodes/business/CityDAO.java |
215 |
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
City city = new City( );
int nIndex = 1;
city.setId( daoUtil.getInt( nIndex++ ) );
city.setCodeCountry( daoUtil.getString( nIndex++ ) );
city.setCode( daoUtil.getString( nIndex++ ) );
city.setValue( daoUtil.getString( nIndex++ ) );
city.setCodeZone( daoUtil.getString( nIndex ) );
cityList.add( city );
}
return cityList;
}
}
/**
* {@inheritDoc }
*/
@Override
public List<City> selectCitiesListByValue( String strVal, Plugin plugin ) |