
org.beangle.commons.dao.impl.BaseServiceImpl Maven / Gradle / Ivy
The newest version!
/*
* Beangle, Agile Development Scaffold and Toolkits.
*
* Copyright © 2005, The Beangle Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
package org.beangle.commons.dao.impl;
import org.beangle.commons.dao.EntityDao;
import org.beangle.commons.event.Event;
import org.beangle.commons.event.EventMulticaster;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* Abstract BaseServiceImpl class.
*
*
* @author chaostone
* @version $Id: $
*/
public abstract class BaseServiceImpl {
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
protected EntityDao entityDao;
protected EventMulticaster eventMulticaster;
/**
*
* Getter for the field entityDao
.
*
*
* @return a {@link org.beangle.commons.dao.EntityDao} object.
*/
public EntityDao getEntityDao() {
return entityDao;
}
/**
*
* Setter for the field entityDao
.
*
*
* @param entityDao a {@link org.beangle.commons.dao.EntityDao} object.
*/
public void setEntityDao(EntityDao entityDao) {
this.entityDao = entityDao;
}
/**
*
* publish.
*
*
* @param e a {@link org.beangle.commons.event.Event} object.
*/
public void publish(Event e) {
if (null != eventMulticaster) eventMulticaster.multicast(e);
}
/**
*
* Getter for the field eventMulticaster
.
*
*
* @return a {@link org.beangle.commons.event.EventMulticaster} object.
*/
public EventMulticaster getEventMulticaster() {
return eventMulticaster;
}
/**
*
* Setter for the field eventMulticaster
.
*
*
* @param eventMulticaster a {@link org.beangle.commons.event.EventMulticaster} object.
*/
public void setEventMulticaster(EventMulticaster eventMulticaster) {
this.eventMulticaster = eventMulticaster;
}
}