Ejemplo n.º 1
0
 @Override
 @Transactional(readOnly = true)
 public void loadUnitTypes() {
     List<UnitType> result = new ArrayList<UnitType>();
     for (UnitType each : unitTypeDAO.findAll()) {
         each.getMeasure();
         result.add(each);
     }
     this.unitTypes = result;
 }
  @Override
  public boolean isCurrentUnitType(Object assignment, UnitType unitType) {
    MaterialAssignmentTemplate material = (MaterialAssignmentTemplate) assignment;

    return ((material != null)
        && (material.getMaterial().getUnitType() != null)
        && (unitType.getId().equals(material.getMaterial().getUnitType().getId())));
  }