public T fetchSingle ( ) throws InstantiationException , IllegalAccessException , SQLException { if ( ! finished ) { T result = primitive ? fetchSinglePrimitiveInternal ( ) : fetchSingleInternal ( ) ; next ( ) ; return result ; } else { throw new SQLException ( "Result set don't have data for single fetch." ) ; } }
Fetches single entity being sure that it exists . Throws exception if there is no entity .