Java Code Examples for ims.core.vo.MemberOfStaffShortVo.setIsActive()

The following are Jave code examples for showing how to use setIsActive() of the ims.core.vo.MemberOfStaffShortVo class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
	form.qmbReferredTo().clear();
	
	MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
	PersonName personName = new PersonName();
	personName.setSurname(value);
	voMOS.setName(personName);
	voMOS.setIsActive(Boolean.TRUE);
	
	MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
	if(coll != null)
	{
		for (int i = 0; i < coll.size(); i++)
			form.qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());			

		if (coll.size() == 1)
			form.qmbReferredTo().setValue(coll.get(0));
		else if (coll.size() > 1)
			form.qmbReferredTo().showOpened();		
	}		
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private MemberOfStaffShortVo populateFilterFromScreen()
{
	MemberOfStaffShortVo voMosFilter = new MemberOfStaffShortVo();
	PersonName name = new PersonName();
	name.setSurname(form.txtSurName().getValue());
	voMosFilter.setName(name);
	voMosFilter.setStaffType(form.cmbStaffType().getValue());
	if (form.cmbHcpDiscipline().getValue() != null)
	{
		Hcp voHcp = new Hcp();
		voHcp.setHcpType(form.cmbHcpDiscipline().getValue());
		voMosFilter.setHcp(voHcp);
	}
	voMosFilter.setIsActive(new Boolean(form.chkActiveOnly().getValue()));
	
	return voMosFilter;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
	if (cell.getColumn().equals(getColumn(QUERY_COL)))
	{
		cell.getItems().clear();
		String value = cell.getTypedText();
		PersonName name = new PersonName();
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		name.setSurname(value);
		filter.setIsActive(Boolean.TRUE);
		filter.setName(name);
		MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
		for (int i = 0; i < voColl.size(); i++)
		{
			cell.getItems().newItem(voColl.get(i));
		}
		int cellItemSize = cell.getItems().size();
		if (cellItemSize > 0)
		{
			if (cellItemSize == 1)
				cell.setValue(cell.getItems().get(0));
			cell.showOpened();
		}
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
	if (cell.getColumn().equals(getColumn(QUERY_COL)))
	{
		cell.getItems().clear();
		String value = cell.getTypedText();
		PersonName name = new PersonName();
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		name.setSurname(value);
		filter.setIsActive(Boolean.TRUE);
		filter.setName(name);
		MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
		for (int i = 0; i < voColl.size(); i++)
		{
			cell.getItems().newItem(voColl.get(i));
		}
		int cellItemSize = cell.getItems().size();
		if (cellItemSize > 0)
		{
			if (cellItemSize == 1)
				cell.setValue(cell.getItems().get(0));
			cell.showOpened();
		}
	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
	if (cell.getColumn().equals(getColumn(QUERY_COL)))
	{
		cell.getItems().clear();
		String value = cell.getTypedText();
		PersonName name = new PersonName();
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		name.setSurname(value);
		filter.setIsActive(Boolean.TRUE);
		filter.setName(name);
		MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
		for (int i = 0; i < voColl.size(); i++)
		{
			cell.getItems().newItem(voColl.get(i));
		}
		int cellItemSize = cell.getItems().size();
		if (cellItemSize > 0)
		{
			if (cellItemSize == 1)
				cell.setValue(cell.getItems().get(0));
			cell.showOpened();
		}
	}
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
	if (cell.getColumn().equals(getColumn(QUERY_COL)))
	{
		cell.getItems().clear();
		String value = cell.getTypedText();
		PersonName name = new PersonName();
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		name.setSurname(value);
		filter.setIsActive(Boolean.TRUE);
		filter.setName(name);
		MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
		for (int i = 0; i < voColl.size(); i++)
		{
			cell.getItems().newItem(voColl.get(i));
		}
		int cellItemSize = cell.getItems().size();
		if (cellItemSize > 0)
		{
			if (cellItemSize == 1)
				cell.setValue(cell.getItems().get(0));
			cell.showOpened();
		}
	}
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
	form.lyr().tabReferralDetails().qmbReferredTo().clear();
	
	MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
	PersonName personName = new PersonName();
	personName.setSurname(value);
	voMOS.setName(personName);
	voMOS.setIsActive(Boolean.TRUE);
	
	MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
	if(coll != null)
	{
		for (int i = 0; i < coll.size(); i++)
			form.lyr().tabReferralDetails().qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());			

		if (coll.size() == 1)
			form.lyr().tabReferralDetails().qmbReferredTo().setValue(coll.get(0));
		else if (coll.size() > 1)
			form.lyr().tabReferralDetails().qmbReferredTo().showOpened();		
	}		
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
	form.qmbReferredTo().clear();
	
	MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
	PersonName personName = new PersonName();
	personName.setSurname(value);
	voMOS.setName(personName);
	voMOS.setIsActive(Boolean.TRUE);
	
	MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
	if(coll != null)
	{
		for (int i = 0; i < coll.size(); i++)
			form.qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());			

		if (coll.size() == 1)
			form.qmbReferredTo().setValue(coll.get(0));
		else if (coll.size() > 1)
			form.qmbReferredTo().showOpened();		
	}		
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
@Override
protected void onQmbDictatedByTextSubmited(String value) throws PresentationLogicException {
	form.qmbDictatedBy().clear();
	
	if (value != null)
	{
		MemberOfStaffShortVo  mos = null;
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		PersonName personName = new PersonName();
		personName.setSurname(value);
		filter.setName(personName);
		filter.setIsActive(Boolean.TRUE);
		MemberOfStaffShortVoCollection voMemberOfStaffShortColl = domain.listMembersOfStaff(filter);
		if (voMemberOfStaffShortColl != null)
		{
			for (int i = 0; i < voMemberOfStaffShortColl.size(); i++)
			{
				mos = voMemberOfStaffShortColl.get(i);
				form.qmbDictatedBy().newRow(mos, mos.toString());			
			}
		}
		if (voMemberOfStaffShortColl != null &&
				voMemberOfStaffShortColl.size() == 1)
						form.qmbDictatedBy().setValue(voMemberOfStaffShortColl.get(0));
		else if (voMemberOfStaffShortColl != null &&
				voMemberOfStaffShortColl.size() > 1)
						form.qmbDictatedBy().showOpened();
		
		Integer id = engine.getLoggedInUser().getMosId();
		if (mos != null && id != null &&id.equals(mos.getID_MemberOfStaff()))
			form.qmbDictatedBy().setValue(mos);
	}
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
@Override
protected void onQmbDictatedByTextSubmited(String value) throws PresentationLogicException
{
	form.qmbDictatedBy().clear();

	if (value != null)
	{
		MemberOfStaffShortVo mos = null;
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		PersonName personName = new PersonName();
		personName.setSurname(value);
		filter.setName(personName);
		filter.setIsActive(Boolean.TRUE);
		MemberOfStaffShortVoCollection voMemberOfStaffShortColl = domain.listMembersOfStaff(filter);
		if (voMemberOfStaffShortColl != null)
		{
			for (int i = 0; i < voMemberOfStaffShortColl.size(); i++)
			{
				mos = voMemberOfStaffShortColl.get(i);
				form.qmbDictatedBy().newRow(mos, mos.toString());
			}
		}
		if (voMemberOfStaffShortColl != null && voMemberOfStaffShortColl.size() == 1)
			form.qmbDictatedBy().setValue(voMemberOfStaffShortColl.get(0));
		else if (voMemberOfStaffShortColl != null && voMemberOfStaffShortColl.size() > 1)
			form.qmbDictatedBy().showOpened();

		Integer id = engine.getLoggedInUser().getMosId();
		if (mos != null && id != null && id.equals(mos.getID_MemberOfStaff()))
			form.qmbDictatedBy().setValue(mos);
	}

}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void listMOS(DynamicGridCell cell)
{
	MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
	PersonName personName = new PersonName();
	personName.setSurname(cell.getTypedText());
	filter.setName(personName);
	filter.setIsActive(Boolean.TRUE);

	populateCellItems(cell, domain.listMembersOfStaff(filter));
}
 
Example 12
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void listMOS(DynamicGridCell cell)
{
	MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
	PersonName personName = new PersonName();
	personName.setSurname(cell.getTypedText());
	filter.setName(personName);
	filter.setIsActive(Boolean.TRUE);

	populateCellItems(cell, domain.listMembersOfStaff(filter));
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void listMOS(DynamicGridCell cell)
{
	MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
	PersonName personName = new PersonName();
	personName.setSurname(cell.getTypedText());
	filter.setName(personName);
	filter.setIsActive(Boolean.TRUE);

	populateCellItems(cell, domain.listMembersOfStaff(filter));
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void populateFilterFromScreen(MemberOfStaffShortVo filterVo)
{
	PersonName name = new PersonName();
	filterVo.setName(name);
	name.setSurname(form.txtSName().getValue());
	filterVo.setStaffType(form.cmbStaffType().getValue());
	if (form.cmbHcpTypeFilter().getValue() != null)
	{
		filterVo.setHcp(new Hcp());
		filterVo.getHcp().setHcpType(form.cmbHcpTypeFilter().getValue());
	}
	filterVo.setIsActive(new Boolean(form.chkActiveOnly().getValue()));
}
 
Example 15
Project: AvoinApotti   File: MosSearchImpl.java   Source Code and License Vote up 5 votes
public MemberOfStaffLiteVoCollection listActiveMosByName(String name)
{
	if(name == null)
		throw new CodingRuntimeException("name parameter null in method listActiveMosByName");
	
	MemberOfStaffShortVo voFilter = new MemberOfStaffShortVo();
	voFilter.setName(new PersonName());
	voFilter.getName().setSurname(name);
	voFilter.setIsActive(Boolean.TRUE);

	return MemberOfStaffLiteVoAssembler.createMemberOfStaffLiteVoCollectionFromMemberOfStaff(listDomMos(voFilter));
}
 
Example 16
Project: AvoinApotti   File: MyOrderImpl.java   Source Code and License Vote up 5 votes
public MemberOfStaffShortVoCollection listMos(String text)
{
	if (text == null || text.length() == 0)
		throw new DomainRuntimeException("Filter not supplied");

	MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
	filter.setName(new PersonName());
	filter.getName().setSurname(text);
	filter.setIsActive(true);

	MosAdmin impl = (MosAdmin) getDomainImpl(MosAdminImpl.class);
	return impl.listMembersOfStaffWithPrimaryLocations(filter);
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
@Override
protected void onQmbChangingUserTextSubmited(String value) throws PresentationLogicException
{
	form.qmbChangingUser().clear();
	MemberOfStaffShortVo voMemberOfStaffFilter = new MemberOfStaffShortVo();
	PersonName name = new PersonName();
	name.setSurname(value);
	voMemberOfStaffFilter.setName(name);
	voMemberOfStaffFilter.setIsAppUser(new Boolean(true));
	voMemberOfStaffFilter.setIsActive(Boolean.TRUE);
	MemberOfStaffShortVoCollection voColl = null;
	try 
	{
		voColl = domain.listMembersOfStaff(voMemberOfStaffFilter);
	} 
	catch (DomainInterfaceException e) 
	{
		engine.showMessage(e.getMessage());
		return;
	}

	for (int i = 0 ; voColl != null && i < voColl.size() ;i++)
		form.qmbChangingUser().newRow(voColl.get(i),  voColl.get(i).getNameIsNotNull() ? voColl.get(i).getName().toString() : "");

	if (voColl == null || voColl.size() == 0)
	{
		engine.showMessage("No Members of Staff found for you search criteria.", "No Data Found", MessageButtons.OK, MessageIcon.INFORMATION);
		return;
	}
	
	if (voColl.size() == 1)
		form.qmbChangingUser().setValue(voColl.get(0));
	else if (voColl.size() > 1)
		form.qmbChangingUser().showOpened();
}