question: default Optional < ColumnEntity > singleResult ( ColumnQuery query ) throws NonUniqueResultException , NullPointerException { List < ColumnEntity > entities = find ( query ) ; if ( entities . isEmpty ( ) ) { return Optional . empty ( ) ; } if ( entities . size ( ) == 1 ) { return Optional . of ( entities . get ( 0 ) ) ; } throw new NonUniqueResultException ( "The query returns more than one entity, query: " + query ) ; }
target:  Returns a single entity from query