home *** CD-ROM | disk | FTP | other *** search
Java Source | 2003-05-20 | 1.4 KB | 65 lines |
- package nl.pcactive.bean;
-
- import java.sql.ResultSet;
- import java.sql.SQLException;
-
- /**
- * <p>Description: GEDCOM 2 DATABASE</p>
- * <p>Copyright: Copyright (c) 2002</p>
- * <p>Company: Pc-Active</p>
- * @author Benny Lootens
- * @version 2.0
- */
- public class FamilyBean {
-
- private String id;
- private String husband;
- private String wife;
- private IEventBean married;
-
- public void clear() {
- id = husband = wife = "0";
- married.clear();
- }
- public String getWife() {
- return wife;
- }
- public IEventBean getMarried() {
- return married;
- }
- public String getId() {
- return id != null && id.length() > 0 ? id : "0";
- }
- public String getHusband() {
- return husband;
- }
- public void setHusband(String husband) {
- this.husband = husband;
- }
- public void setId(String id) {
- this.id = id;
- }
- public void setMarried(IEventBean married) {
- this.married = married;
- }
- public void setWife(String wife) {
- this.wife = wife;
- }
-
- public FamilyBean() {
- married = new IEventBean();
- clear();
- }
-
- public void populate(ResultSet rs) throws SQLException {
- setId("" + rs.getInt("family"));
- setHusband("" + rs.getInt("husband"));
- setWife("" + rs.getInt("wife"));
-
- IEventBean marriage = new IEventBean();
- marriage.setDate(rs.getString("marrieddate"));
- marriage.setPlace(rs.getString("marriedplace"));
- setMarried(marriage);
-
- }
- }