Examples of CustomerEntity


Examples of com.expositds.ars.dao.entity.user.CustomerEntity

  @Override
  public Customer updateCustomer(Customer customer) {
    Customer result = null;

    CustomerEntity customerEntity = DozerHelper.map(customer,
        CustomerEntity.class);
    customerEntity = customerRepository.merge(customerEntity);
    result = DozerHelper.map(customerEntity, Customer.class);

    return result;
View Full Code Here

Examples of com.expositds.ars.dao.entity.user.CustomerEntity

    return result;
  }

  @Override
  public void deleteCustomer(Customer customer) {
    CustomerEntity customerEntity = DozerHelper.map(customer,
        CustomerEntity.class);
    customerRepository.delete(customerEntity);
  }
View Full Code Here

Examples of com.expositds.ars.dao.entity.user.CustomerEntity

  @Override
  public Customer getCustomerById(Long id) {
    Customer result = null;

    CustomerEntity customerEntity = customerRepository.findById(id);
    result = DozerHelper.map(customerEntity, Customer.class);

    return result;
  }
View Full Code Here

Examples of com.expositds.ars.dao.entity.user.CustomerEntity

  @Override
  public Customer getCustomerByVehicleRegNo(String vehicleRegNo) {
    Customer result = null;

    CustomerEntity customerEntity = customerRepository
        .finByVehicleRegNo(vehicleRegNo);
    result = DozerHelper.map(customerEntity, Customer.class);

    return result;
  }
View Full Code Here

Examples of com.expositds.ars.dao.entity.user.CustomerEntity

    if (page != null) {
      position = (page - 1) * ORDERS_PER_PAGE;
      amount = ORDERS_PER_PAGE;
    }

    CustomerEntity customerEntity = DozerHelper.map(customer,
        CustomerEntity.class);

    List<OrderEntity> orderEntities = orderRepository.findByCustomer(
        customerEntity, status, amount, position);
    result = DozerHelper.mapList(orderEntities, Order.class);
View Full Code Here

Examples of com.expositds.ars.dao.entity.user.CustomerEntity

  @Override
  public List<Order> getLastOrders(Customer customer, int amount) {
    List<Order> result = null;

    CustomerEntity customerEntity = DozerHelper.map(customer,
        CustomerEntity.class);

    List<OrderEntity> orderEntities = orderRepository.findByCustomer(
        customerEntity, null, amount, null);
    result = DozerHelper.mapList(orderEntities, Order.class);
View Full Code Here

Examples of com.expositds.ars.dao.entity.user.CustomerEntity

    AbstractHibernateDao<CustomerEntity, Long> implements ICustomerDao {

  // TODO: test it
  @Override
  public CustomerEntity findByCar(CarEntity carEntity) {
    CustomerEntity result = null;

    Criteria cr = getSession().createCriteria(CustomerEntity.class).add(
        Restrictions.eq("cars", carEntity));
    result = findUniqueByCriteria(cr);
View Full Code Here

Examples of com.expositds.ars.dao.entity.user.CustomerEntity

    return result;
  }

  public CustomerEntity finByVehicleRegNo(String vehicleRegNo) {
    CustomerEntity result = null;

    Criteria cr = getSession().createCriteria(CustomerEntity.class)
        .createCriteria("cars")
        .add(Restrictions.eq("vehicleRegNo", vehicleRegNo));
    result = findUniqueByCriteria(cr);
View Full Code Here

Examples of com.expositds.ars.dao.entity.user.CustomerEntity

    log.info("Getting car entity and mapping car model.");
    CarEntity carEntity = carRepository.findByVehicleRegNo("AB2331");
    Car car = DozerHelper.map(carEntity, Car.class);

    log.info("Getting customer entity and mapping customer model.");
    CustomerEntity customerEntity = customerRepository.findById((long) 9);
    Customer customer = DozerHelper.mapAbstract(customerEntity);

    log.info("Getting subsidiary entity and mapping subsidiary model.");
    List<SubsidiaryEntity> subsidiaryEntity = null;
    subsidiaryEntity = subsidiaryRepository.findByName("ARS Grodno");
View Full Code Here

Examples of com.restfully.shop.persistence.CustomerEntity

   {
      entity.setId(order.getId());
      entity.setCancelled(order.isCancelled());
      entity.setDate(order.getDate());
      entity.setTotal(order.getTotal());
      CustomerEntity customerEntity = new CustomerEntity();
      CustomerResourceBean.domain2entity(customerEntity, order.getCustomer());
      entity.setCustomer(customerEntity);
      for (LineItem item : order.getLineItems())
      {
         LineItemEntity lineItem = new LineItemEntity();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.