1. Java / Говнокод #15751

    +73

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    StartElement startElement = event.asStartElement();
    if(startElement.getName().getLocalPart().equals(REPORT)){
    	report = new Report();
    }else if (startElement.getName().getLocalPart().equals(CODE)){
    	event = eventReader.nextEvent();
    	report.setCode(event.asCharacters().getData());
    	continue;
    }else if(startElement.getName().getLocalPart().equals(SHORT_NAME)){
    	event = eventReader.nextEvent();
    	report.setShortName(event.asCharacters().getData());
    }else if(startElement.getName().getLocalPart().equals(NAME)){
    	event = eventReader.nextEvent();
    	report.setName(event.asCharacters().getData());
    	continue;
    }else if(startElement.getName().getLocalPart().equals(TYPE)){
    	event = eventReader.nextEvent();
    	report.setType(ReportType.valueOf(event.asCharacters().getData()));
    	continue;
    }else if(startElement.getName().getLocalPart().equals(CON_CMN_REPORT)){
    	event = eventReader.nextEvent();
    	String conRepCode = event.asCharacters().getData();
    	report.setConnectedCommonReport(getReportByCode(conRepCode, reports));
    	continue;
    }else if(startElement.getName().getLocalPart().equals(BEFORE)){
    	event = eventReader.nextEvent();
    	report.setAvaliableBefore(Boolean.valueOf(event.asCharacters().getData()));
    	continue;
    }else if(startElement.getName().getLocalPart().equals(QUANTITY)){
    	event = eventReader.nextEvent();
    	report.setQuantity(ReportQuantity.valueOf(event.asCharacters().getData()));
    	continue;
    }else if(startElement.getName().getLocalPart().equals(CREATOR_CLASS_NAME)){
    	event = eventReader.nextEvent();
    	report.setCreatorClassName(event.asCharacters().getData());
    }

    и не лень же было

    Запостил: evg_ever, 14 Апреля 2014

    Комментарии (1) RSS

    Добавить комментарий