Skip to content

Commit

Permalink
HUEditorRow.rowIdToM_HU_ID(rowId)
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed Jul 22, 2017
1 parent c358176 commit 21e522b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/de/metas/ui/web/handlingunits/HUEditorRow.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import javax.annotation.Nullable;

import org.adempiere.ad.trx.api.ITrx;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.model.InterfaceWrapperHelper;
import org.adempiere.util.Check;
import org.compiere.model.I_C_UOM;
Expand Down Expand Up @@ -100,6 +101,11 @@ public static Set<Integer> rowIdsToM_HU_IDs(final Collection<DocumentId> rowIds)
return DocumentIdsSelection.of(rowIds).toIntSet();
}

public static int rowIdToM_HU_ID(@NonNull final DocumentId rowId)
{
return rowId.toIntOrThrow(() -> new AdempiereException("Cannot convert rowId=" + rowId + " to huId"));
}

static final int HUSTATUS_AD_Reference_ID = X_M_HU.HUSTATUS_AD_Reference_ID;

private final DocumentPath documentPath;
Expand Down

0 comments on commit 21e522b

Please sign in to comment.