Created
July 14, 2011 19:47
-
-
Save bittersweetryan/1083275 to your computer and use it in GitHub Desktop.
Maybe the worst code I've come across.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (contractApproval.getRegionID() != null) { | |
List regionList = service.getRegionList(); | |
for (Iterator it = regionList.iterator(); it.hasNext();) { | |
KeyValuePair keyValuePair = (KeyValuePair) it.next(); | |
String id = keyValuePair.getId(); | |
String desc = keyValuePair.getDescription(); | |
if (id.equalsIgnoreCase(String.valueOf(contractApproval.getRegionID()))) { | |
contractApproval.setRegionName(desc); | |
break; | |
} | |
} | |
} | |
List projectAuthorityList = service.getCountyList(); | |
for (Iterator it = projectAuthorityList.iterator(); it.hasNext();) { | |
KeyValuePair keyValuePair = (KeyValuePair) it.next(); | |
String id = keyValuePair.getId(); | |
String desc = keyValuePair.getDescription(); | |
if (id.equalsIgnoreCase(String.valueOf(contractApproval.getProjectAuthID()))) { | |
contractApproval.setCountyName(desc); | |
break; | |
} | |
} | |
List projectManagerIndcList = service.getProjectManagerList(); | |
for (Iterator it = projectManagerIndcList.iterator(); it.hasNext();) { | |
KeyValuePair keyValuePair = (KeyValuePair) it.next(); | |
String id = keyValuePair.getId(); | |
String name = keyValuePair.getDescription(); | |
if (id.equalsIgnoreCase(String.valueOf(contractApproval.getProjectManagerIndc()))) { | |
contractApproval.setProjectManagerName(name); | |
break; | |
} | |
} | |
List contractTypeList = service.getContractTypeList(); | |
for (Iterator it = contractTypeList.iterator(); it.hasNext();) { | |
KeyValuePair keyValuePair = (KeyValuePair) it.next(); | |
String id = keyValuePair.getId(); | |
String name = keyValuePair.getDescription(); | |
if (id.equalsIgnoreCase(String.valueOf(contractApproval.getApprovalContractTypeLkupID()))) { | |
contractApproval.setContractTypeName(name); | |
break; | |
} | |
} | |
List stateList = service.getStateList(); | |
for (Iterator it = stateList.iterator(); it.hasNext();) { | |
KeyValuePair keyValuePair = (KeyValuePair) it.next(); | |
String id = keyValuePair.getId(); | |
String name = keyValuePair.getDescription(); | |
if (id.equalsIgnoreCase(String.valueOf(contractApproval.getStateID()))) { | |
contractApproval.setStateName(name); | |
break; | |
} | |
} | |
List approvalOriginList = service.getApprovalOriginList(); | |
for (Iterator it = approvalOriginList.iterator(); it.hasNext();) { | |
KeyValuePair keyValuePair = (KeyValuePair) it.next(); | |
String id = keyValuePair.getId(); | |
String name = keyValuePair.getDescription(); | |
if (id.equalsIgnoreCase(String.valueOf(contractApproval | |
.getApprovalOriginID()))) { | |
contractApproval.setApprovalOriginName(name); | |
break; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment