Package com.ateam.webstore.service.impl

Source Code of com.ateam.webstore.service.impl.BrandService

/**
*
*/
package com.ateam.webstore.service.impl;

import java.io.Serializable;
import java.util.Collection;

import com.ateam.webstore.dao.BrandDAO;
import com.ateam.webstore.model.Brand;
import com.ateam.webstore.service.RepositoryService;

/**
* @author Hendrix Tavarez
*
*/
public class BrandService implements RepositoryService<Brand> {

  @Override
  public Brand store(Brand brand) {
   
    BrandDAO repository = new BrandDAO();
    return repository.save(brand);
   
  }

  @Override
  public void remove(Brand brand) {

    BrandDAO repository = new BrandDAO();
    repository.delete(brand);
  }

  @Override
  public Collection<Brand> getAll() {

    BrandDAO repository = new BrandDAO();
    return repository.getAll();
   
  }

  @Override
  public Brand getById(Serializable id) {
    BrandDAO repository = new BrandDAO();
    return repository.get(id);
  }

}
TOP

Related Classes of com.ateam.webstore.service.impl.BrandService

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.