6758e057a2c8f69ff6fa95986f23e7c4c5da0af4.svn-base 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. package com.sinosoft.lz.system.function.busi;
  2. import java.util.ArrayList;
  3. import java.util.Collection;
  4. import org.apache.commons.logging.Log;
  5. import org.apache.commons.logging.LogFactory;
  6. import org.springframework.dao.DataAccessException;
  7. import com.sinosoft.lz.system.function.dao.ButtonDAO;
  8. import com.sinosoft.lz.system.function.vo.ButtonVO;
  9. public class ButtonBean{
  10. @SuppressWarnings("unused")
  11. private static Log log = LogFactory.getLog(ButtonBean.class);
  12. private ButtonDAO dao = new ButtonDAO();
  13. /**
  14. * 新增
  15. *
  16. * @param VO
  17. * @return
  18. * @throws DataAccessException
  19. */
  20. public boolean addSysButton(ButtonVO VO) throws ClassNotFoundException {
  21. return dao.addSysButton(VO);
  22. }
  23. /**
  24. * 批量新增对象
  25. *
  26. * @param voList
  27. * @return
  28. * @throws DataAccessException
  29. */
  30. public int[] addSysButton(ArrayList<ButtonVO> voList) throws ClassNotFoundException {
  31. return dao.addSysButton(voList);
  32. }
  33. /**
  34. * 修改对象
  35. *
  36. * @param VO
  37. * @throws DataAccessException
  38. */
  39. public boolean modifySysButton(ButtonVO VO) throws ClassNotFoundException {
  40. return dao.modifySysButton(VO);
  41. }
  42. /**
  43. * 根据主键删除对象
  44. *
  45. * @param FD_OBJECTID
  46. * 对象主键
  47. * @return
  48. * @throws DataAccessException
  49. */
  50. public boolean delSysButton(String FD_OBJECTID) throws ClassNotFoundException {
  51. return dao.delSysButton(FD_OBJECTID);
  52. }
  53. /**
  54. * 根据主键获得对象
  55. *
  56. * @param FD_OBJECTID
  57. * 对象主键
  58. * @return
  59. * @throws DataAccessException
  60. */
  61. public ButtonVO getSysButtonVO(String FD_OBJECTID) throws ClassNotFoundException {
  62. return dao.getSysButtonVO(FD_OBJECTID);
  63. }
  64. public String getButtonNameById(String id) throws ClassNotFoundException {
  65. return dao.getButtonNameById(id);
  66. }
  67. /**
  68. * 根据传入sql查询对象集合
  69. *
  70. * @param sql
  71. * 查询语句
  72. * @return
  73. * @throws DataAccessException
  74. */
  75. public Collection<ButtonVO> getSysButton(String sql) throws ClassNotFoundException {
  76. return dao.getSysButton(sql);
  77. }
  78. }