Search in sources :

Example 1 with ImmutableAttributeSet

use of org.adempiere.mm.attributes.api.ImmutableAttributeSet in project metasfresh-webui-api by metasfresh.

the class ForecastLineQuickInputProcessor method createASI.

private static final int createASI(final ProductAndAttributes productAndAttributes) {
    final ImmutableAttributeSet attributes = productAndAttributes.getAttributes();
    if (attributes.isEmpty()) {
        return -1;
    }
    final IAttributeSetInstanceBL asiBL = Services.get(IAttributeSetInstanceBL.class);
    final I_M_AttributeSetInstance asi = asiBL.createASIWithASFromProductAndInsertAttributeSet(productAndAttributes.getProductId(), attributes);
    return asi.getM_AttributeSetInstance_ID();
}
Also used : IAttributeSetInstanceBL(org.adempiere.mm.attributes.api.IAttributeSetInstanceBL) ImmutableAttributeSet(org.adempiere.mm.attributes.api.ImmutableAttributeSet) I_M_AttributeSetInstance(org.compiere.model.I_M_AttributeSetInstance)

Example 2 with ImmutableAttributeSet

use of org.adempiere.mm.attributes.api.ImmutableAttributeSet in project metasfresh-webui-api by metasfresh.

the class OrderLineQuickInputProcessor method createASI.

private static final int createASI(final ProductAndAttributes productAndAttributes) {
    final ImmutableAttributeSet attributes = productAndAttributes.getAttributes();
    if (attributes.isEmpty()) {
        return -1;
    }
    final IAttributeSetInstanceBL asiBL = Services.get(IAttributeSetInstanceBL.class);
    final I_M_AttributeSetInstance asi = asiBL.createASIWithASFromProductAndInsertAttributeSet(productAndAttributes.getProductId(), attributes);
    return asi.getM_AttributeSetInstance_ID();
}
Also used : IAttributeSetInstanceBL(org.adempiere.mm.attributes.api.IAttributeSetInstanceBL) ImmutableAttributeSet(org.adempiere.mm.attributes.api.ImmutableAttributeSet) I_M_AttributeSetInstance(org.compiere.model.I_M_AttributeSetInstance)

Aggregations

IAttributeSetInstanceBL (org.adempiere.mm.attributes.api.IAttributeSetInstanceBL)2 ImmutableAttributeSet (org.adempiere.mm.attributes.api.ImmutableAttributeSet)2 I_M_AttributeSetInstance (org.compiere.model.I_M_AttributeSetInstance)2