Move query creation from entity interface to EntityQuery class. #62