480c8918a274862804bac9043d490e46263f3582.svn-base 663 B

123456789101112131415161718192021222324252627
  1. package com.persistence.service.ResultSet.impl;
  2. import java.math.BigDecimal;
  3. import java.sql.PreparedStatement;
  4. import java.sql.ResultSet;
  5. import java.sql.SQLException;
  6. import com.persistence.service.ResultSet.AbstractType;
  7. /**
  8. * sysmodel com.sysmodel.type create time 2006-5-16
  9. *
  10. * @author nbs
  11. */
  12. public class BigDecimalType extends AbstractType{
  13. public Object get(ResultSet rs, String name) throws SQLException {
  14. return rs.getBigDecimal(name);
  15. }
  16. public void set(PreparedStatement st, Object value, int index) throws SQLException {
  17. if (value == null)
  18. st.setBigDecimal(index, null);
  19. else
  20. st.setBigDecimal(index, (BigDecimal) value);
  21. }
  22. }