Package com.ateam.webstore.service.impl

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

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

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

import com.ateam.webstore.dao.SubCategoryDAO;
import com.ateam.webstore.model.SubCategory;
import com.ateam.webstore.service.RepositoryService;

/**
* @author Hendrix Tavarez
*
*/
public class SubCategoryService implements RepositoryService<SubCategory> {

  @Override
  public SubCategory store(SubCategory subCategory) {
   
    SubCategoryDAO repository = new SubCategoryDAO();
    return repository.save(subCategory);
  }

  @Override
  public void remove(SubCategory subCategory) {
   
    SubCategoryDAO repository = new SubCategoryDAO();
    repository.delete(subCategory);
   
  }

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

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

}
TOP

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

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.