7f993c70bcca0cd76bb093fb78e7ec349db72671.svn-base 656 B

123456789101112131415161718192021222324252627
  1. package com.persistence.service.ResultSet.impl;
  2. import java.sql.PreparedStatement;
  3. import java.sql.ResultSet;
  4. import java.sql.SQLException;
  5. import java.sql.Timestamp;
  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 TimeStampType extends AbstractType{
  13. public Object get(ResultSet rs, String name) throws SQLException {
  14. return rs.getTimestamp(name);
  15. }
  16. public void set(PreparedStatement st, Object value, int index) throws SQLException {
  17. if (value == null)
  18. st.setTimestamp(index, null);
  19. else
  20. st.setTimestamp(index, (Timestamp) value);
  21. }
  22. }