package open.dolphin.infomodel;
// Generated 2010/06/30 10:57:59 by Hibernate Tools 3.2.1.GA


import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.persistence.Transient;
import open.dolphin.queries.DolphinQuery;

/**
 * KarteBean generated by hbm2java
 */
public class KarteBean extends InfoModel {

     private long id;
     private PatientModel patient;
     private Date created;

    @Transient
    private Map<String, List> entries;

    /**
     *
     */
    public KarteBean() {
    }

    @Override
    public boolean search(DolphinQuery query) {
        return false;
    }
   
    public long getId() {
        return this.id;
    }
    
    public void setId(long id) {
        this.id = id;
    }
    public PatientModel getPatient() {
        return this.patient;
    }
    
    public void setPatient(PatientModel patient) {
        this.patient = patient;
    }
    public Date getCreated() {
        return this.created;
    }
    
    public void setCreated(Date created) {
        this.created = created;
    }

    public Map<String, List> getEntries() {
        return entries;
    }

    public void setEntries(Map<String, List> entries) {
        this.entries = entries;
    }

    public List getEntryCollection(String category) {
        return entries != null ? entries.get(category) : null;
    }

    public void addEntryCollection(String category, List entrs) {

        if (entries == null) {
            entries = new HashMap<String, List>();
        }
        entries.put(category, entrs);
    }

    @Override
    public int hashCode() {
        final int PRIME = 31;
        int result = 1;
        result = PRIME * result + (int) (id ^ (id >>> 32));
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final KarteBean other = (KarteBean) obj;
        if (getId() != other.getId()) {
            return false;
        }
        return true;
    }
}


