123456789101112131415161718192021222324252627 |
- package com.persistence.service.ResultSet.impl;
- import java.sql.PreparedStatement;
- import java.sql.ResultSet;
- import java.sql.SQLException;
- import java.sql.Timestamp;
- import com.persistence.service.ResultSet.AbstractType;
- /**
- * sysmodel com.sysmodel.type create time 2006-5-16
- *
- * @author nbs
- */
- public class TimeStampType extends AbstractType{
- public Object get(ResultSet rs, String name) throws SQLException {
- return rs.getTimestamp(name);
- }
- public void set(PreparedStatement st, Object value, int index) throws SQLException {
- if (value == null)
- st.setTimestamp(index, null);
- else
- st.setTimestamp(index, (Timestamp) value);
- }
- }
|