public void check(Complex thing, boolean fix) { if(thing.getCellularLocation() != null) { Set<PhysicalEntity> ents = thing.getComponent(); if (ents != null) { Collection<String> comps = new HashSet<String>(); for (PhysicalEntity e : ents) { if (e.getCellularLocation() == null) { comps.add(e + " " + e.getCellularLocation()); } } if(!comps.isEmpty()) { error(thing, "component.no.location", false, thing.getCellularLocation().toString(), comps); } } } }
public void check(final Validation validation, Complex thing) { if(thing.getCellularLocation() != null) { Set<PhysicalEntity> ents = thing.getComponent(); if (ents != null) { Collection<String> comps = new HashSet<String>(); for (PhysicalEntity e : ents) { if (e.getCellularLocation() == null) { comps.add(e + " " + e.getCellularLocation()); } } if(!comps.isEmpty()) { error(validation, thing, "component.no.location", false, thing.getCellularLocation().toString(), comps); } } } }