Hello guys,
I'm newbie hibernate user, I want to create conditional logic in MyObjectManagerImpl.java saveMyObject() method when it is true, i won't save the object in the database and throw error message else i will call myObjectDao.saveMyObject(myObject); in MyObjectDaoHibernate.java in order to save it to database. That is the usual process, but im encountering problem even my Manager saveMyObject in MyObjectManagerImpl is empty it still save the object into database without calling the MyObjectDaoHibernate saveMyObject method.
Below is the code
public interface MyObjectManager {
public void saveMyObject(MyObject myObject);
}
///////////////////
public class MyObjectManagerImpl extends BaseManager implements MyObjectManager {
public void saveMyObject(MyObject myObject) {
myObjectDao.saveMyObject(myObject);
}
}
///////////////
public class MyObjectHibernate extends BaseDaoHibernate implements MyObject {
public void saveMyObject(MyObject myObject) {
getHibernateTemplate().saveOrUpdate(screener);
}
}
thanks in advanced
|