@exception StandardException Standard error policy.
**/
public RowLocationRetRowSource openSortRowSource(long id)
throws StandardException
{
Sort sort;
// Find the sort in the sorts list, throw an error
// if it doesn't exist.
if (sorts == null || id >= sorts.size()
|| (sort = ((Sort) sorts.elementAt((int) id))) == null)
{
throw StandardException.newException(
SQLState.AM_NO_SUCH_SORT, new Long(id));
}
// Open a scan row source on it.
ScanControllerRowSource sc = sort.openSortRowSource(this);
// Keep track of it so we can release on close.
scanControllers.addElement(sc);
return sc;