public RangeOfMovementJointVoCollection listJoints() { DomainFactory factory = getDomainFactory(); String hql; hql = " from MskGroups m where m.isActive = true and m.isJoint = true"; List lstGroups = factory.find(hql); RangeOfMovementJointVoCollection voCollJoints = new RangeOfMovementJointVoCollection(); for (Iterator iter = lstGroups.iterator(); iter.hasNext();) { MskGroups domGroup = (MskGroups) iter.next(); if (domGroup.isIsJoint().equals(Boolean.TRUE) && domGroup.isIsJoint().equals(Boolean.TRUE)) { MskGroupLiteVo voGroup = MskGroupLiteVoAssembler.create(domGroup); for (Iterator iterator = domGroup.getJoints().iterator(); iterator.hasNext();) { RangeOfMovementJointVo voJoint = new RangeOfMovementJointVo(); MskJoints domJoint = (MskJoints) iterator.next(); voJoint.setJoint(MskJointVoAssembler.create(domJoint)); voJoint.setGroup(voGroup); voCollJoints.add(voJoint); } } } return voCollJoints; }
public MskGroupLiteVoCollection listGroupsForGroupType(MSKGroupType lkpGroupType) { DomainFactory factory = getDomainFactory(); String hql = " from MskGroups m where m.isActive = true and m.groupType.id = " + lkpGroupType.getId(); return MskGroupLiteVoAssembler.createMskGroupLiteVoCollectionFromMskGroups(factory.find(hql)).sort(); }