protected void onValidateSingleResult ( List results ) { if ( results == null || results . isEmpty ( ) ) { log . error ( "No result found for {} " , kunderaQuery . getJPAQuery ( ) ) ; throw new NoResultException ( "No result found!" ) ; } if ( results . size ( ) > 1 ) { log . error ( "Non unique results found for query {} " , kunderaQuery . getJPAQuery ( ) ) ; throw new NonUniqueResultException ( "Containing more than one result!" ) ; } }
On validate single result .