The tgOrderByItem class is dynamically created by your BusinessEntity's DynamicQuery mechanism. See tgOrderByDirection Enumeration.