Code example for ResultSet

Methods: getDate, getLong

0
 
    protected AbstractEntity() { 
    } 
 
    protected AbstractEntity(ResultSet rs) throws SQLException {
        setId(rs.getLong("ID"));
        setCreated(rs.getDate("CREATED"));
        setModified(rs.getDate("MODIFIED"));
    } 
 
    public Date getCreated() {
        return created;
    } 
 
    public void setCreated(Date created) {
        this.created = created;
    } 
 
    public long getId() { 
        return id;
    }