@Override
  public final SalesReturnLine process(
    final Map<String, Object> pAddParam,
      final SalesReturnLine pEntityPb,
        final IRequestData pRequestData) throws Exception {
    SalesReturnLine entity = this.prcAccEntityPbCopy
      .process(pAddParam, pEntityPb, pRequestData);
    if (entity.getReversedId() != null) {
      throw new ExceptionWithCode(ExceptionWithCode.FORBIDDEN,
        "attempt_to_reverse_reversed");
    }
    entity.setReversedId(pEntityPb.getItsId());
    entity.setItsQuantity(entity.getItsQuantity().negate());
    entity.setSubtotal(entity.getSubtotal().negate());
    entity.setTotalTaxes(entity.getTotalTaxes().negate());
    entity.setItsTotal(entity.getItsTotal().negate());
    return entity;
  }
@ Override public final SalesReturnLine process ( final Map < String , Object > pAddParam , final SalesReturnLine pEntityPb , final IRequestData pRequestData ) throws Exception { SalesReturnLine entity = this . prcAccEntityPbCopy . process ( pAddParam , pEntityPb , pRequestData ) ; if ( entity . getReversedId ( ) != null ) { throw new ExceptionWithCode ( ExceptionWithCode . FORBIDDEN , "attempt_to_reverse_reversed" ) ; } entity . setReversedId ( pEntityPb . getItsId ( ) ) ; entity . setItsQuantity ( entity . getItsQuantity ( ) . negate ( ) ) ; entity . setSubtotal ( entity . getSubtotal ( ) . negate ( ) ) ; entity . setTotalTaxes ( entity . getTotalTaxes ( ) . negate ( ) ) ; entity . setItsTotal ( entity . getItsTotal ( ) . negate ( ) ) ; return entity ; }
<p>Process entity request.</p>
@param pAddParam additional param, e.g. return this line's
document in "nextEntity" for farther process
@param pRequestData Request Data
@param pEntityPb Entity to process
@return Entity processed for farther process or null
@throws Exception - an exception