Skip to content

Commit

Permalink
SalesOrderToOLCandViewFactory: return OLCandView when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed Nov 13, 2017
1 parent b7d3e4d commit 0a2489a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ public void put(final IView view)
}

@Override
public IView getByIdOrNull(final ViewId viewId)
public OLCandView getByIdOrNull(final ViewId viewId)
{
return views.getIfPresent(viewId);
}

public IView getById(final ViewId viewId)
public OLCandView getById(final ViewId viewId)
{
final IView view = getByIdOrNull(viewId);
final OLCandView view = getByIdOrNull(viewId);
if (view == null)
{
throw new EntityNotFoundException("View " + viewId + " was not found");
Expand Down Expand Up @@ -131,14 +131,14 @@ public void invalidateView(final ViewId viewId)
}

@Override
public IView createView(final CreateViewRequest request)
public OLCandView createView(final CreateViewRequest request)
{
return createView(OLCandViewCreateRequest.builder()
.salesOrderLineIds(request.getFilterOnlyIds())
.build());
}

private IView createView(final OLCandViewCreateRequest request)
private OLCandView createView(final OLCandViewCreateRequest request)
{
final OLCandView view = OLCandView.builder()
.viewId(ViewId.random(WINDOW_ID))
Expand Down

0 comments on commit 0a2489a

Please sign in to comment.