Package com.mustafaiev.tair.cts.model

Examples of com.mustafaiev.tair.cts.model.Purchase


  @Override
  public Purchase retrievePurchase(final Long id) {
    final Session session = this.hibernateTemplate.getSessionFactory()
        .openSession();
    Purchase purchase = null;
    try {
      purchase = (Purchase) session.get(Purchase.class, id);
    } catch (final HibernateException e) {
      LOGGER.error(e);
    }
View Full Code Here


    this.mapper = mapper;
  }

  @Override
  public void save(final PurchaseDTO dto) {
    final Purchase purchase = this.mapper.map(dto, Purchase.class);
    try {
      this.purchaseDao.doSave(purchase);
    } catch (final DataNotStoredException e) {
      LOGGER.error(e);
    }
View Full Code Here

  @Override
  public void saveBatch(final List<PurchaseDTO> purchases) {
    final List<Purchase> list = new ArrayList<Purchase>();
    for (final PurchaseDTO purchaseDTO : purchases) {
      final Purchase purchase = this.mapper.map(purchaseDTO,
          Purchase.class);
      list.add(purchase);
    }
    try {
      this.purchaseDao.saveBatch(list);
View Full Code Here

  @Override
  public void deleteBatch(final List<PurchaseDTO> purchases) {
    final List<Purchase> list = new ArrayList<Purchase>();
    for (final PurchaseDTO purchaseDTO : purchases) {
      final Purchase purchase = this.mapper.map(purchaseDTO,
          Purchase.class);
      list.add(purchase);
    }
    try {
      this.purchaseDao.deleteBatch(list);
View Full Code Here

    return purchaseDtos;
  }

  @Override
  public PurchaseDTO retrievePurchase(final Long id) {
    final Purchase purchase = this.purchaseDao.retrievePurchase(id);
    final PurchaseDTO dto = this.mapper.map(purchase, PurchaseDTO.class);
    return dto;
  }
View Full Code Here

TOP

Related Classes of com.mustafaiev.tair.cts.model.Purchase

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.