You can do even better
1. Create a new context profile and set the State to call it.
-> a.ordering can be handled in the query profile
-> Instead of addWhere, you can also use a new state var (give a namespace) and use it to send the value of 'type'
You can immagine, that if this state var is not null, the filter apply.
addWhere() is specific to Cook Self Service.
Sometimes, it is really nice to code inside the view, when the custom is only a specific query.
In the same hand, I have doubts the way of coding of Joomla to put the SQL query in the field types, combos and lists for example. (models/fields/xxxx.php)
Cook separate the jobs and if the model add a 'publish' or 'access' functionality, for example, there is no need to remember where the table has been asked to add the changes.
Cook always call the lists, and items throuhg the Model, wich makes much more sense.
...And the acl params are always availables, as well as every feature you put in populateParams, or populateObjects(), empty for the moment.
populateObjects(), can be used to fill FK N:1 or N:N links, in order to handle arrays or any other useful object.