if (browseType == ITEMS_BY_AUTHOR_BROWSE) { afterSubqueryOperator = "="; }  if (browseType == ITEMS_BY_SUBJECT_BROWSE)
if (browseType == ITEMS_BY_AUTHOR_BROWSE || browseType == ITEMS_BY_SUBJECT_BROWSE)
    private static String formatSql(BrowseScope scope, String sql,            String subqueryValue, boolean after)    {        boolean before = !after;        int browseType = scope.getBrowseType();        boolean ascending = scope.getAscending();        int numberDesired = before ? scope.getNumberBefore() : scope.getTotal();        // Search operator        // Normal case: before is less than, after is greater than or equal        String beforeOperator = "<";        String afterOperator = ">=";        // For authors, only equality is relevant        if (browseType == ITEMS_BY_AUTHOR_BROWSE)        {            afterOperator = "=";        }	//aneesh	if (browseType == ITEMS_BY_SUBJECT_BROWSE)        {            afterOperator = "=";        }        // Subqueries add a clause which checks for the item specifically,        // so we do not check for equality here        if (subqueryValue != null)        {            beforeOperator = "<";            afterOperator = ">";        }        if (!ascending)        {            beforeOperator = ">";            afterOperator = "<=";        }        if (browseType == ITEMS_BY_DATE_BROWSE)        {            if (!ascending)            {                beforeOperator = ">";                afterOperator = "<";            }            else            {                beforeOperator = "<";                afterOperator = ">";            }        }        String beforeSubqueryOperator = "<";        String afterSubqueryOperator = ">=";        // For authors, only equality is relevant        if (browseType == ITEMS_BY_AUTHOR_BROWSE)        {            afterSubqueryOperator = "=";        }	//aneesh        if (browseType == ITEMS_BY_SUBJECT_BROWSE)        {            afterSubqueryOperator = "=";        }        if (!ascending)        {            beforeSubqueryOperator = ">";            afterSubqueryOperator = "<=";        }        String order = before ? " desc" : "";        if (!ascending)        {            order = before ? "" : " desc";        }        // Note that it's OK to have unused arguments in the array;        // see the javadoc of java.text.MessageFormat        // for the whole story.        List args = new ArrayList();        args.add(before ? beforeSubqueryOperator : afterSubqueryOperator);        args.add(before ? beforeOperator : afterOperator);        args.add(order);        args.add(new Integer(numberDesired));        return MessageFormat.format(sql, args.toArray());    }