本文整理汇总了Java中ims.pathways.vo.domain.RTTEventVoAssembler.create方法的典型用法代码示例。如果您正苦于以下问题:Java RTTEventVoAssembler.create方法的具体用法?Java RTTEventVoAssembler.create怎么用?Java RTTEventVoAssembler.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ims.pathways.vo.domain.RTTEventVoAssembler
的用法示例。
在下文中一共展示了RTTEventVoAssembler.create方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRttMapping
import ims.pathways.vo.domain.RTTEventVoAssembler; //导入方法依赖的package包/类
public RTTEventVo getRttMapping(RTTEventVo rttEvent) throws DomainInterfaceException
{
DomainFactory factory = getDomainFactory();
StringBuffer hql = new StringBuffer(" from RTTEvent ev where ev.providerSystem.id = :providerSystem ");
ArrayList<String> labels = new ArrayList<String>();
ArrayList<Object> values = new ArrayList<Object>();
labels.add("providerSystem");
values.add(rttEvent.getProviderSystem().getID_ProviderSystem());
if (rttEvent.getPASCodeIsNotNull())
{
labels.add("pasCode");
values.add(rttEvent.getPASCode());
hql.append(" and ev.pASCode = :pasCode");
}
else if (rttEvent.getNationalCodeIsNotNull())
{
hql.append(" and ev.nationalCode = :nationalCode");
labels.add("nationalCode");
values.add(rttEvent.getNationalCode());
}
List lst = factory.find(hql.toString(), labels, values);
if (lst != null && lst.size() > 1)
{
throw new DomainInterfaceException("Duplicate data found when searching event by RttValues - PASCODE=" + rttEvent.getPASCode());
}
else if (lst != null && lst.size() == 1)
{
// Unique, so only one should be found??
return RTTEventVoAssembler.create((RTTEvent) lst.get(0));
}
return null;
}
示例2: getRTTEventByPASCode
import ims.pathways.vo.domain.RTTEventVoAssembler; //导入方法依赖的package包/类
public RTTEventVo getRTTEventByPASCode(String code)
{
if (code == null)
throw new DomainRuntimeException("Cannot get RTTEventVo for null PAS code");
DomainFactory factory = getDomainFactory();
RTTEvent result = RTTEvent.getRTTEventFromPASCode(factory, code);
return RTTEventVoAssembler.create(result);
}
示例3: getRTTEvent
import ims.pathways.vo.domain.RTTEventVoAssembler; //导入方法依赖的package包/类
/**
* getRTTEvent
*/
public ims.pathways.vo.RTTEventVo getRTTEvent(ims.pathways.configuration.vo.RTTEventRefVo rtteventRefVo)
{
if(rtteventRefVo == null)
throw new RuntimeException("Cannot get RTTEventVo for null RTTEventRefVo");
return RTTEventVoAssembler.create((RTTEvent)getDomainFactory().getDomainObject(RTTEvent.class, rtteventRefVo.getID_RTTEvent()));
}
示例4: 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);
}