Package com.ateam.webstore.service.impl

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

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

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

import com.ateam.webstore.dao.CategoryDAO;
import com.ateam.webstore.model.Category;
import com.ateam.webstore.service.RepositoryService;

/**
* @author Hendrix Tavarez
*
*/
public class CategoryService implements RepositoryService<Category> {

  @Override
  public Category store(Category category) {
   
    CategoryDAO repository = new CategoryDAO();
    return repository.save(category);
  }

  @Override
  public void remove(Category category) {
   
    CategoryDAO repository = new CategoryDAO();
    repository.delete(category);
   
  }

  @Override
  public Collection<Category> getAll() {
   
    CategoryDAO repository = new CategoryDAO();
    return repository.getAll();
  }

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

}
TOP

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

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.