added 2 methods to sql generator for sort criterias