Advertisement
Guest User

Untitled

a guest
May 29th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. public void showAllUserLoans(){
  2. myFinal.clear();
  3. allStar = servletMethods.getAllLogEntriesForAllUser();
  4. allEquipments = servletMethods.getEquipment("IN_USE");
  5.  
  6. for(UserLogEntries userLogEntries : allStar){
  7. Boolean isEmpty = userLogEntries.getLogEntries().isEmpty();
  8. if (!isEmpty) {
  9. List<LogEntry> temp = userLogEntries.getLogEntries();
  10.  
  11. for (LogEntry logEntry : temp) {
  12. int equipment_id = logEntry.getE_id();
  13.  
  14. for (Equipment equipment : allEquipments) {
  15. if (equipment_id == equipment.getE_id()) {
  16. CombinedEquipment test = new CombinedEquipment(equipment_id, userLogEntries.getUser(), equipment, logEntry.getOut(), logEntry.getIn(), logEntry.getComment());
  17. myFinal.add(test);
  18. }
  19. }
  20. }
  21. }
  22.  
  23. }
  24. if(myFinal.size()!=0) {
  25. customListAdapterMyLoans customListAdapter = new customListAdapterMyLoans(this.getActivity(), myFinal,index);
  26. setListAdapter(customListAdapter);
  27. }
  28.  
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement