package com.tops.j2ee.control.control;
import java.lang.reflect.*;
import java.sql.*;
import java.util.*;
import com.tops.j2ee.control.model.*;
import com.tops.j2ee.object.control.*;
import com.tops.j2ee.object.model.*;
import com.tops.j2eebase.control.*;
import com.tops.j2eebase.exception.*;
import com.tops.j2eebase.model.*;
import org.hibernate.*;
public class EmTopsJ2eeControl extends TopsJ2EEBaseControl {
private static EmTopsJ2eeControl instance = null;
public static synchronized EmTopsJ2eeControl getInstance() {
if (instance == null) {
instance = new EmTopsJ2eeControl();
}
return instance;
}
public static String normalFunction = ",getInstance,";
private TopsJ2eeControlDAO _TopsJ2eeControlDAO = null;
private TopsJ2eeObjDAO _TopsJ2eeObjDAO = null;
private TopsJ2eeControlMethodDAO _TopsJ2eeControlMethodDAO = null;
private TopsJ2eeControlMethodParamDAO _TopsJ2eeControlMethodParamDAO = null;
private EmTopsJ2eeControl() {
_TopsJ2eeControlDAO = TopsJ2eeControlDAO.getNewInstance();
_TopsJ2eeObjDAO = TopsJ2eeObjDAO.getNewInstance();
_TopsJ2eeControlMethodDAO = TopsJ2eeControlMethodDAO.getNewInstance();
_TopsJ2eeControlMethodParamDAO = TopsJ2eeControlMethodParamDAO.
getNewInstance();
}
//begin function load
/*------说明------
代码编写人:
----------------*/
public synchronized ActfrmTopsJ2eeControl load(String val1) throws
BugReportBaseException {
ActfrmTopsJ2eeControl result = null;
startTransaction();
try {
//编写业务代码
result = this._TopsJ2eeControlDAO.findByPrimaryKey(val1, _session);
String hql = "from ActfrmTopsJ2eeControlMethod where controlId='" +
val1 + "'";
java.util.List methodList = TopsJ2eeControlMethodDAO.getNewInstance().
findByHQL(hql, _session);
for (int i = 0; i < methodList.size(); i++) {
ActfrmTopsJ2eeControlMethod method = (
ActfrmTopsJ2eeControlMethod) methodList.get(i);
hql = "from ActfrmTopsJ2eeControlMethodParam where methodId='" +
method.getId() + "'";
java.util.List paramList = TopsJ2eeControlMethodParamDAO.
getNewInstance().findByHQL(hql,
_session);
method.setParamList(paramList);
}
result.setMethodList(methodList);
commitTransaction();
} catch (BugReportBaseException bex) {
rollbaseTransaction();
throw bex;
}
return result;
}
//end function load
//begin function modify
/*------说明------
代码编写人:
----------------*/
public synchronized void modify(ActfrmTopsJ2eeControl val1) throws
BugReportBaseException {
startTransaction();
try {
//编写业务代码
if (this.isControlExist(val1.getId(), val1.getControlClassname(),
this._session)) {
throw new BugReportBaseException("该control已经存在,请修改后再保存!", null,
"");
}
this._TopsJ2eeControlDAO.saveChange(val1, this._session, this._tx);
commitTransaction();
} catch (BugReportBaseException bex) {
rollbaseTransaction();
throw bex;
}
}
//end function modify
//begin function add
/*------说明------
代码编写人:
----------------*/
public synchronized void add(ActfrmTopsJ2eeControl val1) throws
BugReportBaseException {
startTransaction();
try {
//编写业务代码
if (this.isControlExist(val1.getId(), val1.getControlClassname(),
this._session)) {
throw new BugReportBaseException("该control已经存在,请修改后再保存!", null,
"");
}
this._TopsJ2eeControlDAO.create(val1, this._session, this._tx);
commitTransaction();
} catch (BugReportBaseException bex) {
rollbaseTransaction();
throw bex;
}
}
//end function add
//begin function findAllByPage
/*------说明------
代码编写人:
----------------*/
public synchronized DataPage findAllByPage(String val1, int val2) throws
BugReportBaseException {
DataPage result = null;
try {
//编写业务代码
result = this._TopsJ2eeControlDAO.findAll(val1, val2,
this.defaultPageSize);
} catch (BugReportBaseException bex) {
throw bex;
}
return result;
}
//end function findAllByPage
//begin function delete
/*------说明------
代码编写人:
----------------*/
public synchronized void delete(String val1) throws BugReportBaseException {
String hql = "from ActfrmTopsJ2eeAction where mainControl='" + val1 +
"'";
if (_TopsJ2eeControlDAO.findPageByHQL(hql, "ddd", 1, 1).getPageData().
size() > 0) {
throw new BusinessException("该控制器存在相关的Action,不能删除,请先删除相关的Action");
}
hql = "from ActfrmTopsJ2eeActionMethod where mainControlUuid='" + val1 +
"'";
if (_TopsJ2eeControlDAO.findPageByHQL(hql, "ddd", 1, 1).getPageData().
size() > 0) {
throw new BusinessException(
"该控制器存在相关的Action方法,不能删除,请先删除相关的Action方法");
}
startTransaction();
try {
//编写业务代码
//盘点该控制器有无被Action引用
ActfrmTopsJ2eeControl one = this._TopsJ2eeControlDAO.
findByPrimaryKey(val1, _session);
if (one != null) {
hql =
"from ActfrmTopsJ2eeControlMethod where controlId='" +
one.getId() + "'";
java.util.List methodList = TopsJ2eeControlMethodDAO.
getNewInstance().findByHQL(hql,
this._session);
for (int j = 0; j < methodList.size(); j++) {
ActfrmTopsJ2eeControlMethod method = (
ActfrmTopsJ2eeControlMethod) methodList.get(j);
hql =
"delete ActfrmTopsJ2eeControlMethodParam where methodId='" +
method.getId() + "'";
TopsJ2eeControlMethodParamDAO.getNewInstance().
executeHql(hql, this._session, this._tx);
}
hql = "delete ActfrmTopsJ2eeControlMethod where controlId='" +
one.getId() + "'";
this._TopsJ2eeControlMethodDAO.executeHql(hql, this._session,
this._tx);
this._TopsJ2eeControlDAO.remove(one, this._session,
this._tx);
} else {
throw new BugReportBaseException("记录不存在,不能删除", null, "");
}
commitTransaction();
} catch (BugReportBaseException bex) {
rollbaseTransaction();
throw bex;
}
}
//end function delete
//begin function deleteList
/*------说明------
代码编写人:
----------------*/
public synchronized void deleteLis
没有合适的资源?快使用搜索试试~ 我知道了~
struct+jsp+hibernate实际项目
共3504个文件
gif:1464个
class:597个
java:567个
需积分: 10 30 下载量 192 浏览量
2009-07-04
21:42:10
上传
评论
收藏 5.51MB RAR 举报
温馨提示
struct+jsp+hibernate实际案例,可以运行,是学校老师中的项目开发组开发。因为项目太大,类会在struct+jsp+hibernate2,下载下来后放到lib文件夹中
资源推荐
资源详情
资源评论
收起资源包目录
struct+jsp+hibernate实际项目 (3504个子文件)
jyb.user.cfg 3KB
jyb.music.cfg 3KB
jyb.information.cfg 3KB
jyb.video.cfg 2KB
jyb.book.cfg 2KB
jyb.organize.cfg 2KB
systemStrutsMappings.cfg 273B
spellchecker.cfm 5KB
TopsObject.class 28KB
EmTopsJ2eeControl.class 27KB
J2EEModelEditor.class 24KB
ActfrmViewMusicInfo.class 17KB
ActfrmTblMusicInfo.class 17KB
ActfrmTblBookInfo.class 17KB
TagSubTableItem.class 17KB
TableData.class 17KB
ImageInfo.class 16KB
ActfrmViewOrganizeBookInfo.class 16KB
ActfrmTblInformation.class 15KB
ActfrmViewInformation.class 15KB
EMTopsJ2eeAction.class 15KB
ActTblBookInfo.class 15KB
J2EEJspPathTreeNode.class 15KB
ActfrmTblVideoInfo.class 15KB
ActTblUserIntegralLog.class 13KB
ModelEditor.class 13KB
ReportRowData.class 13KB
ActfrmTblOrganizeArea.class 13KB
EMTopsSystemFunction.class 13KB
TJspGenerator.class 13KB
ActfrmTopsJ2eeAjaxAgencyMethod.class 12KB
PagedHibernateDAO.class 12KB
TopsDbView.class 12KB
HibernateBaseDAO.class 12KB
J2EEModelGroupTreeNode.class 12KB
ActfrmTblUserSpecialInfo.class 12KB
J2EEJspTreeNode.class 12KB
TJSPFile.class 12KB
EmTopsJ2eeObj.class 11KB
TagAjaxSuggest.class 11KB
FunctionEditor.class 11KB
ActfrmTopsADepartment.class 11KB
ActfrmTblUserInfo.class 11KB
ActfrmTblUserAccess.class 11KB
ActfrmViewCrRelation.class 11KB
PagedHibernateViewDAO.class 11KB
ActTblInformation.class 11KB
J2EEDBViewEditor.class 11KB
ActfrmTblOrganizeCrRelation.class 11KB
ActfrmTblMusicSpecial.class 11KB
ActfrmTblBookComment.class 11KB
ActfrmViewMusicComment.class 11KB
ActfrmViewMusicSpecial.class 10KB
ActfrmTblInformationComment.class 10KB
ActfrmTblUserLog.class 10KB
J2EEFunctionDetailEditor.class 10KB
ActfrmTblVideoComment.class 10KB
ActfrmTblMusicComment.class 10KB
SubFunctionEditor.class 10KB
EMTopsSystemUser.class 10KB
ActfrmViewTopsAEmployee.class 10KB
ActfrmTopsAEmployee.class 10KB
ActfrmTblUserIntegralLog.class 10KB
TagLindStyleOperator.class 10KB
ActfrmTblUserAccount.class 10KB
TControlGenerator.class 10KB
ActfrmViewOrganizeSchool.class 10KB
TagSubTable.class 10KB
ActTblOrganizeCrRelation.class 10KB
ActfrmTblInformationCommentReply.class 10KB
ActfrmTblVideoCommentReply.class 10KB
ActfrmTblMusicCommentReply.class 10KB
ActfrmTblBookCommentReply.class 10KB
ActfrmTblOrganizeSchool.class 10KB
ActTblBookComment.class 10KB
ActTopsAEmployee.class 9KB
EMTopsAEmployee.class 9KB
J2EEControlEditor.class 9KB
ActTblMusicInfo.class 9KB
J2EEActionEditor.class 9KB
ActfrmViewTopsSystemUserLog.class 9KB
TagSubTableMain.class 9KB
ConnectorServlet.class 9KB
ActfrmTblSingerInfo.class 9KB
EMTopsJ2eeAjaxAgency.class 9KB
ActfrmTblUserContact.class 9KB
ActfrmTopsZBug.class 9KB
ActfrmTblBookAttachment.class 9KB
ActTopsSystemUser.class 9KB
ActfrmTblInformationAttachment.class 9KB
ActfrmTblVideoAttachment.class 9KB
ActfrmTblInformationType.class 9KB
ActfrmTblBookType.class 9KB
DBViewEditor.class 9KB
ActfrmTopsJ2eeObjDbView.class 9KB
ActTblMusicComment.class 9KB
EMTblOrganizeArea.class 8KB
EmTopsJ2eeControlMethod.class 8KB
ActfrmTblOrganizeClass.class 8KB
ActfrmViewOrganizeClass.class 8KB
共 3504 条
- 1
- 2
- 3
- 4
- 5
- 6
- 36
资源评论
wushangdeluoye
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功