当前位置: 首页>>代码示例>>Java>>正文


Java RTTEventVoAssembler.extractRTTEvent方法代码示例

本文整理汇总了Java中ims.pathways.vo.domain.RTTEventVoAssembler.extractRTTEvent方法的典型用法代码示例。如果您正苦于以下问题:Java RTTEventVoAssembler.extractRTTEvent方法的具体用法?Java RTTEventVoAssembler.extractRTTEvent怎么用?Java RTTEventVoAssembler.extractRTTEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ims.pathways.vo.domain.RTTEventVoAssembler的用法示例。


在下文中一共展示了RTTEventVoAssembler.extractRTTEvent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: saveRTTEvent

import ims.pathways.vo.domain.RTTEventVoAssembler; //导入方法依赖的package包/类
public RTTEventVo saveRTTEvent(RTTEventVo rtteventVo) throws StaleObjectException, UniqueKeyViolationException 
{
	if(rtteventVo == null)
		throw new RuntimeException("Cannot save null RTTEventVo");
	
	if(rtteventVo.isValidated() == false)
		throw new CodingRuntimeException("RTTEventVo is not validated");
		
	DomainFactory factory = getDomainFactory();

	if (!rtteventVo.getID_RTTEventIsNotNull())
	{
		List l = factory.find("from RTTEvent rtt where upperName = :rttName", new String[]{"rttName"}, new Object[]{rtteventVo.getName().toUpperCase()});
		if (l.size() > 0)
			throw new UniqueKeyViolationException("RTT Event record called \"" + rtteventVo.getName() + "\" already exists. Duplicates not allowed.");

		List listPasCode = factory.find("from RTTEvent rtt where pASCode = :pascode", new String[]{"pascode"}, new Object[]{rtteventVo.getPASCode()});
		if (listPasCode.size() > 0)
			throw new UniqueKeyViolationException("RTT Event record with External System code \"" + rtteventVo.getPASCode() + "\" already exists. Duplicates not allowed.");
	}

	RTTEvent doRTTEvent = RTTEventVoAssembler.extractRTTEvent(factory, rtteventVo);
	doRTTEvent.setUpperName(rtteventVo.getName().toUpperCase());
	try 
	{
		factory.save(doRTTEvent);
	}
	catch (UnqViolationUncheckedException e)
	{
		throw new UniqueKeyViolationException("An RTT Event with this name already exists, Please change", e);			
	}
	
	return RTTEventVoAssembler.create(doRTTEvent);
}
 
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:35,代码来源:RTTEventConfigurationImpl.java


注:本文中的ims.pathways.vo.domain.RTTEventVoAssembler.extractRTTEvent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。