public int compareTo( Object obj ) {
		if( obj == null ) {
			return( 1 );
		}
		else if( obj instanceof GenKbPhoneByUPhoneNumberIdxKey ) {
			GenKbPhoneByUPhoneNumberIdxKey rhs = (GenKbPhoneByUPhoneNumberIdxKey)obj;
			if( getRequiredContactId() < rhs.getRequiredContactId() ) {
				return( -1 );
			}
			else if( getRequiredContactId() > rhs.getRequiredContactId() ) {
				return( 1 );
			}
			{
				int cmp = getRequiredPhoneNumber().compareTo( rhs.getRequiredPhoneNumber() );
				if( cmp != 0 ) {
					return( cmp );
				}
			}
			return( 0 );
		}
		else if( obj instanceof GenKbPhoneBuff ) {
			GenKbPhoneBuff rhs = (GenKbPhoneBuff)obj;
			if( getRequiredContactId() < rhs.getRequiredContactId() ) {
				return( -1 );
			}
			else if( getRequiredContactId() > rhs.getRequiredContactId() ) {
				return( 1 );
			}
			{
				int cmp = getRequiredPhoneNumber().compareTo( rhs.getRequiredPhoneNumber() );
				if( cmp != 0 ) {
					return( cmp );
				}
			}
			return( 0 );
		}
		else {
			throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException( getClass(),
				"compareTo",
				"obj",
				obj,
				null );
		}
	}