001package org.biopax.paxtools.impl.level3;
002
003import org.biopax.paxtools.model.level3.Provenance;
004import org.biopax.paxtools.model.level3.Score;
005import org.hibernate.annotations.Cache;
006import org.hibernate.annotations.CacheConcurrencyStrategy;
007import org.hibernate.annotations.Proxy;
008import org.hibernate.annotations.DynamicInsert;
009import org.hibernate.annotations.DynamicUpdate; 
010import org.hibernate.search.annotations.Boost;
011import org.hibernate.search.annotations.Field;
012import org.hibernate.search.annotations.Analyze;
013import org.hibernate.search.annotations.Indexed;
014import org.hibernate.search.annotations.Store;
015
016import javax.persistence.Entity;
017import javax.persistence.ManyToOne;
018import javax.persistence.Transient;
019
020@Entity
021@Proxy(proxyClass= Score.class)
022@Indexed
023@DynamicUpdate @DynamicInsert
024@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
025public class ScoreImpl extends XReferrableImpl implements Score
026{
027
028        private String value;
029    private Provenance scoreSource;
030
031    public ScoreImpl() {
032        }
033    
034    //
035        // BioPAXElement interface implementation
036        //
037        ////////////////////////////////////////////////////////////////////////////
038
039        @Transient
040    public Class<? extends Score> getModelInterface()
041        {
042                return Score.class;
043        }
044
045
046
047        //
048        // confidence interface implementation
049        //
050        ////////////////////////////////////////////////////////////////////////////
051
052        
053        @Field(name=FIELD_KEYWORD, store=Store.YES, analyze=Analyze.YES)
054        @Boost(1.1f)
055    public String getValue()
056        {
057                return value;
058        }
059
060        public void setValue(String value)
061        {
062                this.value = value;
063        }
064
065    @ManyToOne(targetEntity = ProvenanceImpl.class)
066    public Provenance getScoreSource()
067    {
068        return scoreSource;
069    }
070
071    public void setScoreSource(Provenance scoreSource)
072    {
073        this.scoreSource = scoreSource;
074    }
075
076}