use of de.metas.ui.web.material.adapter.AvailableToPromiseResultForWebui.Group.GroupBuilder in project metasfresh-webui-api by metasfresh.
the class AvailableToPromiseAdapter method createClientResultGroup0.
private Group createClientResultGroup0(final ResultGroup commonsResultGroup) {
final GroupBuilder groupBuilder = Group.builder().productId(commonsResultGroup.getProductId());
final Quantity quantity = Quantity.of(commonsResultGroup.getQty(), retrieveStockingUOM(commonsResultGroup.getProductId()));
groupBuilder.qty(quantity);
final AttributesKey attributesKey = commonsResultGroup.getStorageAttributesKey();
final Type type = extractType(attributesKey);
groupBuilder.type(type);
if (type == Type.ATTRIBUTE_SET) {
final List<I_M_AttributeValue> attributevalues = extractAttributeSetFromStorageAttributesKey(attributesKey);
groupBuilder.attributeValues(attributevalues);
}
return groupBuilder.build();
}
Aggregations