Java 类ims.core.vo.ServiceFunctionVo 实例源码
项目:openMAXIMS
文件:Logic.java
private void populateServiceFunctionGrid(ServiceFunctionVoCollection voCollServiceFunctions)
{
form.grdServiceFunctions().getRows().clear();
if( voCollServiceFunctions == null || voCollServiceFunctions.size() == 0)
return;
for( int i = 0; i < voCollServiceFunctions.size();i++ )
{
voCollServiceFunctions.sort();
ServiceFunctionVo tempVo = voCollServiceFunctions.get(i);
if( tempVo != null )
{
ims.scheduling.forms.sessionslotdialog.GenForm.grdServiceFunctionsRow row = form.grdServiceFunctions().getRows().newRow();
row.setColFunctions(tempVo.getFunction().getText());
row.setSelectable(false);
row.setColSelect(false);
row.setValue(tempVo);
}
}
}
项目:AvoinApotti
文件:Logic.java
private int inFunctionList(ServiceFunctionVo value, LocationServiceFunctionsVoCollection voVollFunc)
{
if (voVollFunc != null && voVollFunc.size() > 0)
{
for (int i = 0; i < voVollFunc.size(); i++)
{
if (voVollFunc.get(i).getServiceFunction().equals(value))
return i;
}
}
return -1;
}
项目:AvoinApotti
文件:Logic.java
private String formatServiceFunctionTooltip(ServiceFunctionVo voServiceFunction)
{
String out = formatServicevoTooltip(voServiceFunction.getService());
out += makeTextile("*" + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(true) + ": *", "DarkRed", "tahoma", "14");
out += makeTextile(voServiceFunction.getFunctionIsNotNull() ? voServiceFunction.getFunction().getText() : "", (voServiceFunction.getIsActiveIsNotNull() ? (voServiceFunction.getIsActive().booleanValue() ? "black" : "red") : "black"), "tahoma", "12");
return new TextileString(out).toString();
}
项目:AvoinApotti
文件:Logic.java
private ServiceFunctionVo inFunctionList(ServiceFunction value, ServiceFunctionVoCollection voVollFunc)
{
if (voVollFunc != null && voVollFunc.size() > 0)
{
for (int i = 0; i < voVollFunc.size(); i++)
{
if (voVollFunc.get(i).getFunctionIsNotNull() && voVollFunc.get(i).getFunction().equals(value))
return voVollFunc.get(i);
}
}
return null;
}
项目:AvoinApotti
文件:Logic.java
protected void onGrdFunctionSelectionChanged() throws PresentationLogicException
{
saveServiceFunctionTaxonomy(form.getLocalContext().getSelectedRecord());
//WDEV-16672
updateDetailsTabContextMenusState();
form.getContextMenus().getGenericGridAddItem().setText("Add");
form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().setEnabled(true);
form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().setReadOnly(false);
form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().clear();
grdFunctionRow row;
row = form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunction().getSelectedRow();
ServiceFunctionVo vo = inFunctionList(row.getValue(), form.getLocalContext().getserviceFunctions());
form.getLocalContext().setSelectedRecordFunction(vo);
if ((vo != null) && (vo.getTaxonomyMapIsNotNull()))
{
grdFunctionTaxonomyRow rowActTaxonomy;
for (int i = 0; i < vo.getTaxonomyMap().size(); i++)
{
rowActTaxonomy = form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().newRow();
rowActTaxonomy.setValue(vo.getTaxonomyMap().get(i));
rowActTaxonomy.setcolCode(vo.getTaxonomyMap().get(i).getTaxonomyCodeIsNotNull() ? vo.getTaxonomyMap().get(i).getTaxonomyCode() : null);
rowActTaxonomy.setcolExtCodeType(vo.getTaxonomyMap().get(i).getTaxonomyNameIsNotNull() ? vo.getTaxonomyMap().get(i).getTaxonomyName() : null);
}
}
}
项目:AvoinApotti
文件:Logic.java
private void saveServiceFunctionTaxonomy(ServiceVo voService)
{
if (voService != null)
{
ServiceFunctionVo vo = form.getLocalContext().getSelectedRecordFunction();
if (vo != null)
{
vo.setService(voService);
vo.setTaxonomyMap(null);
if (form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().size() > 0)
{
TaxonomyMapCollection voColl = new TaxonomyMapCollection();
// update it's taxonmy
for (int i = 0; i < form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().size(); i++)
{
TaxonomyMap mp = form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).getValue();
mp.setTaxonomyCode(form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).getcolCode());
mp.setTaxonomyName(form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).getcolExtCodeType());
form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).setValue(mp);
voColl.add(form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).getValue());
}
vo.setTaxonomyMap(voColl);
// update serviceVo
updateFunctionList(vo);
}
}
}
}
项目:openMAXIMS
文件:Logic.java
private int inFunctionList(ServiceFunctionVo value, LocationServiceFunctionsVoCollection voVollFunc)
{
if (voVollFunc != null && voVollFunc.size() > 0)
{
for (int i = 0; i < voVollFunc.size(); i++)
{
if (voVollFunc.get(i).getServiceFunction().equals(value))
return i;
}
}
return -1;
}
项目:openMAXIMS
文件:Logic.java
private int inFunctionList(ServiceFunctionVo value, LocationServiceFunctionsVoCollection voVollFunc)
{
if (voVollFunc != null && voVollFunc.size() > 0)
{
for (int i = 0; i < voVollFunc.size(); i++)
{
if (voVollFunc.get(i).getServiceFunction().equals(value))
return i;
}
}
return -1;
}
项目:openMAXIMS
文件:Logic.java
private String formatServiceFunctionTooltip(ServiceFunctionVo voServiceFunction)
{
String out = formatServicevoTooltip(voServiceFunction.getService());
out += makeTextile("*" + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(true) + ": *", "DarkRed", "tahoma", "14");
out += makeTextile(voServiceFunction.getFunctionIsNotNull() ? voServiceFunction.getFunction().getText() : "", (voServiceFunction.getIsActiveIsNotNull() ? (voServiceFunction.getIsActive().booleanValue() ? "black" : "red") : "black"), "tahoma", "12");
return new TextileString(out).toString();
}
项目:openMAXIMS
文件:Logic.java
private ServiceFunctionVo inFunctionList(ServiceFunction value, ServiceFunctionVoCollection voVollFunc)
{
if (voVollFunc != null && voVollFunc.size() > 0)
{
for (int i = 0; i < voVollFunc.size(); i++)
{
if (voVollFunc.get(i).getFunctionIsNotNull() && voVollFunc.get(i).getFunction().equals(value))
return voVollFunc.get(i);
}
}
return null;
}
项目:openMAXIMS
文件:Logic.java
protected void onGrdFunctionSelectionChanged() throws PresentationLogicException
{
saveServiceFunctionTaxonomy(form.getLocalContext().getSelectedRecord());
//WDEV-16672
updateDetailsTabContextMenusState();
form.getContextMenus().getGenericGridAddItem().setText("Add");
form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().setEnabled(true);
form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().setReadOnly(false);
form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().clear();
grdFunctionRow row;
row = form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunction().getSelectedRow();
ServiceFunctionVo vo = inFunctionList(row.getValue(), form.getLocalContext().getserviceFunctions());
form.getLocalContext().setSelectedRecordFunction(vo);
if ((vo != null) && (vo.getTaxonomyMapIsNotNull()))
{
grdFunctionTaxonomyRow rowActTaxonomy;
for (int i = 0; i < vo.getTaxonomyMap().size(); i++)
{
rowActTaxonomy = form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().newRow();
rowActTaxonomy.setValue(vo.getTaxonomyMap().get(i));
rowActTaxonomy.setcolCode(vo.getTaxonomyMap().get(i).getTaxonomyCodeIsNotNull() ? vo.getTaxonomyMap().get(i).getTaxonomyCode() : null);
rowActTaxonomy.setcolExtCodeType(vo.getTaxonomyMap().get(i).getTaxonomyNameIsNotNull() ? vo.getTaxonomyMap().get(i).getTaxonomyName() : null);
}
}
}
项目:openMAXIMS
文件:Logic.java
private void saveServiceFunctionTaxonomy(ServiceVo voService)
{
if (voService != null)
{
ServiceFunctionVo vo = form.getLocalContext().getSelectedRecordFunction();
if (vo != null)
{
vo.setService(voService);
vo.setTaxonomyMap(null);
if (form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().size() > 0)
{
TaxonomyMapCollection voColl = new TaxonomyMapCollection();
// update it's taxonmy
for (int i = 0; i < form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().size(); i++)
{
TaxonomyMap mp = form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).getValue();
mp.setTaxonomyCode(form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).getcolCode());
mp.setTaxonomyName(form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).getcolExtCodeType());
form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).setValue(mp);
voColl.add(form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).getValue());
}
vo.setTaxonomyMap(voColl);
// update serviceVo
updateFunctionList(vo);
}
}
}
}
项目:openmaxims-linux
文件:Logic.java
private int inFunctionList(ServiceFunctionVo value, LocationServiceFunctionsVoCollection voVollFunc)
{
if (voVollFunc != null && voVollFunc.size() > 0)
{
for (int i = 0; i < voVollFunc.size(); i++)
{
if (voVollFunc.get(i).getServiceFunction().equals(value))
return i;
}
}
return -1;
}
项目:openmaxims-linux
文件:Logic.java
private String formatServiceFunctionTooltip(ServiceFunctionVo voServiceFunction)
{
String out = formatServicevoTooltip(voServiceFunction.getService());
out += makeTextile("*" + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(true) + ": *", "DarkRed", "tahoma", "14");
out += makeTextile(voServiceFunction.getFunctionIsNotNull() ? voServiceFunction.getFunction().getText() : "", (voServiceFunction.getIsActiveIsNotNull() ? (voServiceFunction.getIsActive().booleanValue() ? "black" : "red") : "black"), "tahoma", "12");
return new TextileString(out).toString();
}
项目:openmaxims-linux
文件:Logic.java
private ServiceFunctionVo inFunctionList(ServiceFunction value, ServiceFunctionVoCollection voVollFunc)
{
if (voVollFunc != null && voVollFunc.size() > 0)
{
for (int i = 0; i < voVollFunc.size(); i++)
{
if (voVollFunc.get(i).getFunctionIsNotNull() && voVollFunc.get(i).getFunction().equals(value))
return voVollFunc.get(i);
}
}
return null;
}
项目:openmaxims-linux
文件:Logic.java
protected void onGrdFunctionSelectionChanged() throws PresentationLogicException
{
saveServiceFunctionTaxonomy(form.getLocalContext().getSelectedRecord());
//WDEV-16672
updateDetailsTabContextMenusState();
form.getContextMenus().getGenericGridAddItem().setText("Add");
form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().setEnabled(true);
form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().setReadOnly(false);
form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().clear();
grdFunctionRow row;
row = form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunction().getSelectedRow();
ServiceFunctionVo vo = inFunctionList(row.getValue(), form.getLocalContext().getserviceFunctions());
form.getLocalContext().setSelectedRecordFunction(vo);
if ((vo != null) && (vo.getTaxonomyMapIsNotNull()))
{
grdFunctionTaxonomyRow rowActTaxonomy;
for (int i = 0; i < vo.getTaxonomyMap().size(); i++)
{
rowActTaxonomy = form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().newRow();
rowActTaxonomy.setValue(vo.getTaxonomyMap().get(i));
rowActTaxonomy.setcolCode(vo.getTaxonomyMap().get(i).getTaxonomyCodeIsNotNull() ? vo.getTaxonomyMap().get(i).getTaxonomyCode() : null);
rowActTaxonomy.setcolExtCodeType(vo.getTaxonomyMap().get(i).getTaxonomyNameIsNotNull() ? vo.getTaxonomyMap().get(i).getTaxonomyName() : null);
}
}
}
项目:openmaxims-linux
文件:Logic.java
private void saveServiceFunctionTaxonomy(ServiceVo voService)
{
if (voService != null)
{
ServiceFunctionVo vo = form.getLocalContext().getSelectedRecordFunction();
if (vo != null)
{
vo.setService(voService);
vo.setTaxonomyMap(null);
if (form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().size() > 0)
{
TaxonomyMapCollection voColl = new TaxonomyMapCollection();
// update it's taxonmy
for (int i = 0; i < form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().size(); i++)
{
TaxonomyMap mp = form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).getValue();
mp.setTaxonomyCode(form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).getcolCode());
mp.setTaxonomyName(form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).getcolExtCodeType());
form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).setValue(mp);
voColl.add(form.lyr1().Edit().lyrActivityFunction().tabPageFunction().grdFunctionTaxonomy().getRows().get(i).getValue());
}
vo.setTaxonomyMap(voColl);
// update serviceVo
updateFunctionList(vo);
}
}
}
}
项目:AvoinApotti
文件:Logic.java
private void populateScreenFromData()
{
clearDetails();
DirectoryOfServiceVo voDirService = form.getLocalContext().getDirectoryOfService();
if (voDirService == null)
return;
form.txtId().setValue(voDirService.getDoSId());
form.txtName().setValue(voDirService.getDoSName());
form.chkActive().setValue(voDirService.getIsActiveIsNotNull() ? voDirService.getIsActive().booleanValue() : false);
form.cmbService().setValue(voDirService.getService());
//WDEV-11662 form.cmbOrganisation().setValue(voDirService.getOrganisation());
//WDEV-11662-Begin
if (voDirService.getContractIsNotNull() && !form.cmbContract().getValues().contains(voDirService.getContractIsNotNull()))
{
form.cmbContract().newRow(voDirService.getContract(), voDirService.getContract().getContractName());
}
form.cmbContract().setValue(voDirService.getContract());
//WDEV-11662-End
if (voDirService.getLocationIsNotNull())
{
form.qmbLocation().newRow(voDirService.getLocation(), voDirService.getLocation().getName());
form.qmbLocation().setValue(voDirService.getLocation());
}
loadFunctions();
if (voDirService.getFunctionsIsNotNull())
{
ServiceFunctionVo voFunction = null;
GenForm.grdFunctionsRow fRow = null;
for (int i = 0; i < voDirService.getFunctions().size(); i++)
{
voFunction = voDirService.getFunctions().get(i);
boolean bFound = false;
for (int p = 0; p < form.grdFunctions().getRows().size(); p++)
{
fRow = form.grdFunctions().getRows().get(p);
if (voFunction.equals(fRow.getValue()))
{
fRow.setColSelect(true);
bFound = true;
}
}
if (!bFound)
{
fRow = form.grdFunctions().getRows().newRow();
if (voFunction.getFunctionIsNotNull())
fRow.setColName(voFunction.getFunction().getText());
fRow.setColSelect(true);
fRow.setValue(voFunction);
}
}
}
}
项目:AvoinApotti
文件:Logic.java
private void selectionChange(ims.framework.controls.TreeNode node)
{
if ((node != null))
{
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setText("New " + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(false));
form.getContextMenus().getServiceActivityNEWSERVICEItem().setText("New " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false));
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setText("New " + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setText("Remove " + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false));
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setText("Remove " + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(false));
form.getContextMenus().getServiceActivityUPDATEItem().setText("Edit " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false));
if ((node.getValue() != null) && (node.getValue() instanceof ServiceVo))
{
form.getContextMenus().getServiceActivityLINKLOCItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(false);
form.getLocalContext().setSelectedRecordFunction(null);
form.getLocalContext().setSelectedRecordActivity(null);
populateInstanceControl((ServiceVo) node.getValue(), node);
form.getContextMenus().getServiceActivityUPDATEItem().setVisible(true);//WDEV-16508
}
else if (node.getValue() instanceof ServiceActivityVo)
{
form.getContextMenus().getServiceActivityLINKLOCItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setVisible(false);
// TODO with UI flag
// form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(true);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEItem().setVisible(false);
form.getLocalContext().setSelectedRecordFunction(null);
form.getLocalContext().setSelectedRecordActivity((ServiceActivityVo) node.getValue());
populateInstanceControl((ServiceVo) node.getParent().getValue(), node.getParent());
}
else if (node.getValue() instanceof ServiceFunctionVo)
{
form.getContextMenus().getServiceActivityLINKLOCItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(false);
// TODO with UI flag
// form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(true);
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEItem().setVisible(false);
form.getLocalContext().setSelectedRecordFunction((ServiceFunctionVo) node.getValue());
form.getLocalContext().setSelectedRecordActivity(null);
populateInstanceControl((ServiceVo) node.getParent().getValue(), node.getParent());
}
else
{
form.getContextMenus().getServiceActivityLINKLOCItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEItem().setVisible(false);
form.getLocalContext().setSelectedRecordFunction(null);
form.getLocalContext().setSelectedRecordActivity(null);
populateInstanceControl((ServiceVo) node.getParent().getValue(), node);
}
}
}
项目:AvoinApotti
文件:LocationServiceImpl.java
public LocationServiceFunctionsVoCollection listLocationServiceFunction(LocationServiceVo voLocationService, ServiceFunctionVo voFunction)
{
DomainFactory factory = getDomainFactory();
if (voLocationService == null && voFunction == null)
return LocationServiceFunctionsVoAssembler.createLocationServiceFunctionsVoCollectionFromLocationServiceFunction(factory.listDomainObjects(LocationServiceFunction.class));
String hql = " from LocationService locSer ";
StringBuffer condStr = new StringBuffer();
String andStr = " ";
ArrayList markers = new ArrayList();
ArrayList values = new ArrayList();
if (voLocationService != null)
{
if (voLocationService.getID_LocationServiceIsNotNull())
{
condStr.append(andStr + " locSer.locationService.id = :locServiceId");
markers.add("locServiceId");
values.add(voLocationService.getID_LocationService());
andStr = " and ";
}
else if ((voLocationService.getLocationIsNotNull()) && (voLocationService.getLocation().getID_LocationIsNotNull()))
{
// filter by location
condStr.append(andStr + " locServiceActivity.locationService.location.id = :locId");
markers.add("locId");
values.add(voLocationService.getLocation().getID_Location());
andStr = " and ";
}
else if ((voLocationService.getServiceIsNotNull()) && (voLocationService.getService().getID_ServiceIsNotNull()))
{
// filter by location
condStr.append(andStr + " locServiceActivity.locationService.service.id = :serId");
markers.add("serId");
values.add(voLocationService.getService().getID_Service());
andStr = " and ";
}
}
if (voFunction != null)
{
// filter on Function
if (voFunction.getIsActiveIsNotNull())
{
condStr.append(andStr + " locServiceActivity.serviceFunction.isActive = :isActive");
markers.add("isActive");
values.add(voFunction.getIsActive());
andStr = " and ";
}
// filter Name
if (voFunction.getFunctionIsNotNull() && !voFunction.getID_ServiceFunctionIsNotNull())
{
condStr.append(andStr + " upper(locServiceActivity.serviceActivity.activity.name) like :functionName");
markers.add("functionName");
values.add("%" + voFunction.getFunction().getText().toUpperCase() + "%");
andStr = " and ";
}
else if (voFunction.getID_ServiceFunctionIsNotNull())
{
// filter by Activity
condStr.append(andStr + "locServiceActivity.serviceFunction.id = :serviceFunctionId");
markers.add("serviceFunctionId");
values.add(voFunction.getID_ServiceFunction());
andStr = " and ";
}
}
if (andStr.equals(" and "))
hql += " where ";
hql += condStr.toString();
return LocationServiceFunctionsVoAssembler.createLocationServiceFunctionsVoCollectionFromLocationServiceFunction(factory.find(hql, markers, values)).sort();
}
项目:openMAXIMS
文件:Logic.java
private void populateScreenFromData()
{
clearDetails();
DirectoryOfServiceVo voDirService = form.getLocalContext().getDirectoryOfService();
if (voDirService == null)
return;
form.txtId().setValue(voDirService.getDoSId());
form.txtName().setValue(voDirService.getDoSName());
form.chkActive().setValue(voDirService.getIsActiveIsNotNull() ? voDirService.getIsActive().booleanValue() : false);
form.chkRTTClockImpact().setValue(voDirService.getRTTClockImpact());//WDEV-19457
form.cmbService().setValue(voDirService.getService());
//WDEV-11662 form.cmbOrganisation().setValue(voDirService.getOrganisation());
//WDEV-11662-Begin
if (voDirService.getContractIsNotNull() && !form.cmbContract().getValues().contains(voDirService.getContractIsNotNull()))
{
form.cmbContract().newRow(voDirService.getContract(), voDirService.getContract().getContractName());
}
form.cmbContract().setValue(voDirService.getContract());
//WDEV-11662-End
if (voDirService.getLocationIsNotNull())
{
form.qmbLocation().newRow(voDirService.getLocation(), voDirService.getLocation().getName());
form.qmbLocation().setValue(voDirService.getLocation());
}
loadFunctions();
if (voDirService.getFunctionsIsNotNull())
{
ServiceFunctionVo voFunction = null;
GenForm.grdFunctionsRow fRow = null;
for (int i = 0; i < voDirService.getFunctions().size(); i++)
{
voFunction = voDirService.getFunctions().get(i);
boolean bFound = false;
for (int p = 0; p < form.grdFunctions().getRows().size(); p++)
{
fRow = form.grdFunctions().getRows().get(p);
if (voFunction.equals(fRow.getValue()))
{
fRow.setColSelect(true);
bFound = true;
}
}
if (!bFound)
{
fRow = form.grdFunctions().getRows().newRow();
if (voFunction.getFunctionIsNotNull())
fRow.setColName(voFunction.getFunction().getText());
fRow.setColSelect(true);
fRow.setValue(voFunction);
}
}
}
}
项目:openMAXIMS
文件:LocationServiceImpl.java
public LocationServiceFunctionsVoCollection listLocationServiceFunction(LocationServiceVo voLocationService, ServiceFunctionVo voFunction)
{
DomainFactory factory = getDomainFactory();
if (voLocationService == null && voFunction == null)
return LocationServiceFunctionsVoAssembler.createLocationServiceFunctionsVoCollectionFromLocationServiceFunction(factory.listDomainObjects(LocationServiceFunction.class));
String hql = " from LocationService locSer ";
StringBuffer condStr = new StringBuffer();
String andStr = " ";
ArrayList markers = new ArrayList();
ArrayList values = new ArrayList();
if (voLocationService != null)
{
if (voLocationService.getID_LocationServiceIsNotNull())
{
condStr.append(andStr + " locSer.locationService.id = :locServiceId");
markers.add("locServiceId");
values.add(voLocationService.getID_LocationService());
andStr = " and ";
}
else if ((voLocationService.getLocationIsNotNull()) && (voLocationService.getLocation().getID_LocationIsNotNull()))
{
// filter by location
condStr.append(andStr + " locServiceActivity.locationService.location.id = :locId");
markers.add("locId");
values.add(voLocationService.getLocation().getID_Location());
andStr = " and ";
}
else if ((voLocationService.getServiceIsNotNull()) && (voLocationService.getService().getID_ServiceIsNotNull()))
{
// filter by location
condStr.append(andStr + " locServiceActivity.locationService.service.id = :serId");
markers.add("serId");
values.add(voLocationService.getService().getID_Service());
andStr = " and ";
}
}
if (voFunction != null)
{
// filter on Function
if (voFunction.getIsActiveIsNotNull())
{
condStr.append(andStr + " locServiceActivity.serviceFunction.isActive = :isActive");
markers.add("isActive");
values.add(voFunction.getIsActive());
andStr = " and ";
}
// filter Name
if (voFunction.getFunctionIsNotNull() && !voFunction.getID_ServiceFunctionIsNotNull())
{
condStr.append(andStr + " upper(locServiceActivity.serviceActivity.activity.name) like :functionName");
markers.add("functionName");
values.add("%" + voFunction.getFunction().getText().toUpperCase() + "%");
andStr = " and ";
}
else if (voFunction.getID_ServiceFunctionIsNotNull())
{
// filter by Activity
condStr.append(andStr + "locServiceActivity.serviceFunction.id = :serviceFunctionId");
markers.add("serviceFunctionId");
values.add(voFunction.getID_ServiceFunction());
andStr = " and ";
}
}
if (andStr.equals(" and "))
hql += " where ";
hql += condStr.toString();
return LocationServiceFunctionsVoAssembler.createLocationServiceFunctionsVoCollectionFromLocationServiceFunction(factory.find(hql, markers, values)).sort();
}
项目:openMAXIMS
文件:Logic.java
private void populateScreenFromData()
{
clearDetails();
DirectoryOfServiceVo voDirService = form.getLocalContext().getDirectoryOfService();
if (voDirService == null)
return;
form.txtId().setValue(voDirService.getDoSId());
form.txtName().setValue(voDirService.getDoSName());
form.chkActive().setValue(voDirService.getIsActiveIsNotNull() ? voDirService.getIsActive().booleanValue() : false);
form.cmbService().setValue(voDirService.getService());
//WDEV-11662 form.cmbOrganisation().setValue(voDirService.getOrganisation());
//WDEV-11662-Begin
if (voDirService.getContractIsNotNull() && !form.cmbContract().getValues().contains(voDirService.getContractIsNotNull()))
{
form.cmbContract().newRow(voDirService.getContract(), voDirService.getContract().getContractName());
}
form.cmbContract().setValue(voDirService.getContract());
//WDEV-11662-End
if (voDirService.getLocationIsNotNull())
{
form.qmbLocation().newRow(voDirService.getLocation(), voDirService.getLocation().getName());
form.qmbLocation().setValue(voDirService.getLocation());
}
loadFunctions();
if (voDirService.getFunctionsIsNotNull())
{
ServiceFunctionVo voFunction = null;
GenForm.grdFunctionsRow fRow = null;
for (int i = 0; i < voDirService.getFunctions().size(); i++)
{
voFunction = voDirService.getFunctions().get(i);
boolean bFound = false;
for (int p = 0; p < form.grdFunctions().getRows().size(); p++)
{
fRow = form.grdFunctions().getRows().get(p);
if (voFunction.equals(fRow.getValue()))
{
fRow.setColSelect(true);
bFound = true;
}
}
if (!bFound)
{
fRow = form.grdFunctions().getRows().newRow();
if (voFunction.getFunctionIsNotNull())
fRow.setColName(voFunction.getFunction().getText());
fRow.setColSelect(true);
fRow.setValue(voFunction);
}
}
}
}
项目:openMAXIMS
文件:Logic.java
private void selectionChange(ims.framework.controls.TreeNode node)
{
if ((node != null))
{
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setText("New " + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(false));
form.getContextMenus().getServiceActivityNEWSERVICEItem().setText("New " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false));
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setText("New " + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setText("Remove " + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false));
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setText("Remove " + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(false));
form.getContextMenus().getServiceActivityUPDATEItem().setText("Edit " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false));
if ((node.getValue() != null) && (node.getValue() instanceof ServiceVo))
{
form.getContextMenus().getServiceActivityLINKLOCItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(false);
form.getLocalContext().setSelectedRecordFunction(null);
form.getLocalContext().setSelectedRecordActivity(null);
populateInstanceControl((ServiceVo) node.getValue(), node);
form.getContextMenus().getServiceActivityUPDATEItem().setVisible(true);//WDEV-16508
}
else if (node.getValue() instanceof ServiceActivityVo)
{
form.getContextMenus().getServiceActivityLINKLOCItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setVisible(false);
// TODO with UI flag
// form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(true);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEItem().setVisible(false);
form.getLocalContext().setSelectedRecordFunction(null);
form.getLocalContext().setSelectedRecordActivity((ServiceActivityVo) node.getValue());
populateInstanceControl((ServiceVo) node.getParent().getValue(), node.getParent());
}
else if (node.getValue() instanceof ServiceFunctionVo)
{
form.getContextMenus().getServiceActivityLINKLOCItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(false);
// TODO with UI flag
// form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(true);
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEItem().setVisible(false);
form.getLocalContext().setSelectedRecordFunction((ServiceFunctionVo) node.getValue());
form.getLocalContext().setSelectedRecordActivity(null);
populateInstanceControl((ServiceVo) node.getParent().getValue(), node.getParent());
}
else
{
form.getContextMenus().getServiceActivityLINKLOCItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEItem().setVisible(false);
form.getLocalContext().setSelectedRecordFunction(null);
form.getLocalContext().setSelectedRecordActivity(null);
populateInstanceControl((ServiceVo) node.getParent().getValue(), node);
}
}
}
项目:openMAXIMS
文件:LocationServiceImpl.java
public LocationServiceFunctionsVoCollection listLocationServiceFunction(LocationServiceVo voLocationService, ServiceFunctionVo voFunction)
{
DomainFactory factory = getDomainFactory();
if (voLocationService == null && voFunction == null)
return LocationServiceFunctionsVoAssembler.createLocationServiceFunctionsVoCollectionFromLocationServiceFunction(factory.listDomainObjects(LocationServiceFunction.class));
String hql = " from LocationService locSer ";
StringBuffer condStr = new StringBuffer();
String andStr = " ";
ArrayList markers = new ArrayList();
ArrayList values = new ArrayList();
if (voLocationService != null)
{
if (voLocationService.getID_LocationServiceIsNotNull())
{
condStr.append(andStr + " locSer.locationService.id = :locServiceId");
markers.add("locServiceId");
values.add(voLocationService.getID_LocationService());
andStr = " and ";
}
else if ((voLocationService.getLocationIsNotNull()) && (voLocationService.getLocation().getID_LocationIsNotNull()))
{
// filter by location
condStr.append(andStr + " locServiceActivity.locationService.location.id = :locId");
markers.add("locId");
values.add(voLocationService.getLocation().getID_Location());
andStr = " and ";
}
else if ((voLocationService.getServiceIsNotNull()) && (voLocationService.getService().getID_ServiceIsNotNull()))
{
// filter by location
condStr.append(andStr + " locServiceActivity.locationService.service.id = :serId");
markers.add("serId");
values.add(voLocationService.getService().getID_Service());
andStr = " and ";
}
}
if (voFunction != null)
{
// filter on Function
if (voFunction.getIsActiveIsNotNull())
{
condStr.append(andStr + " locServiceActivity.serviceFunction.isActive = :isActive");
markers.add("isActive");
values.add(voFunction.getIsActive());
andStr = " and ";
}
// filter Name
if (voFunction.getFunctionIsNotNull() && !voFunction.getID_ServiceFunctionIsNotNull())
{
condStr.append(andStr + " upper(locServiceActivity.serviceActivity.activity.name) like :functionName");
markers.add("functionName");
values.add("%" + voFunction.getFunction().getText().toUpperCase() + "%");
andStr = " and ";
}
else if (voFunction.getID_ServiceFunctionIsNotNull())
{
// filter by Activity
condStr.append(andStr + "locServiceActivity.serviceFunction.id = :serviceFunctionId");
markers.add("serviceFunctionId");
values.add(voFunction.getID_ServiceFunction());
andStr = " and ";
}
}
if (andStr.equals(" and "))
hql += " where ";
hql += condStr.toString();
return LocationServiceFunctionsVoAssembler.createLocationServiceFunctionsVoCollectionFromLocationServiceFunction(factory.find(hql, markers, values)).sort();
}
项目:openmaxims-linux
文件:Logic.java
private void populateScreenFromData()
{
clearDetails();
DirectoryOfServiceVo voDirService = form.getLocalContext().getDirectoryOfService();
if (voDirService == null)
return;
form.txtId().setValue(voDirService.getDoSId());
form.txtName().setValue(voDirService.getDoSName());
form.chkActive().setValue(voDirService.getIsActiveIsNotNull() ? voDirService.getIsActive().booleanValue() : false);
form.cmbService().setValue(voDirService.getService());
//WDEV-11662 form.cmbOrganisation().setValue(voDirService.getOrganisation());
//WDEV-11662-Begin
if (voDirService.getContractIsNotNull() && !form.cmbContract().getValues().contains(voDirService.getContractIsNotNull()))
{
form.cmbContract().newRow(voDirService.getContract(), voDirService.getContract().getContractName());
}
form.cmbContract().setValue(voDirService.getContract());
//WDEV-11662-End
if (voDirService.getLocationIsNotNull())
{
form.qmbLocation().newRow(voDirService.getLocation(), voDirService.getLocation().getName());
form.qmbLocation().setValue(voDirService.getLocation());
}
loadFunctions();
if (voDirService.getFunctionsIsNotNull())
{
ServiceFunctionVo voFunction = null;
GenForm.grdFunctionsRow fRow = null;
for (int i = 0; i < voDirService.getFunctions().size(); i++)
{
voFunction = voDirService.getFunctions().get(i);
boolean bFound = false;
for (int p = 0; p < form.grdFunctions().getRows().size(); p++)
{
fRow = form.grdFunctions().getRows().get(p);
if (voFunction.equals(fRow.getValue()))
{
fRow.setColSelect(true);
bFound = true;
}
}
if (!bFound)
{
fRow = form.grdFunctions().getRows().newRow();
if (voFunction.getFunctionIsNotNull())
fRow.setColName(voFunction.getFunction().getText());
fRow.setColSelect(true);
fRow.setValue(voFunction);
}
}
}
}
项目:openmaxims-linux
文件:Logic.java
private void selectionChange(ims.framework.controls.TreeNode node)
{
if ((node != null))
{
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setText("New " + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(false));
form.getContextMenus().getServiceActivityNEWSERVICEItem().setText("New " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false));
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setText("New " + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setText("Remove " + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false));
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setText("Remove " + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(false));
form.getContextMenus().getServiceActivityUPDATEItem().setText("Edit " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false));
if ((node.getValue() != null) && (node.getValue() instanceof ServiceVo))
{
form.getContextMenus().getServiceActivityLINKLOCItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(false);
form.getLocalContext().setSelectedRecordFunction(null);
form.getLocalContext().setSelectedRecordActivity(null);
populateInstanceControl((ServiceVo) node.getValue(), node);
form.getContextMenus().getServiceActivityUPDATEItem().setVisible(true);//WDEV-16508
}
else if (node.getValue() instanceof ServiceActivityVo)
{
form.getContextMenus().getServiceActivityLINKLOCItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setVisible(false);
// TODO with UI flag
// form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(true);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEItem().setVisible(false);
form.getLocalContext().setSelectedRecordFunction(null);
form.getLocalContext().setSelectedRecordActivity((ServiceActivityVo) node.getValue());
populateInstanceControl((ServiceVo) node.getParent().getValue(), node.getParent());
}
else if (node.getValue() instanceof ServiceFunctionVo)
{
form.getContextMenus().getServiceActivityLINKLOCItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(false);
// TODO with UI flag
// form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(true);
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEItem().setVisible(false);
form.getLocalContext().setSelectedRecordFunction((ServiceFunctionVo) node.getValue());
form.getLocalContext().setSelectedRecordActivity(null);
populateInstanceControl((ServiceVo) node.getParent().getValue(), node.getParent());
}
else
{
form.getContextMenus().getServiceActivityLINKLOCItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityNEWFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEACTIVITYItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEFUNCTIONItem().setVisible(false);
form.getContextMenus().getServiceActivityUPDATEItem().setVisible(false);
form.getLocalContext().setSelectedRecordFunction(null);
form.getLocalContext().setSelectedRecordActivity(null);
populateInstanceControl((ServiceVo) node.getParent().getValue(), node);
}
}
}
项目:openmaxims-linux
文件:LocationServiceImpl.java
public LocationServiceFunctionsVoCollection listLocationServiceFunction(LocationServiceVo voLocationService, ServiceFunctionVo voFunction)
{
DomainFactory factory = getDomainFactory();
if (voLocationService == null && voFunction == null)
return LocationServiceFunctionsVoAssembler.createLocationServiceFunctionsVoCollectionFromLocationServiceFunction(factory.listDomainObjects(LocationServiceFunction.class));
String hql = " from LocationService locSer ";
StringBuffer condStr = new StringBuffer();
String andStr = " ";
ArrayList markers = new ArrayList();
ArrayList values = new ArrayList();
if (voLocationService != null)
{
if (voLocationService.getID_LocationServiceIsNotNull())
{
condStr.append(andStr + " locSer.locationService.id = :locServiceId");
markers.add("locServiceId");
values.add(voLocationService.getID_LocationService());
andStr = " and ";
}
else if ((voLocationService.getLocationIsNotNull()) && (voLocationService.getLocation().getID_LocationIsNotNull()))
{
// filter by location
condStr.append(andStr + " locServiceActivity.locationService.location.id = :locId");
markers.add("locId");
values.add(voLocationService.getLocation().getID_Location());
andStr = " and ";
}
else if ((voLocationService.getServiceIsNotNull()) && (voLocationService.getService().getID_ServiceIsNotNull()))
{
// filter by location
condStr.append(andStr + " locServiceActivity.locationService.service.id = :serId");
markers.add("serId");
values.add(voLocationService.getService().getID_Service());
andStr = " and ";
}
}
if (voFunction != null)
{
// filter on Function
if (voFunction.getIsActiveIsNotNull())
{
condStr.append(andStr + " locServiceActivity.serviceFunction.isActive = :isActive");
markers.add("isActive");
values.add(voFunction.getIsActive());
andStr = " and ";
}
// filter Name
if (voFunction.getFunctionIsNotNull() && !voFunction.getID_ServiceFunctionIsNotNull())
{
condStr.append(andStr + " upper(locServiceActivity.serviceActivity.activity.name) like :functionName");
markers.add("functionName");
values.add("%" + voFunction.getFunction().getText().toUpperCase() + "%");
andStr = " and ";
}
else if (voFunction.getID_ServiceFunctionIsNotNull())
{
// filter by Activity
condStr.append(andStr + "locServiceActivity.serviceFunction.id = :serviceFunctionId");
markers.add("serviceFunctionId");
values.add(voFunction.getID_ServiceFunction());
andStr = " and ";
}
}
if (andStr.equals(" and "))
hql += " where ";
hql += condStr.toString();
return LocationServiceFunctionsVoAssembler.createLocationServiceFunctionsVoCollectionFromLocationServiceFunction(factory.find(hql, markers, values)).sort();
}