/**
* Copyright (C) 2008-2010, Squale Project - http://www.squale.org
*
* This file is part of Squale.
*
* Squale is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or any later version.
*
* Squale is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Squale. If not, see <http://www.gnu.org/licenses/>.
*/
//Source file: D:\\cc_views\\squale_v0_0_act_M400843\\squale\\src\\squaleCommon\\src\\org\\squale\\squalecommon\\enterpriselayer\\businessobject\\result\\QualityResultBO.java
package org.squale.squalecommon.enterpriselayer.businessobject.result;
import java.io.Serializable;
import java.util.Date;
import org.squale.squalecommon.enterpriselayer.businessobject.component.AuditBO;
import org.squale.squalecommon.enterpriselayer.businessobject.component.ProjectBO;
import org.squale.squalecommon.enterpriselayer.businessobject.rule.QualityRuleBO;
/**
* Repr�sente un r�sultat "qualit�", donc poss�dant une note.
*
* @author m400842
* @version 1.0
* @hibernate.class table="QualityResult" mutable="true" discriminator-value="QualityResult"
* @hibernate.discriminator column="subclass"
*/
public abstract class QualityResultBO
implements Serializable
{
/**
* the serial version number
*/
private static final long serialVersionUID = 4020807280107556442L;
/** Constante pour indiquer que la note appartient [2,3] */
public static final String ACCEPTED = "accepted";
/** Constante pour indiquer que la note appartient [1,2[ */
public static final String RESERVED = "reserved";
/** Constante pour indiquer que la note appartient [0,1[ */
public static final String REFUSED = "refused";
/**
* Note moyenne du r�sultat qualit�
*/
protected float mMeanMark;
/**
* Identifiant (au sens technique) de l'objet
*/
protected long mId;
/**
* Projet sur lequel est calcul� le r�sultat qualit�.
*/
protected ProjectBO mProject;
/**
* Audit durant lequel a �t� g�n�r� le r�sultat
*/
protected AuditBO mAudit;
/**
* R�gle de calcul du facteur
*/
protected QualityRuleBO mRule;
/**
* The date of creation of the manual mark
*/
private Date creationDate;
/**
* The comment object of the manual mark
*/
private QualityResultCommentBO mManualMarkComment;
/**
* Getter method for the property creationDate
*
* @hibernate.property name="creationDate" column="CreationDate" type="timestamp" not-null="false" unique="false"
* update="true" insert="true"
* @return the date of creation of the mark (for manual mark)
*/
public Date getCreationDate()
{
return creationDate;
}
/**
* Setter method for the property creationDate
*
* @param mCreationDate The new date of creation
*/
public void setCreationDate( Date mCreationDate )
{
creationDate = mCreationDate;
}
/**
* Access method for the mRule property.
*
* @return the current value of the mRule property
* @hibernate.many-to-one column="QualityRuleId"
* class="org.squale.squalecommon.enterpriselayer.businessobject.rule.QualityRuleBO"
* cascade="none" not-null="true" outer-join="auto" update="true" insert="true"
* @roseuid 42BACEE300E1
*/
public QualityRuleBO getRule()
{
return mRule;
}
/**
* Sets the value of the mRule property.
*
* @param pRule the new value of the mRule property
* @roseuid 42BACEE300E2
*/
public void setRule( QualityRuleBO pRule )
{
mRule = pRule;
}
/**
* Access method for the mMeanMark property.
*
* @return the current value of the mMeanMark property
* @hibernate.property name="meanMark" column="MeanMark" type="float" not-null="true" unique="false" update="true"
* insert="true"
* @roseuid 42BACEE40006
*/
public float getMeanMark()
{
return mMeanMark;
}
/**
* Sets the value of the mMeanMark property.
*
* @param pMeanMark the new value of the mMeanMark property
* @roseuid 42BACEE40007
*/
public void setMeanMark( float pMeanMark )
{
mMeanMark = pMeanMark;
}
/**
* Access method for the mProject property.
*
* @return the current value of the mProject property
* @hibernate.many-to-one column="ProjectId"
* class="org.squale.squalecommon.enterpriselayer.businessobject.component.ProjectBO"
* cascade="none" not-null="true" outer-join="auto" update="true" insert="true"
* @roseuid 42BACEE40016
*/
public ProjectBO getProject()
{
return mProject;
}
/**
* Sets the value of the mProject property.
*
* @param pProject the new value of the mProject property
* @roseuid 42BACEE40017
*/
public void setProject( ProjectBO pProject )
{
mProject = pProject;
}
/**
* Access method for the mAudit property.
*
* @return the current value of the mAudit property
* @hibernate.many-to-one column="AuditId"
* class="org.squale.squalecommon.enterpriselayer.businessobject.component.AuditBO"
* cascade="none" not-null="false" outer-join="auto" update="true" insert="true"
* @roseuid 42BACEE40019
*/
public AuditBO getAudit()
{
return mAudit;
}
/**
* Sets the value of the mAudit property.
*
* @param pAudit the new value of the mAudit property
* @roseuid 42BACEE4001A
*/
public void setAudit( AuditBO pAudit )
{
mAudit = pAudit;
}
/**
* R�cup�re l'id de l'objet.
*
* @return l'id de l'objet Note: unsaved-value An identifier property value that indicates that an instance is newly
* instantiated (unsaved), distinguishing it from transient instances that were saved or loaded in a
* previous session. If not specified you will get an exception like this: another object associated with
* the session has the same identifier
* @hibernate.id generator-class="native" type="long" column="QualityResultId" unsaved-value="-1" length="19"
* @hibernate.generator-param name="sequence" value="qualityres_sequence"
* @roseuid 42C91BA4004B
*/
public long getId()
{
return mId;
}
/**
* Affecte l'id de l'objet.
*
* @param pId l'id � affecter
* @roseuid 42C91BA400D7
*/
public void setId( long pId )
{
mId = pId;
}
/**
* Constructeur par d�faut
*
* @roseuid 42C91E470231
*/
public QualityResultBO()
{
mId = -1;
mMeanMark = -1;
}
/**
* Constructeur complet
*
* @param pMeanMark la note moyenne
* @param pProject le projet correspondant
* @param pAudit l'audit correspondant
* @roseuid 42C91E4702AE
*/
public QualityResultBO( float pMeanMark, ProjectBO pProject, AuditBO pAudit )
{
mId = -1;
mMeanMark = pMeanMark;
mProject = pProject;
mAudit = pAudit;
}
/***
* Getter method for the comment object of the manual mark
*
* @return the comment of the manual mark
* @hibernate.one-to-one class="org.squale.squalecommon.enterpriselayer.businessobject.result.QualityResultCommentBO"
* property-ref="qualityResult" cascade="all" fetch="join" lazy="no-proxy"
*/
public QualityResultCommentBO getManualMarkComment()
{
return mManualMarkComment;
}
/***
* Setter method for the manual mark comment object
*
* @param pManualMarkComment the new value for the comment of the manual mark
*/
public void setManualMarkComment( QualityResultCommentBO pManualMarkComment )
{
this.mManualMarkComment = pManualMarkComment;
}
}