/** * Domain Interface function used to list stretching for a specific CareContext */ public StretchingShortVoCollection listStretchingByCareContext(CareContextRefVo careContextRef) { // Check for parameter if (careContextRef == null || !careContextRef.getID_CareContextIsNotNull()) throw new DomainRuntimeException("Can not search after null careContext"); String query = "from Stretching AS st where st.clinicalContact.careContext.id = :CCID order by st.authoringDateTime asc"; ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); paramNames.add("CCID"); paramValues.add(careContextRef.getID_CareContext()); return StretchingShortVoAssembler.createStretchingShortVoCollectionFromStretching(getDomainFactory().find(query.toString(), paramNames, paramValues)); }
public void deleteStretchingVo(StretchingShortVo voStretchingShort) throws ForeignKeyViolationException { DomainFactory factory = getDomainFactory(); Stretching doStretchingShort = StretchingShortVoAssembler.extractStretching(factory, voStretchingShort); factory.delete(doStretchingShort); }