Update of /cvsroot/oscarmcmaster/oscar_mcmaster/web/WEB-INF/classes/src/com/quatro/dao/security
In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv9458/web/WEB-INF/classes/src/com/quatro/dao/security
Modified Files:
SecurityDao.java SecroleDao.java SecProviderDao.java
SecobjprivilegeDao.java SecuserroleDao.java
Log Message:
changed all the logManager calls to MiscUtils.getLogger()
Index: SecurityDao.java
===================================================================
RCS file: /cvsroot/oscarmcmaster/oscar_mcmaster/web/WEB-INF/classes/src/com/quatro/dao/security/SecurityDao.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SecurityDao.java 23 Jun 2009 18:35:38 -0000 1.3
--- SecurityDao.java 10 Nov 2010 11:15:58 -0000 1.4
***************
*** 14,24 ****
import org.apache.commons.lang.StringEscapeUtils;
- import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
- import org.hibernate.Criteria;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
! //import org.oscarehr.PMmodule.model.Demographic;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
--- 14,22 ----
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.log4j.Logger;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
! import org.oscarehr.util.MiscUtils;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
***************
*** 33,37 ****
public class SecurityDao extends HibernateDaoSupport {
! private static final Logger log = LogManager.getLogger(SecurityDao.class);
// property constants
public static final String USER_NAME = "userName";
--- 31,35 ----
public class SecurityDao extends HibernateDaoSupport {
! private static final Logger logger = MiscUtils.getLogger();
// property constants
public static final String USER_NAME = "userName";
***************
*** 46,50 ****
public List getProfile(String providerNo) {
! log.debug("All User list");
try {
// String queryString = "select securityNo, userName, providerNo from Security";
--- 44,48 ----
public List getProfile(String providerNo) {
! logger.debug("All User list");
try {
// String queryString = "select securityNo, userName, providerNo from Security";
***************
*** 64,68 ****
return this.getHibernateTemplate().find(queryString);
} catch (RuntimeException re) {
! log.error("find All User list failed", re);
throw re;
}
--- 62,66 ----
return this.getHibernateTemplate().find(queryString);
} catch (RuntimeException re) {
! logger.error("find All User list failed", re);
throw re;
}
***************
*** 70,74 ****
public List getAllUsers() {
! log.debug("All User list");
try {
// String queryString = "select securityNo, userName, providerNo from Security";
--- 68,72 ----
public List getAllUsers() {
! logger.debug("All User list");
try {
// String queryString = "select securityNo, userName, providerNo from Security";
***************
*** 80,84 ****
return this.getHibernateTemplate().find(queryString);
} catch (RuntimeException re) {
! log.error("find All User list failed", re);
throw re;
}
--- 78,82 ----
return this.getHibernateTemplate().find(queryString);
} catch (RuntimeException re) {
! logger.error("find All User list failed", re);
throw re;
}
***************
*** 86,90 ****
public List search(UserSearchFormBean bean) {
! log.debug("User search");
try {
--- 84,88 ----
public List search(UserSearchFormBean bean) {
! logger.debug("User search");
try {
***************
*** 177,181 ****
} catch (RuntimeException re) {
! log.error("User search failed", re);
throw re;
}
--- 175,179 ----
} catch (RuntimeException re) {
! logger.error("User search failed", re);
throw re;
}
***************
*** 184,193 ****
public void save(Security transientInstance) {
! log.debug("saving Security instance");
try {
this.getHibernateTemplate().save(transientInstance);
! log.debug("save successful");
} catch (RuntimeException re) {
! log.error("save failed", re);
throw re;
}
--- 182,191 ----
public void save(Security transientInstance) {
! logger.debug("saving Security instance");
try {
this.getHibernateTemplate().save(transientInstance);
! logger.debug("save successful");
} catch (RuntimeException re) {
! logger.error("save failed", re);
throw re;
}
***************
*** 195,204 ****
public void saveOrUpdate(Security transientInstance) {
! log.debug("saving/update Security instance");
try {
this.getHibernateTemplate().saveOrUpdate(transientInstance);
! log.debug("save/update successful");
} catch (RuntimeException re) {
! log.error("save/update failed", re);
throw re;
}
--- 193,202 ----
public void saveOrUpdate(Security transientInstance) {
! logger.debug("saving/update Security instance");
try {
this.getHibernateTemplate().saveOrUpdate(transientInstance);
! logger.debug("save/update successful");
} catch (RuntimeException re) {
! logger.error("save/update failed", re);
throw re;
}
***************
*** 206,215 ****
public void delete(Security persistentInstance) {
! log.debug("deleting Security instance");
try {
this.getHibernateTemplate().delete(persistentInstance);
! log.debug("delete successful");
} catch (RuntimeException re) {
! log.error("delete failed", re);
throw re;
}
--- 204,213 ----
public void delete(Security persistentInstance) {
! logger.debug("deleting Security instance");
try {
this.getHibernateTemplate().delete(persistentInstance);
! logger.debug("delete successful");
} catch (RuntimeException re) {
! logger.error("delete failed", re);
throw re;
}
***************
*** 217,221 ****
public Security findById(java.lang.Integer id) {
! log.debug("getting Security instance with id: " + id);
try {
Security instance = (Security) this.getHibernateTemplate().get(
--- 215,219 ----
public Security findById(java.lang.Integer id) {
! logger.debug("getting Security instance with id: " + id);
try {
Security instance = (Security) this.getHibernateTemplate().get(
***************
*** 223,227 ****
return instance;
} catch (RuntimeException re) {
! log.error("get failed", re);
throw re;
}
--- 221,225 ----
return instance;
} catch (RuntimeException re) {
! logger.error("get failed", re);
throw re;
}
***************
*** 229,242 ****
public List findByExample(Security instance) {
! log.debug("finding Security instance by example");
try {
List results = getSession().createCriteria(
"com.quatro.model.security.Security").add(
Example.create(instance)).list();
! log.debug("find by example successful, result size: "
+ results.size());
return results;
} catch (RuntimeException re) {
! log.error("find by example failed", re);
throw re;
}
--- 227,240 ----
public List findByExample(Security instance) {
! logger.debug("finding Security instance by example");
try {
List results = getSession().createCriteria(
"com.quatro.model.security.Security").add(
Example.create(instance)).list();
! logger.debug("find by example successful, result size: "
+ results.size());
return results;
} catch (RuntimeException re) {
! logger.error("find by example failed", re);
throw re;
}
***************
*** 244,248 ****
public List findByProperty(String propertyName, Object value) {
! log.debug("finding Security instance with property: " + propertyName
+ ", value: " + value);
try {
--- 242,246 ----
public List findByProperty(String propertyName, Object value) {
! logger.debug("finding Security instance with property: " + propertyName
+ ", value: " + value);
try {
***************
*** 253,257 ****
return queryObject.list();
} catch (RuntimeException re) {
! log.error("find by property name failed", re);
throw re;
}
--- 251,255 ----
return queryObject.list();
} catch (RuntimeException re) {
! logger.error("find by property name failed", re);
throw re;
}
***************
*** 285,289 ****
public List findAll() {
! log.debug("finding all Security instances");
try {
String queryString = "from Security";
--- 283,287 ----
public List findAll() {
! logger.debug("finding all Security instances");
try {
String queryString = "from Security";
***************
*** 291,295 ****
return queryObject.list();
} catch (RuntimeException re) {
! log.error("find all failed", re);
throw re;
}
--- 289,293 ----
return queryObject.list();
} catch (RuntimeException re) {
! logger.error("find all failed", re);
throw re;
}
***************
*** 297,307 ****
public Security merge(Security detachedInstance) {
! log.debug("merging Security instance");
try {
Security result = (Security) getSession().merge(detachedInstance);
! log.debug("merge successful");
return result;
} catch (RuntimeException re) {
! log.error("merge failed", re);
throw re;
}
--- 295,305 ----
public Security merge(Security detachedInstance) {
! logger.debug("merging Security instance");
try {
Security result = (Security) getSession().merge(detachedInstance);
! logger.debug("merge successful");
return result;
} catch (RuntimeException re) {
! logger.error("merge failed", re);
throw re;
}
***************
*** 309,318 ****
public void attachDirty(Security instance) {
! log.debug("attaching dirty Security instance");
try {
getSession().saveOrUpdate(instance);
! log.debug("attach successful");
} catch (RuntimeException re) {
! log.error("attach failed", re);
throw re;
}
--- 307,316 ----
public void attachDirty(Security instance) {
! logger.debug("attaching dirty Security instance");
try {
getSession().saveOrUpdate(instance);
! logger.debug("attach successful");
} catch (RuntimeException re) {
! logger.error("attach failed", re);
throw re;
}
***************
*** 320,329 ****
public void attachClean(Security instance) {
! log.debug("attaching clean Security instance");
try {
getSession().lock(instance, LockMode.NONE);
! log.debug("attach successful");
} catch (RuntimeException re) {
! log.error("attach failed", re);
throw re;
}
--- 318,327 ----
public void attachClean(Security instance) {
! logger.debug("attaching clean Security instance");
try {
getSession().lock(instance, LockMode.NONE);
! logger.debug("attach successful");
} catch (RuntimeException re) {
! logger.error("attach failed", re);
throw re;
}
Index: SecProviderDao.java
===================================================================
RCS file: /cvsroot/oscarmcmaster/oscar_mcmaster/web/WEB-INF/classes/src/com/quatro/dao/security/SecProviderDao.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SecProviderDao.java 23 Jun 2009 18:35:38 -0000 1.3
--- SecProviderDao.java 10 Nov 2010 11:15:58 -0000 1.4
***************
*** 13,22 ****
import java.util.List;
- import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
! import org.oscarehr.PMmodule.model.Admission;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
--- 13,21 ----
import java.util.List;
import org.apache.log4j.Logger;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
! import org.oscarehr.util.MiscUtils;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
***************
*** 30,34 ****
public class SecProviderDao extends HibernateDaoSupport {
! private static final Logger log = LogManager.getLogger(SecProviderDao.class);
// property constants
public static final String LAST_NAME = "lastName";
--- 29,33 ----
public class SecProviderDao extends HibernateDaoSupport {
! private static final Logger logger = MiscUtils.getLogger();
// property constants
public static final String LAST_NAME = "lastName";
***************
*** 50,59 ****
public void save(SecProvider transientInstance) {
! log.debug("saving Provider instance");
try {
this.getHibernateTemplate().save(transientInstance);
! log.debug("save successful");
} catch (RuntimeException re) {
! log.error("save failed", re);
throw re;
}
--- 49,58 ----
public void save(SecProvider transientInstance) {
! logger.debug("saving Provider instance");
try {
this.getHibernateTemplate().save(transientInstance);
! logger.debug("save successful");
} catch (RuntimeException re) {
! logger.error("save failed", re);
throw re;
}
***************
*** 61,80 ****
public void saveOrUpdate(SecProvider transientInstance) {
! log.debug("saving Provider instance");
try {
this.getHibernateTemplate().saveOrUpdate(transientInstance);
! log.debug("save successful");
} catch (RuntimeException re) {
! log.error("save failed", re);
throw re;
}
}
public void delete(SecProvider persistentInstance) {
! log.debug("deleting Provider instance");
try {
this.getHibernateTemplate().delete(persistentInstance);
! log.debug("delete successful");
} catch (RuntimeException re) {
! log.error("delete failed", re);
throw re;
}
--- 60,79 ----
public void saveOrUpdate(SecProvider transientInstance) {
! logger.debug("saving Provider instance");
try {
this.getHibernateTemplate().saveOrUpdate(transientInstance);
! logger.debug("save successful");
} catch (RuntimeException re) {
! logger.error("save failed", re);
throw re;
}
}
public void delete(SecProvider persistentInstance) {
! logger.debug("deleting Provider instance");
try {
this.getHibernateTemplate().delete(persistentInstance);
! logger.debug("delete successful");
} catch (RuntimeException re) {
! logger.error("delete failed", re);
throw re;
}
***************
*** 82,86 ****
public SecProvider findById(java.lang.String id) {
! log.debug("getting Provider instance with id: " + id);
try {
SecProvider instance = (SecProvider) this.getHibernateTemplate().get(
--- 81,85 ----
public SecProvider findById(java.lang.String id) {
! logger.debug("getting Provider instance with id: " + id);
try {
SecProvider instance = (SecProvider) this.getHibernateTemplate().get(
***************
*** 88,97 ****
return instance;
} catch (RuntimeException re) {
! log.error("get failed", re);
throw re;
}
}
public SecProvider findById(java.lang.String id,String status) {
! log.debug("getting Provider instance with id: " + id);
try {
String sql ="from SecProvider where id=? and status=?";
--- 87,96 ----
return instance;
} catch (RuntimeException re) {
! logger.error("get failed", re);
throw re;
}
}
public SecProvider findById(java.lang.String id,String status) {
! logger.debug("getting Provider instance with id: " + id);
try {
String sql ="from SecProvider where id=? and status=?";
***************
*** 103,107 ****
} catch (RuntimeException re) {
! log.error("get failed", re);
throw re;
}
--- 102,106 ----
} catch (RuntimeException re) {
! logger.error("get failed", re);
throw re;
}
***************
*** 109,122 ****
public List findByExample(SecProviderDao instance) {
! log.debug("finding Provider instance by example");
try {
List results = getSession().createCriteria(
"com.quatro.model.security.SecProvider").add(
Example.create(instance)).list();
! log.debug("find by example successful, result size: "
+ results.size());
return results;
} catch (RuntimeException re) {
! log.error("find by example failed", re);
throw re;
}
--- 108,121 ----
public List findByExample(SecProviderDao instance) {
! logger.debug("finding Provider instance by example");
try {
List results = getSession().createCriteria(
"com.quatro.model.security.SecProvider").add(
Example.create(instance)).list();
! logger.debug("find by example successful, result size: "
+ results.size());
return results;
} catch (RuntimeException re) {
! logger.error("find by example failed", re);
throw re;
}
***************
*** 124,128 ****
public List findByProperty(String propertyName, Object value) {
! log.debug("finding Provider instance with property: " + propertyName
+ ", value: " + value);
try {
--- 123,127 ----
public List findByProperty(String propertyName, Object value) {
! logger.debug("finding Provider instance with property: " + propertyName
+ ", value: " + value);
try {
***************
*** 133,137 ****
return queryObject.list();
} catch (RuntimeException re) {
! log.error("find by property name failed", re);
throw re;
}
--- 132,136 ----
return queryObject.list();
} catch (RuntimeException re) {
! logger.error("find by property name failed", re);
throw re;
}
***************
*** 203,207 ****
public List findAll() {
! log.debug("finding all Provider instances");
try {
String queryString = "from Provider";
--- 202,206 ----
public List findAll() {
! logger.debug("finding all Provider instances");
try {
String queryString = "from Provider";
***************
*** 209,213 ****
return queryObject.list();
} catch (RuntimeException re) {
! log.error("find all failed", re);
throw re;
}
--- 208,212 ----
return queryObject.list();
} catch (RuntimeException re) {
! logger.error("find all failed", re);
throw re;
}
***************
*** 215,225 ****
public SecProviderDao merge(SecProviderDao detachedInstance) {
! log.debug("merging Provider instance");
try {
SecProviderDao result = (SecProviderDao) getSession().merge(detachedInstance);
! log.debug("merge successful");
return result;
} catch (RuntimeException re) {
! log.error("merge failed", re);
throw re;
}
--- 214,224 ----
public SecProviderDao merge(SecProviderDao detachedInstance) {
! logger.debug("merging Provider instance");
try {
SecProviderDao result = (SecProviderDao) getSession().merge(detachedInstance);
! logger.debug("merge successful");
return result;
} catch (RuntimeException re) {
! logger.error("merge failed", re);
throw re;
}
***************
*** 227,236 ****
public void attachDirty(SecProviderDao instance) {
! log.debug("attaching dirty Provider instance");
try {
getSession().saveOrUpdate(instance);
! log.debug("attach successful");
} catch (RuntimeException re) {
! log.error("attach failed", re);
throw re;
}
--- 226,235 ----
public void attachDirty(SecProviderDao instance) {
! logger.debug("attaching dirty Provider instance");
try {
getSession().saveOrUpdate(instance);
! logger.debug("attach successful");
} catch (RuntimeException re) {
! logger.error("attach failed", re);
throw re;
}
***************
*** 238,247 ****
public void attachClean(SecProviderDao instance) {
! log.debug("attaching clean Provider instance");
try {
getSession().lock(instance, LockMode.NONE);
! log.debug("attach successful");
} catch (RuntimeException re) {
! log.error("attach failed", re);
throw re;
}
--- 237,246 ----
public void attachClean(SecProviderDao instance) {
! logger.debug("attaching clean Provider instance");
try {
getSession().lock(instance, LockMode.NONE);
! logger.debug("attach successful");
} catch (RuntimeException re) {
! logger.error("attach failed", re);
throw re;
}
Index: SecobjprivilegeDao.java
===================================================================
RCS file: /cvsroot/oscarmcmaster/oscar_mcmaster/web/WEB-INF/classes/src/com/quatro/dao/security/SecobjprivilegeDao.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SecobjprivilegeDao.java 23 Jun 2009 18:35:38 -0000 1.3
--- SecobjprivilegeDao.java 10 Nov 2010 11:15:58 -0000 1.4
***************
*** 24,31 ****
import java.util.List;
- import org.apache.log4j.LogManager;
- import org.apache.log4j.Logger;
import org.hibernate.Query;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
--- 24,31 ----
import java.util.List;
+ import org.apache.log4j.Logger;
import org.hibernate.Query;
+ import org.oscarehr.util.MiscUtils;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
***************
*** 34,38 ****
public class SecobjprivilegeDao extends HibernateDaoSupport {
! private Logger log = LogManager.getLogger(SecobjprivilegeDao.class);
--- 34,38 ----
public class SecobjprivilegeDao extends HibernateDaoSupport {
! private Logger logger = MiscUtils.getLogger();
***************
*** 44,54 ****
getHibernateTemplate().saveOrUpdate(secobjprivilege);
! if (log.isDebugEnabled()) {
! log.debug("SecobjprivilegeDao : save: " + secobjprivilege.getRoleusergroup() + ":" + secobjprivilege.getObjectname_desc());
}
}
public void saveAll(List list) {
! log.debug("saving ALL Secobjprivilege instances");
try {
for(int i =0; i< list.size(); i++){
--- 44,54 ----
getHibernateTemplate().saveOrUpdate(secobjprivilege);
! if (logger.isDebugEnabled()) {
! logger.debug("SecobjprivilegeDao : save: " + secobjprivilege.getRoleusergroup() + ":" + secobjprivilege.getObjectname_desc());
}
}
public void saveAll(List list) {
! logger.debug("saving ALL Secobjprivilege instances");
try {
for(int i =0; i< list.size(); i++){
***************
*** 63,74 ****
}
! log.debug("save ALL successful");
} catch (RuntimeException re) {
! log.error("save ALL failed", re);
throw re;
}
}
public int update(Secobjprivilege instance) {
! log.debug("update Secobjprivilege instance");
try {
String queryString = "update Secobjprivilege as model set model.providerNo ='" + instance.getProviderNo() + "'"
--- 63,74 ----
}
! logger.debug("save ALL successful");
} catch (RuntimeException re) {
! logger.error("save ALL failed", re);
throw re;
}
}
public int update(Secobjprivilege instance) {
! logger.debug("update Secobjprivilege instance");
try {
String queryString = "update Secobjprivilege as model set model.providerNo ='" + instance.getProviderNo() + "'"
***************
*** 82,91 ****
} catch (RuntimeException re) {
! log.error("Update failed", re);
throw re;
}
}
public int deleteByRoleName(String roleName) {
! log.debug("deleting Secobjprivilege by roleName");
try {
--- 82,91 ----
} catch (RuntimeException re) {
! logger.error("Update failed", re);
throw re;
}
}
public int deleteByRoleName(String roleName) {
! logger.debug("deleting Secobjprivilege by roleName");
try {
***************
*** 93,108 ****
} catch (RuntimeException re) {
! log.error("delete failed", re);
throw re;
}
}
public void delete(Secobjprivilege persistentInstance) {
! log.debug("deleting Secobjprivilege instance");
try {
//getSession().delete(persistentInstance);
getHibernateTemplate().delete(persistentInstance);
! log.debug("delete successful");
} catch (RuntimeException re) {
! log.error("delete failed", re);
throw re;
}
--- 93,108 ----
} catch (RuntimeException re) {
! logger.error("delete failed", re);
throw re;
}
}
public void delete(Secobjprivilege persistentInstance) {
! logger.debug("deleting Secobjprivilege instance");
try {
//getSession().delete(persistentInstance);
getHibernateTemplate().delete(persistentInstance);
! logger.debug("delete successful");
} catch (RuntimeException re) {
! logger.error("delete failed", re);
throw re;
}
***************
*** 118,122 ****
return "";
} catch (RuntimeException re) {
! log.error("find by property name failed", re);
throw re;
}
--- 118,122 ----
return "";
} catch (RuntimeException re) {
! logger.error("find by property name failed", re);
throw re;
}
***************
*** 132,136 ****
return "";
} catch (RuntimeException re) {
! log.error("find by property name failed", re);
throw re;
}
--- 132,136 ----
return "";
} catch (RuntimeException re) {
! logger.error("find by property name failed", re);
throw re;
}
***************
*** 142,152 ****
List result = findByProperty("roleusergroup", roleName);
! if (log.isDebugEnabled()) {
! log.debug("SecobjprivilegeDao : getFunctions: ");
}
return result;
}
public List findByProperty(String propertyName, Object value) {
! log.debug("finding Secobjprivilege instance with property: " + propertyName
+ ", value: " + value);
try {
--- 142,152 ----
List result = findByProperty("roleusergroup", roleName);
! if (logger.isDebugEnabled()) {
! logger.debug("SecobjprivilegeDao : getFunctions: ");
}
return result;
}
public List findByProperty(String propertyName, Object value) {
! logger.debug("finding Secobjprivilege instance with property: " + propertyName
+ ", value: " + value);
try {
***************
*** 157,161 ****
return queryObject.list();
} catch (RuntimeException re) {
! log.error("find by property name failed", re);
throw re;
}
--- 157,161 ----
return queryObject.list();
} catch (RuntimeException re) {
! logger.error("find by property name failed", re);
throw re;
}
Index: SecroleDao.java
===================================================================
RCS file: /cvsroot/oscarmcmaster/oscar_mcmaster/web/WEB-INF/classes/src/com/quatro/dao/security/SecroleDao.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SecroleDao.java 13 Oct 2009 20:55:06 -0000 1.4
--- SecroleDao.java 10 Nov 2010 11:15:58 -0000 1.5
***************
*** 23,31 ****
package com.quatro.dao.security;
- import java.util.ArrayList;
import java.util.List;
- import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
--- 23,30 ----
package com.quatro.dao.security;
import java.util.List;
import org.apache.log4j.Logger;
+ import org.oscarehr.util.MiscUtils;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
***************
*** 34,43 ****
public class SecroleDao extends HibernateDaoSupport {
! private Logger log = LogManager.getLogger(SecroleDao.class);
public List getRoles() {
List results = this.getHibernateTemplate().find("from Secrole r order by roleName");
! log.debug("getRoles: # of results=" + results.size());
return results;
--- 33,42 ----
public class SecroleDao extends HibernateDaoSupport {
! private Logger logger = MiscUtils.getLogger();
public List getRoles() {
List results = this.getHibernateTemplate().find("from Secrole r order by roleName");
! logger.debug("getRoles: # of results=" + results.size());
return results;
***************
*** 51,55 ****
Secrole result = (Secrole) this.getHibernateTemplate().get(Secrole.class, new Long(id));
! log.debug("getRole: id=" + id + ",found=" + (result != null));
return result;
--- 50,54 ----
Secrole result = (Secrole) this.getHibernateTemplate().get(Secrole.class, new Long(id));
! logger.debug("getRole: id=" + id + ",found=" + (result != null));
return result;
***************
*** 66,70 ****
result = (Secrole) lst.get(0);
! log.debug("getRoleByName: roleName=" + roleName + ",found=" + (result != null));
return result;
--- 65,69 ----
result = (Secrole) lst.get(0);
! logger.debug("getRoleByName: roleName=" + roleName + ",found=" + (result != null));
return result;
Index: SecuserroleDao.java
===================================================================
RCS file: /cvsroot/oscarmcmaster/oscar_mcmaster/web/WEB-INF/classes/src/com/quatro/dao/security/SecuserroleDao.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SecuserroleDao.java 17 Oct 2010 09:39:08 -0000 1.4
--- SecuserroleDao.java 10 Nov 2010 11:15:58 -0000 1.5
***************
*** 14,18 ****
import org.apache.commons.lang.StringEscapeUtils;
- import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.hibernate.LockMode;
--- 14,17 ----
***************
*** 20,23 ****
--- 19,23 ----
import org.hibernate.criterion.Example;
import org.oscarehr.PMmodule.web.formbean.StaffForm;
+ import org.oscarehr.util.MiscUtils;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
***************
*** 37,41 ****
public class SecuserroleDao extends HibernateDaoSupport {
! private static final Logger log = LogManager.getLogger(SecuserroleDao.class);
// property constants
public static final String PROVIDER_NO = "providerNo";
--- 37,41 ----
public class SecuserroleDao extends HibernateDaoSupport {
! private static final Logger logger = MiscUtils.getLogger();
// property constants
public static final String PROVIDER_NO = "providerNo";
***************
*** 45,49 ****
public void saveAll(List list) {
! log.debug("saving ALL Secuserrole instances");
try {
for(int i =0; i< list.size(); i++){
--- 45,49 ----
public void saveAll(List list) {
! logger.debug("saving ALL Secuserrole instances");
try {
for(int i =0; i< list.size(); i++){
***************
*** 58,74 ****
}
//this.getHibernateTemplate().saveOrUpdateAll(list);
! log.debug("save ALL successful");
} catch (RuntimeException re) {
! log.error("save ALL failed", re);
throw re;
}
}
public void save(Secuserrole transientInstance) {
! log.debug("saving Secuserrole instance");
try {
getSession().save(transientInstance);
! log.debug("save successful");
} catch (RuntimeException re) {
! log.error("save failed", re);
throw re;
}
--- 58,74 ----
}
//this.getHibernateTemplate().saveOrUpdateAll(list);
! logger.debug("save ALL successful");
} catch (RuntimeException re) {
! logger.error("save ALL failed", re);
throw re;
}
}
public void save(Secuserrole transientInstance) {
! logger.debug("saving Secuserrole instance");
try {
getSession().save(transientInstance);
! logger.debug("save successful");
} catch (RuntimeException re) {
! logger.error("save failed", re);
throw re;
}
***************
*** 76,90 ****
public void delete(Secuserrole persistentInstance) {
! log.debug("deleting Secuserrole instance");
try {
getSession().delete(persistentInstance);
! log.debug("delete successful");
} catch (RuntimeException re) {
! log.error("delete failed", re);
throw re;
}
}
public int deleteByOrgcd(String orgcd) {
! log.debug("deleting Secuserrole by orgcd");
try {
--- 76,90 ----
public void delete(Secuserrole persistentInstance) {
! logger.debug("deleting Secuserrole instance");
try {
getSession().delete(persistentInstance);
! logger.debug("delete successful");
} catch (RuntimeException re) {
! logger.error("delete failed", re);
throw re;
}
}
public int deleteByOrgcd(String orgcd) {
! logger.debug("deleting Secuserrole by orgcd");
try {
***************
*** 92,101 ****
} catch (RuntimeException re) {
! log.error("delete failed", re);
throw re;
}
}
public int deleteByProviderNo(String providerNo) {
! log.debug("deleting Secuserrole by providerNo");
try {
--- 92,101 ----
} catch (RuntimeException re) {
! logger.error("delete failed", re);
throw re;
}
}
public int deleteByProviderNo(String providerNo) {
! logger.debug("deleting Secuserrole by providerNo");
try {
***************
*** 103,107 ****
} catch (RuntimeException re) {
! log.error("delete failed", re);
throw re;
}
--- 103,107 ----
} catch (RuntimeException re) {
! logger.error("delete failed", re);
throw re;
}
***************
*** 109,113 ****
public int deleteById(Integer id) {
! log.debug("deleting Secuserrole by ID");
try {
--- 109,113 ----
public int deleteById(Integer id) {
! logger.debug("deleting Secuserrole by ID");
try {
***************
*** 115,124 ****
} catch (RuntimeException re) {
! log.error("delete failed", re);
throw re;
}
}
public int update(Secuserrole instance) {
! log.debug("Update Secuserrole instance");
try {
String queryString = "update Secuserrole as model set model.activeyn ='" + instance.getActiveyn() + "'"
--- 115,124 ----
} catch (RuntimeException re) {
! logger.error("delete failed", re);
throw re;
}
}
public int update(Secuserrole instance) {
! logger.debug("Update Secuserrole instance");
try {
String queryString = "update Secuserrole as model set model.activeyn ='" + instance.getActiveyn() + "'"
***************
*** 132,141 ****
} catch (RuntimeException re) {
! log.error("Update failed", re);
throw re;
}
}
public Secuserrole findById(java.lang.Integer id) {
! log.debug("getting Secuserrole instance with id: " + id);
try {
Secuserrole instance = (Secuserrole) getSession().get(
--- 132,141 ----
} catch (RuntimeException re) {
! logger.error("Update failed", re);
throw re;
}
}
public Secuserrole findById(java.lang.Integer id) {
! logger.debug("getting Secuserrole instance with id: " + id);
try {
Secuserrole instance = (Secuserrole) getSession().get(
***************
*** 143,147 ****
return instance;
} catch (RuntimeException re) {
! log.error("get failed", re);
throw re;
}
--- 143,147 ----
return instance;
} catch (RuntimeException re) {
! logger.error("get failed", re);
throw re;
}
***************
*** 149,162 ****
public List findByExample(Secuserrole instance) {
! log.debug("finding Secuserrole instance by example");
try {
List results = getSession().createCriteria(
"com.quatro.model.Secuserrole").add(
Example.create(instance)).list();
! log.debug("find by example successful, result size: "
+ results.size());
return results;
} catch (RuntimeException re) {
! log.error("find by example failed", re);
throw re;
}
--- 149,162 ----
public List findByExample(Secuserrole instance) {
! logger.debug("finding Secuserrole instance by example");
try {
List results = getSession().createCriteria(
"com.quatro.model.Secuserrole").add(
Example.create(instance)).list();
! logger.debug("find by example successful, result size: "
+ results.size());
return results;
} catch (RuntimeException re) {
! logger.error("find by example failed", re);
throw re;
}
***************
*** 164,168 ****
public List findByProperty(String propertyName, Object value) {
! log.debug("finding Secuserrole instance with property: " + propertyName
+ ", value: " + value);
try {
--- 164,168 ----
public List findByProperty(String propertyName, Object value) {
! logger.debug("finding Secuserrole instance with property: " + propertyName
+ ", value: " + value);
try {
***************
*** 173,177 ****
return queryObject.list();
} catch (RuntimeException re) {
! log.error("find by property name failed", re);
throw re;
}
--- 173,177 ----
return queryObject.list();
} catch (RuntimeException re) {
! logger.error("find by property name failed", re);
throw re;
}
***************
*** 195,199 ****
*/
! log.debug("Find staff instance .");
try {
--- 195,199 ----
*/
! logger.debug("Find staff instance .");
try {
***************
*** 210,214 ****
} catch (RuntimeException re) {
! log.error("Find staff failed", re);
throw re;
}
--- 210,214 ----
} catch (RuntimeException re) {
! logger.error("Find staff failed", re);
throw re;
}
***************
*** 217,221 ****
public List searchByCriteria(StaffForm staffForm){
! log.debug("Search staff instance .");
try {
--- 217,221 ----
public List searchByCriteria(StaffForm staffForm){
! logger.debug("Search staff instance .");
try {
***************
*** 249,253 ****
} catch (RuntimeException re) {
! log.error("Search staff failed", re);
throw re;
}
--- 249,253 ----
} catch (RuntimeException re) {
! logger.error("Search staff failed", re);
throw re;
}
***************
*** 259,263 ****
public List findAll() {
! log.debug("finding all Secuserrole instances");
try {
String queryString = "from Secuserrole";
--- 259,263 ----
public List findAll() {
! logger.debug("finding all Secuserrole instances");
try {
String queryString = "from Secuserrole";
***************
*** 265,269 ****
return queryObject.list();
} catch (RuntimeException re) {
! log.error("find all failed", re);
throw re;
}
--- 265,269 ----
return queryObject.list();
} catch (RuntimeException re) {
! logger.error("find all failed", re);
throw re;
}
***************
*** 271,282 ****
public Secuserrole merge(Secuserrole detachedInstance) {
! log.debug("merging Secuserrole instance");
try {
Secuserrole result = (Secuserrole) getSession().merge(
detachedInstance);
! log.debug("merge successful");
return result;
} catch (RuntimeException re) {
! log.error("merge failed", re);
throw re;
}
--- 271,282 ----
public Secuserrole merge(Secuserrole detachedInstance) {
! logger.debug("merging Secuserrole instance");
try {
Secuserrole result = (Secuserrole) getSession().merge(
detachedInstance);
! logger.debug("merge successful");
return result;
} catch (RuntimeException re) {
! logger.error("merge failed", re);
throw re;
}
***************
*** 284,293 ****
public void attachDirty(Secuserrole instance) {
! log.debug("attaching dirty Secuserrole instance");
try {
getSession().saveOrUpdate(instance);
! log.debug("attach successful");
} catch (RuntimeException re) {
! log.error("attach failed", re);
throw re;
}
--- 284,293 ----
public void attachDirty(Secuserrole instance) {
! logger.debug("attaching dirty Secuserrole instance");
try {
getSession().saveOrUpdate(instance);
! logger.debug("attach successful");
} catch (RuntimeException re) {
! logger.error("attach failed", re);
throw re;
}
***************
*** 295,304 ****
public void attachClean(Secuserrole instance) {
! log.debug("attaching clean Secuserrole instance");
try {
getSession().lock(instance, LockMode.NONE);
! log.debug("attach successful");
} catch (RuntimeException re) {
! log.error("attach failed", re);
throw re;
}
--- 295,304 ----
public void attachClean(Secuserrole instance) {
! logger.debug("attaching clean Secuserrole instance");
try {
getSession().lock(instance, LockMode.NONE);
! logger.debug("attach successful");
} catch (RuntimeException re) {
! logger.error("attach failed", re);
throw re;
}
|