private FormInstance fetchFormInstance(ResultSet rs) throws SQLException {
    FormInstance formInstance = new FormInstance();

    formInstance.setId(rs.getInt("id"));
    formInstance.setFormId(rs.getInt("formId"));
    formInstance.setState(rs.getInt("state"));
    formInstance.setCreatorId(rs.getString("creatorId"));
    formInstance.setCreationDate(rs.getTimestamp("creationDate"));
    formInstance.setValidatorId(rs.getString("validatorId"));
    formInstance.setValidationDate(rs.getTimestamp("validationDate"));
    formInstance.setComments(rs.getString("comments"));
    formInstance.setInstanceId(rs.getString("instanceId"));

    return formInstance;
  }