Package org.magicbox.service

Source Code of org.magicbox.service.PagesServiceImpl

/*
* Copyright Massimiliano Dess� (desmax74@yahoo.it)
*
* Licensed under Apache License Version 2.0
* (http://www.apache.org/licenses/LICENSE-2.0),
*
* for commercial use, under
* GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*/
package org.magicbox.service;

import java.util.List;

import org.magicbox.dao.PagesDao;
import org.magicbox.domain.PageImpl;
import org.magicbox.domain.PageLight;
import org.magicbox.domain.Page;

/**
* Implementazione Interfaccia gestione pagine
*
* @author Massimiliano Dess� (desmax74@yahoo.it)
* @since jdk 1.6.0
* @version 3.0
*/
public class PagesServiceImpl implements PagesService {

    public long savePage(Page page) {
        return page.isNew() ? pagesDao.inserisciPage(page) : pagesDao.aggiornaPage(page);
    }

    public List<PageLight> getPagesAdmin() {
        return pagesDao.getPagesAdmin();
    }

    public List<PageLight> getPagesCentro(long idcentro) {
        return pagesDao.getPagesCentro(idcentro);
    }

    public int aggiornaPage(Page page) {
        return pagesDao.aggiornaPage(page);
    }

    public boolean cancellaPage(long id) {
        return pagesDao.cancellaPage(id);
    }

    public Page getPage(long id) {
        return id == 0 ? new PageImpl() : pagesDao.getPage(id);
    }

    public List<PageLight> getPages() {
        return pagesDao.getPages();
    }

    public long inserisciPage(Page page) {
        return pagesDao.inserisciPage(page);
    }

    public void setPagesDao(PagesDao pagesDao) {
        this.pagesDao = pagesDao;
    }

    private PagesDao pagesDao;
}
TOP

Related Classes of org.magicbox.service.PagesServiceImpl

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.