@SuppressWarnings("rawtypes")
  public static SingleColumnComparator createLongComparator(NumberName numberName, boolean ascending, String defaultString) throws Exception
  {
    final String type="long";
    if (ascending)
    {
      if (defaultString.equals(""))
      {
        return new SingleColumnComparator(numberName,ascending,type,defaultString)
        {
          public Comparable generateKey(String[] parts) throws Exception
          {
            return new Long(getLongValue(parts));
          }
        };
      }
      else
      {
        final Long defaultKey = Long.valueOf(defaultString);
        return new SingleColumnComparator(numberName,ascending,type,defaultString)
        {
          public Comparable generateKey(String[] parts) throws Exception
          {
            try
            {
              return new Long(getLongValue(parts));
            }
            catch (Exception e)
            {
              return defaultKey;
            }
          }
        };
      }
    }
    else
    {
      if (defaultString.equals(""))
      {
        return new SingleColumnComparator(numberName,ascending,type,defaultString)
        {
          public Comparable generateKey(String[] parts) throws Exception
          {
            return new Long(-getLongValue(parts));
          }
        };
      }
      else
      {
        final Long defaultKey = new Long(-Long.parseLong(defaultString));
        return new SingleColumnComparator(numberName,ascending,type,defaultString)
        {
          public Comparable generateKey(String[] parts) throws Exception
          {
            try
            {
              return new Long(-getLongValue(parts));
            }
            catch (Exception e)
            {
              return defaultKey;
            }
          }
        };
      }
    }
  }