package performa.orm;

import oneit.utils.CollectionUtils;


public class CultureCriteriaAnswer extends BaseCultureCriteriaAnswer
{
    private static final long serialVersionUID = 0L;
    
    // This constructor should not be called
    public CultureCriteriaAnswer ()
    {
        // Do not add any code to this, always put it in initialiseNewObject
    }
    
    
    //to get relevant culture criteria by job
    public CultureCriteria getCriteriaJob(Job job)
    {
        CultureCriteria criteria    =   null;
        
        if(job != null)
        {
            for(CultureCriteria cc: job.getApplicableCultureSet())
            {
                if(CollectionUtils.equals(cc.getCultureElement(), getCultureElement()))
                {
                    criteria =   cc;
                    break;
                }
            }
        }
        
        return criteria;
    }
}