public int compareTo(Object object)
   {

      if (!(object instanceof Criteria))
      {
         return -1;
      }
      else
      {

         Criteria vo = (Criteria) object;

         return Integer.compare(getPrimaryKey(), vo.getPrimaryKey());
      }

   }
public int compareTo ( Object object ) { if ( ! ( object instanceof Criteria ) ) { return - 1 ; } else { Criteria vo = ( Criteria ) object ; return Integer . compare ( getPrimaryKey ( ) , vo . getPrimaryKey ( ) ) ; } }
@param object the object to compare
@see java.lang.Comparable#compareTo(java.lang.Object)
@return new Integer(getPrimaryKey())).compareTo(new Integer(vo
.getPrimaryKey())