To get record type id in Apex, ask the object describe for the record type by its developer name and call getRecordTypeId(). It returns an Id and uses no SOQL query:
Schema.SObjectType.<Object>.getRecordTypeInfosByDeveloperName()
.get('<DeveloperName>').getRecordTypeId();
In our Developer Edition org that call returned 012fj000008iBftAAE for the Partner Account record type on Account. Below is every lookup we ran (developer name, label, SOQL, Setup), the RecordTypeInfo methods, the null pointer trap and a tested helper class.