⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bigdecimaltype.java

📁 人力资源管理系统主要包括:人员管理、招聘管理、培训管理、奖惩管理和薪金管理五大管理模块。
💻 JAVA
字号:
//$Id: BigDecimalType.java,v 1.5.2.5 2003/12/13 15:43:52 oneovthafew Exp $package net.sf.hibernate.type;import java.math.BigDecimal;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Types;import net.sf.hibernate.HibernateException;/** * <tt>big_decimal</tt>: A type that maps an SQL NUMERIC to a  * <tt>java.math.BigDecimal</tt> * @see java.math.BigDecimal * @author Gavin King */public class BigDecimalType extends ImmutableType {		/**	 * @see net.sf.hibernate.type.NullableType#get(ResultSet, String)	 */	public Object get(ResultSet rs, String name)	throws HibernateException, SQLException {		return rs.getBigDecimal(name);	}		/**	 * @see net.sf.hibernate.type.NullableType#set(PreparedStatement, Object, int)	 */	public void set(PreparedStatement st, Object value, int index)	throws HibernateException, SQLException {		st.setBigDecimal(index, (BigDecimal) value);	}		/**	 * @see net.sf.hibernate.type.NullableType#sqlType()	 */	public int sqlType() {		return Types.NUMERIC;	}		/**	 */	public String toString(Object value) throws HibernateException {		return value.toString();	}			/**	 * @see net.sf.hibernate.type.Type#getReturnedClass()	 */	public Class getReturnedClass() {		return BigDecimal.class;	}		/**	 * @see net.sf.hibernate.type.Type#equals(Object, Object)	 */	public boolean equals(Object x, Object y) throws HibernateException {		return x==y || ( x!=null && y!=null && ( (BigDecimal) x ).compareTo( (BigDecimal) y )==0 );	}		/**	 * @see net.sf.hibernate.type.Type#getName()	 */	public String getName() {		return "big_decimal";	}	public Object fromStringValue(String xml) {		return new BigDecimal(xml);	}		}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -