@ SuppressWarnings ( "unchecked" ) public ApiKey getApiKey ( final String key ) { final Query query = pm . newQuery ( ApiKey . class , "key == :key" ) ; final List < ApiKey > result = ( List < ApiKey > ) query . execute ( key ) ; return Collections . isEmpty ( result ) ? null : result . get ( 0 ) ; }
Returns an API key .