protected PersistentCompoundQuantity doInvertSign(final PersistentCompoundQuantity q)
     throws PersistenceException {
   final PersistentCompoundQuantity cp = CompoundQuantity.createCompoundQuantity();
   final Iterator<PersistentQuantity> i = q.getParts().iterator();
   while (i.hasNext()) {
     final PersistentQuantity current = i.next();
     final PersistentQuantity invertedQuantity = this.doInvertSign(current);
     cp.getParts().add(invertedQuantity);
   }
   getThis().getQuantities().add(cp);
   return cp;
 }
 @Override
 public QuantitySearchList handleCompoundQuantity(
     final PersistentCompoundQuantity compoundQuantity) throws PersistenceException {
   final QuantitySearchList ret = new QuantitySearchList();
   final Iterator<PersistentQuantity> i = compoundQuantity.getParts().iterator();
   while (i.hasNext()) {
     final PersistentQuantity curQuantity = i.next();
     ret.add(curQuantity);
   }
   return ret;
 }
 @Override
 public PersistentAbsUnitType handleCompoundQuantity(
     final PersistentCompoundQuantity compoundQuantity) throws PersistenceException {
   return compoundQuantity.getParts().iterator().next().getUnit().getType();
 }