public static long castLong(Object count) {
		if(count == null) return -1L;
		if(count instanceof Long) {
			return (Long)count;
		} else if(count instanceof BigDecimal) {
			return ((BigDecimal)count).longValue();
		} else if(count instanceof Integer) {
			return ((Integer)count).longValue();
		} else if(count instanceof BigInteger) {
			return ((BigInteger)count).longValue();
		} else if(count instanceof Byte) {
			return ((Byte)count).longValue();
        } else if(count instanceof Short) {
            return ((Short)count).longValue();
		} else {
			return -1L;
		}
	}
public static long castLong ( Object count ) { if ( count == null ) return - 1L ; if ( count instanceof Long ) { return ( Long ) count ; } else if ( count instanceof BigDecimal ) { return ( ( BigDecimal ) count ) . longValue ( ) ; } else if ( count instanceof Integer ) { return ( ( Integer ) count ) . longValue ( ) ; } else if ( count instanceof BigInteger ) { return ( ( BigInteger ) count ) . longValue ( ) ; } else if ( count instanceof Byte ) { return ( ( Byte ) count ) . longValue ( ) ; } else if ( count instanceof Short ) { return ( ( Short ) count ) . longValue ( ) ; } else { return - 1L ; } }
查询结果总记录数的类型转换
@param count
@return