Java 类ims.core.vo.domain.QuestionInformationVoAssembler 实例源码

项目:AvoinApotti    文件:QuestionSelectNewImpl.java   
/**
* Question Add/Update
*/
public ims.core.vo.QuestionInformationVo saveQuestion(ims.core.vo.QuestionInformationVo questionInfo) throws ims.domain.exceptions.StaleObjectException, UniqueKeyViolationException
{
    if(questionInfo == null)
        throw new RuntimeException("Cannot save null value for QuestionInformationVo");
    if(!questionInfo.isValidated())
        throw new CodingRuntimeException("QuestionInformationVo has not been validated");

    DomainFactory factory = getDomainFactory();
    QuestionInformation doQuestionInfo = QuestionInformationVoAssembler.extractQuestionInformation(factory, questionInfo);
    try 
    {
        factory.save(doQuestionInfo);
    } 
    catch(UnqViolationUncheckedException e)
    {
        String dupMessage = Keywords.checkDuplicateTaxonomy(factory, doQuestionInfo, "taxonomyMap", questionInfo.getTaxonomyMap(), "getText");
        if(dupMessage != null)
            throw new UniqueKeyViolationException(dupMessage);

        throw new UniqueKeyViolationException(e);
    }

    return QuestionInformationVoAssembler.create(doQuestionInfo);

}
项目:openMAXIMS    文件:QuestionSelectNewImpl.java   
/**
* Question Add/Update
*/
public ims.core.vo.QuestionInformationVo saveQuestion(ims.core.vo.QuestionInformationVo questionInfo) throws ims.domain.exceptions.StaleObjectException, UniqueKeyViolationException
{
    if(questionInfo == null)
        throw new RuntimeException("Cannot save null value for QuestionInformationVo");
    if(!questionInfo.isValidated())
        throw new CodingRuntimeException("QuestionInformationVo has not been validated");

    DomainFactory factory = getDomainFactory();
    QuestionInformation doQuestionInfo = QuestionInformationVoAssembler.extractQuestionInformation(factory, questionInfo);
    try 
    {
        factory.save(doQuestionInfo);
    } 
    catch(UnqViolationUncheckedException e)
    {
        String dupMessage = Keywords.checkDuplicateTaxonomy(factory, doQuestionInfo, "taxonomyMap", questionInfo.getTaxonomyMap(), "getText");
        if(dupMessage != null)
            throw new UniqueKeyViolationException(dupMessage);

        throw new UniqueKeyViolationException(e);
    }

    return QuestionInformationVoAssembler.create(doQuestionInfo);

}
项目:openMAXIMS    文件:QuestionSelectNewImpl.java   
/**
* Question Add/Update
*/
public ims.core.vo.QuestionInformationVo saveQuestion(ims.core.vo.QuestionInformationVo questionInfo) throws ims.domain.exceptions.StaleObjectException, UniqueKeyViolationException
{
    if(questionInfo == null)
        throw new RuntimeException("Cannot save null value for QuestionInformationVo");
    if(!questionInfo.isValidated())
        throw new CodingRuntimeException("QuestionInformationVo has not been validated");

    DomainFactory factory = getDomainFactory();
    QuestionInformation doQuestionInfo = QuestionInformationVoAssembler.extractQuestionInformation(factory, questionInfo);
    try 
    {
        factory.save(doQuestionInfo);
    } 
    catch(UnqViolationUncheckedException e)
    {
        String dupMessage = Keywords.checkDuplicateTaxonomy(factory, doQuestionInfo, "taxonomyMap", questionInfo.getTaxonomyMap(), "getText");
        if(dupMessage != null)
            throw new UniqueKeyViolationException(dupMessage);

        throw new UniqueKeyViolationException(e);
    }

    return QuestionInformationVoAssembler.create(doQuestionInfo);

}
项目:openmaxims-linux    文件:QuestionSelectNewImpl.java   
/**
* Question Add/Update
*/
public ims.core.vo.QuestionInformationVo saveQuestion(ims.core.vo.QuestionInformationVo questionInfo) throws ims.domain.exceptions.StaleObjectException, UniqueKeyViolationException
{
    if(questionInfo == null)
        throw new RuntimeException("Cannot save null value for QuestionInformationVo");
    if(!questionInfo.isValidated())
        throw new CodingRuntimeException("QuestionInformationVo has not been validated");

    DomainFactory factory = getDomainFactory();
    QuestionInformation doQuestionInfo = QuestionInformationVoAssembler.extractQuestionInformation(factory, questionInfo);
    try 
    {
        factory.save(doQuestionInfo);
    } 
    catch(UnqViolationUncheckedException e)
    {
        String dupMessage = Keywords.checkDuplicateTaxonomy(factory, doQuestionInfo, "taxonomyMap", questionInfo.getTaxonomyMap(), "getText");
        if(dupMessage != null)
            throw new UniqueKeyViolationException(dupMessage);

        throw new UniqueKeyViolationException(e);
    }

    return QuestionInformationVoAssembler.create(doQuestionInfo);

}
项目:AvoinApotti    文件:QuestionSelectNewImpl.java   
public ims.core.vo.QuestionInformationVo getQuestion(Integer idQuestion)
{
    if(idQuestion == null)
        throw new RuntimeException("Cannot get QuestionInformationVo for null id");
    DomainFactory factory = getDomainFactory();
    return QuestionInformationVoAssembler.create((QuestionInformation) factory.getDomainObject(QuestionInformation.class, idQuestion));
}
项目:AvoinApotti    文件:QuestionAnswerImpl.java   
public ims.core.vo.QuestionInformationVo saveQuestion(ims.core.vo.QuestionInformationVo questionInfo) throws StaleObjectException
{
    if(!questionInfo.isValidated())
        throw new DomainRuntimeException("QuestionInformationVo not validated");

    DomainFactory factory = getDomainFactory();
    QuestionInformation doQuestionInfo = QuestionInformationVoAssembler.extractQuestionInformation(factory, questionInfo);
    factory.save(doQuestionInfo);

    return QuestionInformationVoAssembler.create(doQuestionInfo);
}
项目:AvoinApotti    文件:GraphicAssessmentNewImpl.java   
public QuestionInformationVo getQuestion(Integer questionId)
{
    if(questionId == null)
        throw new RuntimeException("Cannot get QuestionInformatioVo for null id");

    DomainFactory factory = getDomainFactory();
    QuestionInformation doQuestionInformation = (QuestionInformation)factory.getDomainObject(QuestionInformation.class, questionId);
    return QuestionInformationVoAssembler.create(doQuestionInformation);
}
项目:openMAXIMS    文件:QuestionSelectNewImpl.java   
public ims.core.vo.QuestionInformationVo getQuestion(Integer idQuestion)
{
    if(idQuestion == null)
        throw new RuntimeException("Cannot get QuestionInformationVo for null id");
    DomainFactory factory = getDomainFactory();
    return QuestionInformationVoAssembler.create((QuestionInformation) factory.getDomainObject(QuestionInformation.class, idQuestion));
}
项目:openMAXIMS    文件:QuestionAnswerImpl.java   
public ims.core.vo.QuestionInformationVo saveQuestion(ims.core.vo.QuestionInformationVo questionInfo) throws StaleObjectException
{
    if(!questionInfo.isValidated())
        throw new DomainRuntimeException("QuestionInformationVo not validated");

    DomainFactory factory = getDomainFactory();
    QuestionInformation doQuestionInfo = QuestionInformationVoAssembler.extractQuestionInformation(factory, questionInfo);
    factory.save(doQuestionInfo);

    return QuestionInformationVoAssembler.create(doQuestionInfo);
}
项目:openMAXIMS    文件:GraphicAssessmentNewImpl.java   
public QuestionInformationVo getQuestion(Integer questionId)
{
    if(questionId == null)
        throw new RuntimeException("Cannot get QuestionInformatioVo for null id");

    DomainFactory factory = getDomainFactory();
    QuestionInformation doQuestionInformation = (QuestionInformation)factory.getDomainObject(QuestionInformation.class, questionId);
    return QuestionInformationVoAssembler.create(doQuestionInformation);
}
项目:openMAXIMS    文件:QuestionSelectNewImpl.java   
public ims.core.vo.QuestionInformationVo getQuestion(Integer idQuestion)
{
    if(idQuestion == null)
        throw new RuntimeException("Cannot get QuestionInformationVo for null id");
    DomainFactory factory = getDomainFactory();
    return QuestionInformationVoAssembler.create((QuestionInformation) factory.getDomainObject(QuestionInformation.class, idQuestion));
}
项目:openMAXIMS    文件:QuestionAnswerImpl.java   
public ims.core.vo.QuestionInformationVo saveQuestion(ims.core.vo.QuestionInformationVo questionInfo) throws StaleObjectException
{
    if(!questionInfo.isValidated())
        throw new DomainRuntimeException("QuestionInformationVo not validated");

    DomainFactory factory = getDomainFactory();
    QuestionInformation doQuestionInfo = QuestionInformationVoAssembler.extractQuestionInformation(factory, questionInfo);
    factory.save(doQuestionInfo);

    return QuestionInformationVoAssembler.create(doQuestionInfo);
}
项目:openMAXIMS    文件:GraphicAssessmentNewImpl.java   
public QuestionInformationVo getQuestion(Integer questionId)
{
    if(questionId == null)
        throw new RuntimeException("Cannot get QuestionInformatioVo for null id");

    DomainFactory factory = getDomainFactory();
    QuestionInformation doQuestionInformation = (QuestionInformation)factory.getDomainObject(QuestionInformation.class, questionId);
    return QuestionInformationVoAssembler.create(doQuestionInformation);
}
项目:openmaxims-linux    文件:QuestionSelectNewImpl.java   
public ims.core.vo.QuestionInformationVo getQuestion(Integer idQuestion)
{
    if(idQuestion == null)
        throw new RuntimeException("Cannot get QuestionInformationVo for null id");
    DomainFactory factory = getDomainFactory();
    return QuestionInformationVoAssembler.create((QuestionInformation) factory.getDomainObject(QuestionInformation.class, idQuestion));
}
项目:openmaxims-linux    文件:QuestionAnswerImpl.java   
public ims.core.vo.QuestionInformationVo saveQuestion(ims.core.vo.QuestionInformationVo questionInfo) throws StaleObjectException
{
    if(!questionInfo.isValidated())
        throw new DomainRuntimeException("QuestionInformationVo not validated");

    DomainFactory factory = getDomainFactory();
    QuestionInformation doQuestionInfo = QuestionInformationVoAssembler.extractQuestionInformation(factory, questionInfo);
    factory.save(doQuestionInfo);

    return QuestionInformationVoAssembler.create(doQuestionInfo);
}
项目:openmaxims-linux    文件:GraphicAssessmentNewImpl.java   
public QuestionInformationVo getQuestion(Integer questionId)
{
    if(questionId == null)
        throw new RuntimeException("Cannot get QuestionInformatioVo for null id");

    DomainFactory factory = getDomainFactory();
    QuestionInformation doQuestionInformation = (QuestionInformation)factory.getDomainObject(QuestionInformation.class, questionId);
    return QuestionInformationVoAssembler.create(doQuestionInformation);
}
项目:AvoinApotti    文件:QuestionListImpl.java   
public QuestionInformationVo getQuestion(Integer idQuestion) 
{
    DomainFactory factory = getDomainFactory();
    return QuestionInformationVoAssembler.create((QuestionInformation) factory.getDomainObject(QuestionInformation.class, idQuestion));
}
项目:openMAXIMS    文件:QuestionListImpl.java   
public QuestionInformationVo getQuestion(Integer idQuestion) 
{
    DomainFactory factory = getDomainFactory();
    return QuestionInformationVoAssembler.create((QuestionInformation) factory.getDomainObject(QuestionInformation.class, idQuestion));
}
项目:openMAXIMS    文件:QuestionListImpl.java   
public QuestionInformationVo getQuestion(Integer idQuestion) 
{
    DomainFactory factory = getDomainFactory();
    return QuestionInformationVoAssembler.create((QuestionInformation) factory.getDomainObject(QuestionInformation.class, idQuestion));
}
项目:openmaxims-linux    文件:QuestionListImpl.java   
public QuestionInformationVo getQuestion(Integer idQuestion) 
{
    DomainFactory factory = getDomainFactory();
    return QuestionInformationVoAssembler.create((QuestionInformation) factory.getDomainObject(QuestionInformation.class, idQuestion));
}