Package com.expositds.ars.domain.order

Examples of com.expositds.ars.domain.order.Detail


    if (source instanceof DetailReplacement) {
      DetailReplacementEntity detailReplacementEntity = new DetailReplacementEntity();
      detailReplacementEntity.setId(source.getId());

      Detail detail = ((DetailReplacement) source).getDetail();
      DetailEntity detailEntity = DozerHelper.map(detail,
          DetailEntity.class);

      detailReplacementEntity.setDetail(detailEntity);
      detailReplacementEntity.setNote(source.getNote());
View Full Code Here


      DetailReplacement detailReplacement = new DetailReplacement();
      detailReplacement.setId(tmp.getId());

      DetailEntity detailEntity = ((DetailReplacementEntity) tmp)
          .getDetail();
      Detail detail = DozerHelper.map(detailEntity, Detail.class);

      detailReplacement.setDetail(detail);
      detailReplacement.setElapsedTime(tmp.getElapsedTime());
      detailReplacement.setNote(tmp.getNote());
      detailReplacement.setTotal(tmp.getTotal());
View Full Code Here

    return result;
  }

  @Override
  public Detail updateDetail(Detail detail) {
    Detail result = null;

    DetailEntity detailEntity = DozerHelper.map(detail, DetailEntity.class);
    detailEntity = detailRepository.merge(detailEntity);
    result = DozerHelper.map(detailEntity, Detail.class);
View Full Code Here

    detailRepository.delete(id);
  }

  @Override
  public Detail getDetailById(Long id) {
    Detail result = null;

    DetailEntity detailEntity = detailRepository.findById(id);
    result = DozerHelper.map(detailEntity, Detail.class);

    return result;
View Full Code Here

  // ============================ //

  @Override
  public Detail getDetailByInventoryNo(String inventoryNo)
      throws WrongInventoryNoException {
    Detail result = null;

    DetailEntity detailEntity = detailRepository
        .findByInventoryNo(inventoryNo);
    result = DozerHelper.map(detailEntity, Detail.class);
View Full Code Here

  private ISubsidiaryService subsidatyService;
 
  @Test
  public void addDetailTest() {
   
    Detail detail = new Detail("�����������", 10f);
    detail.setUsed(true);
    detail.setInventoryNo("00005465");
   
    Long id = detailService.addDetail(detail);
    detail = detailService.getDetailById(id);
    log.info(detail);
  }
View Full Code Here

  }
 
  @Test
  public void updateDetailTest() {
   
    Detail detail = detailService.getDetailById(new Long(1));
    detail.setPrice(51f);
   
    detail = detailService.updateDetail(detail);
    log.info(detail);
  }
View Full Code Here

  }
 
  @Test
  public void deleteDetailTest() {
   
    Detail detail = detailService.getDetailById(new Long(1));
    detailService.deleteDetail(detail);
    detailService.deleteDetailById(new Long(2));
  }
View Full Code Here

  }
 
  @Test
  public void getDetailByInventoryNoTest() {
   
    Detail detail;
    try {
      detail = detailService.getDetailByInventoryNo("0200000013");
      log.info(detail);
    } catch (WrongInventoryNoException e) {
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of com.expositds.ars.domain.order.Detail

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.