package org.taktik.freehealth.middleware.drugs;
// Generated Feb 27, 2008 11:38:04 AM by Hibernate Tools 3.2.0.CR1


import org.taktik.freehealth.middleware.drugs.dto.MppId;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Mpp generated by hbm2java
 */
public class Mpp  implements java.io.Serializable,Comparable<Mpp> {

	private static final long serialVersionUID = 1L;
     private MppId id;
     private Mp mp;
     private Doc doc;
     private Gal gal;
     private String rrsstate;
     private String ouc;
     private String name;
     private String inncluster;
     private Integer ranking;
     private String specifier;
     private Float contentquantity;
     private String contentunits;
     private Float contentfluidquantity;
     private String contentfluidunits;
     private Float contentquantitytoadd;
     private String contentunitstoadd;
     private Float contentfluidquantitytoadd;
     private String contentfluidunitstoadd;
     private String cmucomb;
     private String law;
     private String ssec;
     private Integer pubprice;
     private Integer pricepatstd;
     private Integer pricepatomnio;
     private Integer index;
     private String blacktriangle;
     private String use;
     private String note;
     private String pos;
     private String type;
     private List<Composition> compositions = new ArrayList<Composition>(0);
     private Map<String,Mppprop> mppprops = new HashMap<String,Mppprop>(0);

    public Mpp() {
    }

    public MppId getId() {
        return this.id;
    }
    
    public void setId(MppId id) {
        this.id = id;
    }
    public Mp getMp() {
        return this.mp;
    }
    
    public void setMp(Mp mp) {
        this.mp = mp;
    }
    public Doc getDoc() {
        return this.doc;
    }
    
    public void setDoc(Doc doc) {
        this.doc = doc;
    }
    public Gal getGal() {
        return this.gal;
    }
    
    public void setGal(Gal gal) {
        this.gal = gal;
    }

    public String getRrsstate() {
        return this.rrsstate;
    }
    
    public void setRrsstate(String rrsstate) {
        this.rrsstate = rrsstate;
    }
    public String getOuc() {
        return this.ouc;
    }
    
    public void setOuc(String ouc) {
        this.ouc = ouc;
    }
    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }

    public String getInncluster() {
        return inncluster;
    }

    public void setInncluster(String inncluster) {
        this.inncluster = inncluster;
    }

    public Integer getRanking() {
        return this.ranking;
    }
    
    public void setRanking(Integer ranking) {
        this.ranking = ranking;
    }
    public String getSpecifier() {
        return this.specifier;
    }
    
    public void setSpecifier(String specifier) {
        this.specifier = specifier;
    }
    public Float getContentquantity() {
        return this.contentquantity;
    }
    
    public void setContentquantity(Float contentquantity) {
        this.contentquantity = contentquantity;
    }
    public String getContentunits() {
        return this.contentunits;
    }
    
    public void setContentunits(String contentunits) {
        this.contentunits = contentunits;
    }
    public Float getContentfluidquantity() {
        return this.contentfluidquantity;
    }
    
    public void setContentfluidquantity(Float contentfluidquantity) {
        this.contentfluidquantity = contentfluidquantity;
    }
    public String getContentfluidunits() {
        return this.contentfluidunits;
    }
    
    public void setContentfluidunits(String contentfluidunits) {
        this.contentfluidunits = contentfluidunits;
    }
    public Float getContentquantitytoadd() {
        return this.contentquantitytoadd;
    }
    
    public void setContentquantitytoadd(Float contentquantitytoadd) {
        this.contentquantitytoadd = contentquantitytoadd;
    }
    public String getContentunitstoadd() {
        return this.contentunitstoadd;
    }
    
    public void setContentunitstoadd(String contentunitstoadd) {
        this.contentunitstoadd = contentunitstoadd;
    }
    public Float getContentfluidquantitytoadd() {
        return this.contentfluidquantitytoadd;
    }
    
    public void setContentfluidquantitytoadd(Float contentfluidquantitytoadd) {
        this.contentfluidquantitytoadd = contentfluidquantitytoadd;
    }
    public String getContentfluidunitstoadd() {
        return this.contentfluidunitstoadd;
    }
    
    public void setContentfluidunitstoadd(String contentfluidunitstoadd) {
        this.contentfluidunitstoadd = contentfluidunitstoadd;
    }
    public String getCmucomb() {
        return this.cmucomb;
    }
    
    public void setCmucomb(String cmucomb) {
        this.cmucomb = cmucomb;
    }
    public String getLaw() {
        return this.law;
    }
    
    public void setLaw(String law) {
        this.law = law;
    }
    public String getSsec() {
        return this.ssec;
    }
    
    public void setSsec(String ssec) {
        this.ssec = ssec;
    }
    public Integer getPubprice() {
        return this.pubprice;
    }
    
    public void setPubprice(Integer pubprice) {
        this.pubprice = pubprice;
    }

    public Integer getPricepatstd() {
        return pricepatstd;
    }

    public void setPricepatstd(Integer pricepatstd) {
        this.pricepatstd = pricepatstd;
    }

    public Integer getPricepatomnio() {
        return pricepatomnio;
    }

    public void setPricepatomnio(Integer pricepatomnio) {
        this.pricepatomnio = pricepatomnio;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public String getBlacktriangle() {
        return blacktriangle;
    }

    public void setBlacktriangle(String blacktriangle) {
        this.blacktriangle = blacktriangle;
    }

    public String getUse() {
        return this.use;
    }
    
    public void setUse(String use) {
        this.use = use;
    }
    public String getNote() {
        return this.note;
    }
    
    public void setNote(String note) {
        this.note = note;
    }
    public String getPos() {
        return this.pos;
    }
    
    public void setPos(String pos) {
        this.pos = pos;
    }
    public String getType() {
        return this.type;
    }
    
    public void setType(String type) {
        this.type = type;
    }
    public List<Composition> getCompositions() {
        return this.compositions;
    }
    
    public void setCompositions(List<Composition> compositions) {
        this.compositions = compositions;
    }
    public Map<String,Mppprop> getMppprops() {
        return this.mppprops;
    }
    
    public void setMppprops(Map<String,Mppprop> mppprops) {
        this.mppprops = mppprops;
    }

	public int compareTo(Mpp o) {
		if (this.getGal() == null) {
			if (o.getGal() == null) {
			} else {
				return -1;
			}
		} else {
			if (o.getIndex() == null) {
				return 1;
			} else {
				int c =  this.getGal().getName().compareTo(o.getGal().getName());
				if (c != 0) {
					return c;
				}
			}
		}

		if (this.getIndex() == null) {
			if (o.getIndex() == null) {
				return this.getName().compareTo(o.getName());
			} else {
				return -1;
			}
		} else {
			if (o.getIndex() == null) {
				return 1;
			} else {
				return this.getIndex().compareTo(o.getIndex());
			}
		}
	}

}


