001package org.biopax.paxtools.impl.level3;
002
003import org.biopax.paxtools.model.level3.GeneticInteraction;
004import org.biopax.paxtools.model.level3.PhenotypeVocabulary;
005import org.biopax.paxtools.model.level3.Score;
006import org.hibernate.annotations.Cache;
007import org.hibernate.annotations.CacheConcurrencyStrategy;
008import org.hibernate.annotations.Proxy;
009import org.hibernate.annotations.DynamicInsert;
010import org.hibernate.annotations.DynamicUpdate; 
011import org.hibernate.search.annotations.Indexed;
012
013import javax.persistence.Entity;
014import javax.persistence.ManyToOne;
015import javax.persistence.Transient;
016
017/**
018 */
019@Entity
020@Proxy(proxyClass= GeneticInteraction.class)
021@Indexed
022@DynamicUpdate @DynamicInsert
023@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
024public class GeneticInteractionImpl extends InteractionImpl
025        implements GeneticInteraction
026{
027        private PhenotypeVocabulary phenotype;
028
029    private Score interactionScore;
030        
031        public GeneticInteractionImpl() {
032        }
033        
034        @Transient
035        public Class<? extends GeneticInteraction> getModelInterface()
036        {
037                return GeneticInteraction.class;
038        }
039
040    @ManyToOne(targetEntity = PhenotypeVocabularyImpl.class)
041        public PhenotypeVocabulary getPhenotype()
042    {
043        return phenotype;
044    }
045
046    public void setPhenotype(PhenotypeVocabulary phenotype)
047    {
048        this.phenotype = phenotype;
049    }
050
051    @ManyToOne(targetEntity = ScoreImpl.class)//, cascade={CascadeType.ALL})
052    public Score getInteractionScore()
053    {
054        return interactionScore;
055    }
056
057    public void setInteractionScore(Score interactionScore)
058    {
059        this.interactionScore = interactionScore;
060    }
061}