Examples of CorporateCustomerEntity


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

  @Override
  public CustomerEntity convertTo(Customer source, CustomerEntity destination) {
    CustomerEntity result = null;

    if (source instanceof CorporateCustomer) {
      CorporateCustomerEntity corporateCustomerEntity = new CorporateCustomerEntity();

      corporateCustomerEntity.setId(source.getId());
      corporateCustomerEntity.setApartment(source.getApartment());

      List<CarEntity> carEntities = DozerHelper.mapList(source.getCars(),
          CarEntity.class);
      corporateCustomerEntity.setCars(carEntities);

      corporateCustomerEntity.setCity(source.getCity());
      corporateCustomerEntity.setCompanyName(((CorporateCustomer) source)
          .getCompanyName());
      corporateCustomerEntity.setCountry(source.getCountry());
      corporateCustomerEntity.setEmail(source.getEmail());
      corporateCustomerEntity.setHouse(source.getHouse());
      corporateCustomerEntity.setHousing(source.getHousing());
      corporateCustomerEntity.setName(source.getName());
      corporateCustomerEntity.setPassword(source.getPassword());
      corporateCustomerEntity.setPatronymic(source.getPatronymic());
      corporateCustomerEntity.setPhone(source.getPhone());
      corporateCustomerEntity.setProvince(source.getProvince());
      corporateCustomerEntity.setRole(source.getRole());
      corporateCustomerEntity.setStreet(source.getStreet());
      corporateCustomerEntity.setSurname(source.getSurname());
      corporateCustomerEntity.setVatRegNo(((CorporateCustomer) source)
          .getVatRegNo());
      corporateCustomerEntity.setZip(source.getZip());

      result = corporateCustomerEntity;
    }

    if (source instanceof PersonalCustomer) {
View Full Code Here

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

  @Override
  public CorporateCustomer getCorporateCustomerByVatRegNo(String vatRegNo)
      throws WrongVatRegNoException {
    CorporateCustomer result = null;

    CorporateCustomerEntity corporateCustomerEntity = corporateCustomerRepository
        .findByVatRegNo(vatRegNo);
    result = DozerHelper.map(corporateCustomerEntity,
        CorporateCustomer.class);

    return result;
View Full Code Here

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

  }

  @Override
  public CorporateCustomerEntity findByVatRegNo(String vatRegNo)
      throws WrongVatRegNoException {
    CorporateCustomerEntity result = null;

    Criteria cr = getSession().createCriteria(
        CorporateCustomerEntity.class, "corporate_customers").add(
        Restrictions.eq("vatRegNo", vatRegNo));
    result = (CorporateCustomerEntity) cr.uniqueResult();
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.