Java 类ims.core.vo.PublicHolidaysVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private String[] validateUIRules() 
{
    List<String> uiErrors = new ArrayList<String>();

    if(form.lyrSpecColConfig().tabExceptionDays().dteExceptionDate().getValue() == null)
    {
        uiErrors.add("Please select a date.");  
    }

    if(form.lyrSpecColConfig().tabExceptionDays().dteExceptionDate().getValue() != null && form.getLocalContext().getvoCollPublicHoliday() != null)
    {
        for(PublicHolidaysVo publicHoliday : form.getLocalContext().getvoCollPublicHoliday())
        {
            if(publicHoliday == null)
                continue;

            if(form.getLocalContext().getvoPublicHoliday() != null && form.getLocalContext().getvoPublicHoliday().getID_PublicHolidays() != null && form.getLocalContext().getvoPublicHoliday().getID_PublicHolidays().equals(publicHoliday.getID_PublicHolidays()))
                continue;

            if(form.lyrSpecColConfig().tabExceptionDays().dteExceptionDate().getValue().equals(publicHoliday.getDate()))
            {
                uiErrors.add("Date entered is already inserted in Exception Dates list.");
                break;
            }
        }
    }

    String[] uiResults = new String[uiErrors.size()];
    uiErrors.toArray(uiResults);

    return uiResults;
}
项目:AvoinApotti    文件:SpecimenCollectionConfigImpl.java   
public PublicHolidaysVo savePublicHolidays(PublicHolidaysVo voPublicHolidays) throws StaleObjectException 
{
    //Ensure the value object has been validated
    if (!voPublicHolidays.isValidated())
        throw new DomainRuntimeException("Public Holidays has not been validated");

    DomainFactory factory = getDomainFactory();

    PublicHolidays domPublicHolidays = PublicHolidaysVoAssembler.extractPublicHolidays(factory, voPublicHolidays);
    factory.save(domPublicHolidays);

    return PublicHolidaysVoAssembler.create(domPublicHolidays);
}
项目:openMAXIMS    文件:Logic.java   
private String[] validateUIRules() 
{
    List<String> uiErrors = new ArrayList<String>();

    if(form.lyrSpecColConfig().tabExceptionDays().dteExceptionDate().getValue() == null)
    {
        uiErrors.add("Please select a date.");  
    }

    if(form.lyrSpecColConfig().tabExceptionDays().dteExceptionDate().getValue() != null && form.getLocalContext().getvoCollPublicHoliday() != null)
    {
        for(PublicHolidaysVo publicHoliday : form.getLocalContext().getvoCollPublicHoliday())
        {
            if(publicHoliday == null)
                continue;

            if(form.getLocalContext().getvoPublicHoliday() != null && form.getLocalContext().getvoPublicHoliday().getID_PublicHolidays() != null && form.getLocalContext().getvoPublicHoliday().getID_PublicHolidays().equals(publicHoliday.getID_PublicHolidays()))
                continue;

            if(form.lyrSpecColConfig().tabExceptionDays().dteExceptionDate().getValue().equals(publicHoliday.getDate()))
            {
                uiErrors.add("Date entered is already inserted in Exception Dates list.");
                break;
            }
        }
    }

    String[] uiResults = new String[uiErrors.size()];
    uiErrors.toArray(uiResults);

    return uiResults;
}
项目:openMAXIMS    文件:SpecimenCollectionConfigImpl.java   
public PublicHolidaysVo savePublicHolidays(PublicHolidaysVo voPublicHolidays) throws StaleObjectException 
{
    //Ensure the value object has been validated
    if (!voPublicHolidays.isValidated())
        throw new DomainRuntimeException("Public Holidays has not been validated");

    DomainFactory factory = getDomainFactory();

    PublicHolidays domPublicHolidays = PublicHolidaysVoAssembler.extractPublicHolidays(factory, voPublicHolidays);
    factory.save(domPublicHolidays);

    return PublicHolidaysVoAssembler.create(domPublicHolidays);
}
项目:openMAXIMS    文件:Logic.java   
private String[] validateUIRules() 
{
    List<String> uiErrors = new ArrayList<String>();

    if(form.lyrSpecColConfig().tabExceptionDays().dteExceptionDate().getValue() == null)
    {
        uiErrors.add("Please select a date.");  
    }

    if(form.lyrSpecColConfig().tabExceptionDays().dteExceptionDate().getValue() != null && form.getLocalContext().getvoCollPublicHoliday() != null)
    {
        for(PublicHolidaysVo publicHoliday : form.getLocalContext().getvoCollPublicHoliday())
        {
            if(publicHoliday == null)
                continue;

            if(form.getLocalContext().getvoPublicHoliday() != null && form.getLocalContext().getvoPublicHoliday().getID_PublicHolidays() != null && form.getLocalContext().getvoPublicHoliday().getID_PublicHolidays().equals(publicHoliday.getID_PublicHolidays()))
                continue;

            if(form.lyrSpecColConfig().tabExceptionDays().dteExceptionDate().getValue().equals(publicHoliday.getDate()))
            {
                uiErrors.add("Date entered is already inserted in Exception Dates list.");
                break;
            }
        }
    }

    String[] uiResults = new String[uiErrors.size()];
    uiErrors.toArray(uiResults);

    return uiResults;
}
项目:openMAXIMS    文件:SpecimenCollectionConfigImpl.java   
public PublicHolidaysVo savePublicHolidays(PublicHolidaysVo voPublicHolidays) throws StaleObjectException 
{
    //Ensure the value object has been validated
    if (!voPublicHolidays.isValidated())
        throw new DomainRuntimeException("Public Holidays has not been validated");

    DomainFactory factory = getDomainFactory();

    PublicHolidays domPublicHolidays = PublicHolidaysVoAssembler.extractPublicHolidays(factory, voPublicHolidays);
    factory.save(domPublicHolidays);

    return PublicHolidaysVoAssembler.create(domPublicHolidays);
}
项目:openmaxims-linux    文件:Logic.java   
private String[] validateUIRules() 
{
    List<String> uiErrors = new ArrayList<String>();

    if(form.lyrSpecColConfig().tabExceptionDays().dteExceptionDate().getValue() == null)
    {
        uiErrors.add("Please select a date.");  
    }

    if(form.lyrSpecColConfig().tabExceptionDays().dteExceptionDate().getValue() != null && form.getLocalContext().getvoCollPublicHoliday() != null)
    {
        for(PublicHolidaysVo publicHoliday : form.getLocalContext().getvoCollPublicHoliday())
        {
            if(publicHoliday == null)
                continue;

            if(form.getLocalContext().getvoPublicHoliday() != null && form.getLocalContext().getvoPublicHoliday().getID_PublicHolidays() != null && form.getLocalContext().getvoPublicHoliday().getID_PublicHolidays().equals(publicHoliday.getID_PublicHolidays()))
                continue;

            if(form.lyrSpecColConfig().tabExceptionDays().dteExceptionDate().getValue().equals(publicHoliday.getDate()))
            {
                uiErrors.add("Date entered is already inserted in Exception Dates list.");
                break;
            }
        }
    }

    String[] uiResults = new String[uiErrors.size()];
    uiErrors.toArray(uiResults);

    return uiResults;
}
项目:openmaxims-linux    文件:SpecimenCollectionConfigImpl.java   
public PublicHolidaysVo savePublicHolidays(PublicHolidaysVo voPublicHolidays) throws StaleObjectException 
{
    //Ensure the value object has been validated
    if (!voPublicHolidays.isValidated())
        throw new DomainRuntimeException("Public Holidays has not been validated");

    DomainFactory factory = getDomainFactory();

    PublicHolidays domPublicHolidays = PublicHolidaysVoAssembler.extractPublicHolidays(factory, voPublicHolidays);
    factory.save(domPublicHolidays);

    return PublicHolidaysVoAssembler.create(domPublicHolidays);
}