first commit

This commit is contained in:
2025-07-28 13:56:49 +05:30
commit e9eb805edb
3438 changed files with 520990 additions and 0 deletions

View File

@@ -0,0 +1,680 @@
package wenrgise.hrms.webtier.action;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
import org.apache.struts.util.MessageResources;
import wenrgise.common.bean.AccessBean;
import wenrgise.common.bean.BaseDetailBean;
import wenrgise.common.bean.BaseHeaderBean;
import wenrgise.common.businessdelegate.BaseBD;
import wenrgise.common.exception.EnrgiseApplicationException;
import wenrgise.common.exception.EnrgiseMessageKeyException;
import wenrgise.common.exception.EnrgiseSystemException;
import wenrgise.common.utility.EnrgiseUtil;
import wenrgise.common.utility.MessageKey;
import wenrgise.common.vo.BaseDetailVO;
import wenrgise.common.vo.BaseHeaderVO;
import wenrgise.common.vo.BaseQueryVO;
import wenrgise.common.vo.DetailSizeValues;
import wenrgise.common.vo.ThisPageVO;
import wenrgise.common.webtier.form.BaseForm;
import wenrgise.common.xml.vo.DetailScreen;
import wenrgise.ejb.common.session.UserSession;
import wenrgise.ejb.common.utility.ParamUtil;
public abstract class BaseAction extends Action {
static final Logger log = Logger.getLogger("wenrgise.common.webtier.action.BaseAction");
MessageResources oMsgRes = null;
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
ActionErrors oErrorTable = null;
ActionMessages oMessageTable = null;
BaseForm oBaseForm = (BaseForm)form;
this.oMsgRes = getResources(request);
try {
return executeImpl(mapping, form, request, response);
} catch (ClassNotFoundException oClassEx) {
processSystemException(oClassEx, oErrorTable);
} catch (InstantiationException oInSt) {
processSystemException(oInSt, oErrorTable);
} catch (InvocationTargetException oInvTar) {
processSystemException(oInvTar, oErrorTable);
} catch (IllegalAccessException oIlAcc) {
processSystemException(oIlAcc, oErrorTable);
} catch (EnrgiseSystemException oSys) {
if (oErrorTable == null)
oErrorTable = new ActionErrors();
String sKey = (null != oSys.getKey()) ? oSys.getKey() : "wenrgise.common.system";
ActionError oSysError = new ActionError(sKey);
oErrorTable.add("org.apache.struts.action.GLOBAL_ERROR", oSysError);
} catch (EnrgiseApplicationException oApp) {
if (oErrorTable == null)
oErrorTable = new ActionErrors();
if (oMessageTable == null)
oMessageTable = new ActionMessages();
processException(oErrorTable, oMessageTable, oApp);
if (oApp.getList() != null) {
Iterator oIt = oApp.getList().iterator();
while (oIt.hasNext()) {
EnrgiseApplicationException oAppErr = oIt.next();
processException(oErrorTable, oMessageTable, oAppErr);
}
}
} finally {
if (oErrorTable != null) {
System.out.println("Save errors");
if (oErrorTable.size() > 0) {
saveErrors(request, oErrorTable);
return mapping.findForward("success");
}
}
if (oMessageTable != null)
if (oMessageTable.size() > 0) {
System.out.println("Save messages");
saveMessages(request, oMessageTable);
return mapping.findForward("success");
}
}
return null;
}
private void processSystemException(Exception oEc, ActionErrors oErrorTable) {
if (oErrorTable == null)
oErrorTable = new ActionErrors();
EnrgiseSystemException oSys = new EnrgiseSystemException("wenrgise.common.system", oEc);
ActionError oSysError = new ActionError(oSys.getKey());
oErrorTable.add("org.apache.struts.action.GLOBAL_ERROR", oSysError);
}
private void processException(ActionErrors oErrorTable, ActionMessages oMessageTable, EnrgiseApplicationException oApp) {
if (oApp.getArguments() == null) {
if (oApp.getErrorType().equals("E")) {
oErrorTable.add("org.apache.struts.action.GLOBAL_ERROR", new ActionError(oApp.getKey()));
} else {
oMessageTable.add("org.apache.struts.action.GLOBAL_MESSAGE", new ActionMessage(oApp.getKey()));
}
} else if (oApp instanceof EnrgiseMessageKeyException) {
processMessageKeyException((EnrgiseMessageKeyException)oApp, oErrorTable, oMessageTable);
} else if (oApp.getErrorType().equals("E")) {
oErrorTable.add("org.apache.struts.action.GLOBAL_ERROR", new ActionError(oApp.getKey(), oApp.getArguments().toArray()));
} else {
oMessageTable.add("org.apache.struts.action.GLOBAL_MESSAGE", new ActionMessage(oApp.getKey(), oApp.getArguments().toArray()));
}
}
private void processMessageKeyException(EnrgiseMessageKeyException oApp, ActionErrors oErrorTable, ActionMessages oMessageTable) {
ArrayList oList = oApp.getArguments();
if (null == oList) {
if (oApp.getErrorType().equals("E")) {
oErrorTable.add("org.apache.struts.action.GLOBAL_ERROR", new ActionError(oApp.getKey()));
} else {
oMessageTable.add("org.apache.struts.action.GLOBAL_MESSAGE", new ActionMessage(oApp.getKey()));
}
} else {
ArrayList oNewList = new ArrayList();
Iterator oIt = oList.iterator();
while (oIt.hasNext()) {
Object obj = oIt.next();
if (obj instanceof MessageKey) {
MessageKey oMsgKey = (MessageKey)obj;
oNewList.add(this.oMsgRes.getMessage(oMsgKey.getKey()));
continue;
}
oNewList.add(obj);
}
if (oApp.getErrorType().equals("E")) {
oErrorTable.add("org.apache.struts.action.GLOBAL_ERROR", new ActionError(oApp.getKey(), oNewList.toArray()));
} else {
oMessageTable.add("org.apache.struts.action.GLOBAL_MESSAGE", new ActionMessage(oApp.getKey(), oNewList.toArray()));
}
}
}
protected BaseQueryVO getQueryVO(ActionForm form) throws IllegalAccessException, InstantiationException, ClassNotFoundException {
BaseForm oBaseForm = (BaseForm)form;
String sFormName = form.getClass().getName();
String sScreenName = oBaseForm.getScreenName();
String sQueryVO = ParamUtil.getQueryVO(sFormName);
BaseQueryVO oBaseQueryVO = (BaseQueryVO)Class.forName(sQueryVO).newInstance();
oBaseQueryVO.setMaxHeaderSize(ParamUtil.getHeaderSize(sFormName));
return oBaseQueryVO;
}
protected BaseDetailBean getDetailBean(ActionForm form) throws IllegalAccessException, InstantiationException, ClassNotFoundException {
BaseForm oBaseForm = (BaseForm)form;
String sFormName = form.getClass().getName();
String sScreenName = oBaseForm.getScreenName();
String sDetailBean = ParamUtil.getDetailBeanName(sFormName, sScreenName);
BaseDetailBean oBaseDetailBean = (BaseDetailBean)Class.forName(sDetailBean).newInstance();
return oBaseDetailBean;
}
protected BaseBD getHeaderBusinessDelegate(ActionForm form, HttpServletRequest request) throws RemoteException, IllegalAccessException, InstantiationException, ClassNotFoundException {
BaseForm oBaseForm = (BaseForm)form;
String sFormName = form.getClass().getName();
String sScreenName = oBaseForm.getScreenName();
String sBusinessDelegate = ParamUtil.getHeaderBD(sFormName);
BaseBD oBaseBD = (BaseBD)Class.forName(sBusinessDelegate).newInstance();
UserSession oUser = getUserSessionBean(request);
oBaseBD.setModuleName(ParamUtil.getModuleName());
oBaseBD.setModuleFacade(oUser.getModuleFacade());
oBaseBD.setOUserInfo(oUser.getUserInfo());
return oBaseBD;
}
protected BaseBD getDetailBusinessDelegate(ActionForm form, HttpServletRequest request) throws RemoteException, IllegalAccessException, InstantiationException, ClassNotFoundException {
BaseForm oBaseForm = (BaseForm)form;
String sFormName = form.getClass().getName();
String sScreenName = oBaseForm.getScreenName();
String sBusinessDelegate = ParamUtil.getDetailBD(sFormName, sScreenName);
BaseBD oBaseBD = (BaseBD)Class.forName(sBusinessDelegate).newInstance();
UserSession oUser = getUserSessionBean(request);
oBaseBD.setModuleName(ParamUtil.getModuleName());
oBaseBD.setModuleFacade(oUser.getModuleFacade());
oBaseBD.setOUserInfo(oUser.getUserInfo());
return oBaseBD;
}
protected BaseHeaderBean getBaseHeaderBean(String sFormName) throws IllegalAccessException, InstantiationException, ClassNotFoundException {
String sBaseHeaderBean = ParamUtil.getHeaderBean(sFormName);
BaseHeaderBean oBaseHeaderBean = (BaseHeaderBean)Class.forName(sBaseHeaderBean).newInstance();
String pseudoHeader = ParamUtil.getPseudoHeaderFlag(sFormName);
oBaseHeaderBean.setPseudoHeader(pseudoHeader);
return oBaseHeaderBean;
}
protected ArrayList getDetailArrayList(BaseForm oBaseForm, String sFormName, String sScreenName) throws EnrgiseSystemException, IllegalAccessException, InstantiationException, ClassNotFoundException {
String sDetailArrayList = ParamUtil.getDetailArrayName(sFormName, sScreenName);
ArrayList oList = (ArrayList)EnrgiseUtil.getFieldValue(oBaseForm, sDetailArrayList);
return oList;
}
protected UserSession getUserSessionBean(HttpServletRequest request) {
HttpSession session = request.getSession();
return (UserSession)session.getAttribute(ParamUtil.getSessionBeanName());
}
protected void clearDetailLists(BaseForm form, ArrayList oDetailList) throws IllegalAccessException, InvocationTargetException {
Iterator oIt = oDetailList.iterator();
while (oIt.hasNext()) {
DetailScreen oDetailScreen = oIt.next();
BeanUtils.copyProperty(form, oDetailScreen.get_DetailArrayName(), new ArrayList());
}
}
protected ArrayList getDetailArray(BaseForm oBaseForm) throws EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException {
String sFormName = oBaseForm.getClass().getName();
String sScreenName = oBaseForm.getScreenName();
ArrayList oDetailArray = new ArrayList();
String sDetailBean = ParamUtil.getDetailBeanName(sFormName, sScreenName);
BaseDetailBean oBaseDetailBean = (BaseDetailBean)Class.forName(sDetailBean).newInstance();
ArrayList oFieldList = new ArrayList();
oFieldList = getFieldList(oFieldList, oBaseDetailBean.getClass());
ArrayList oList = (ArrayList)EnrgiseUtil.getFieldValue(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName));
for (int iRecord = 0; iRecord < oBaseForm.getThisPageDetailCount(); iRecord++) {
if (null == oList)
break;
oBaseDetailBean = oList.get(iRecord);
if (null == oBaseDetailBean)
break;
Iterator oIt = oFieldList.iterator();
while (oIt.hasNext()) {
try {
Field ob = oIt.next();
System.out.println(String.valueOf("Record name ").concat(String.valueOf(iRecord)));
String sFieldName = ob.getName();
System.out.println(String.valueOf("Field name ").concat(String.valueOf(sFieldName)));
if (sFieldName.startsWith("disab"))
continue;
if (ob.getType().getName().equals("java.lang.String")) {
String sValue = BeanUtils.getIndexedProperty(oBaseForm, sFieldName, iRecord);
BeanUtils.setProperty(oBaseDetailBean, sFieldName, sValue);
}
} catch (NoSuchMethodException noSuchMethodException) {}
}
oDetailArray.add(oBaseDetailBean);
}
return oDetailArray;
}
private ArrayList getFieldList(ArrayList oFieldList, Class oClass) {
if (oClass == null)
return oFieldList;
Field[] oFields = oClass.getDeclaredFields();
EnrgiseUtil.addToList(oFieldList, (Object[])oFields);
return getFieldList(oFieldList, oClass.getSuperclass());
}
protected void changeMode(BaseForm oBaseForm, HttpServletRequest request) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
String sFormName = oBaseForm.getClass().getName();
String sScreenName = oBaseForm.getScreenName();
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
BeanUtils.copyProperties(oBaseForm, oBaseHeaderBean);
clearDetailLists(oBaseForm, ParamUtil.getDetailList(sFormName));
UserSession oUser = getUserSessionBean(request);
oUser.putBaseHeaderVO(sFormName, null);
oUser.removeAllDetailVO(sFormName);
resetForm(oBaseForm);
}
protected void checkHeaderNavigation(BaseForm oBaseForm, BaseHeaderVO oBaseHeaderVO) throws EnrgiseApplicationException {
long lPositionRequested = Long.parseLong(oBaseForm.getUserPositionRequested());
if (null != oBaseHeaderVO) {
if (lPositionRequested <= 0L || lPositionRequested > oBaseHeaderVO.getTotalCount())
throw new EnrgiseApplicationException("wenrgise.common.headerNavigation", "E");
oBaseForm.setPositionRequested(lPositionRequested);
} else {
throw new EnrgiseApplicationException("wenrgise.common.headerNavigation", "E");
}
}
private void resetForm(BaseForm oBaseForm) {
oBaseForm.setPageRequested(0L);
oBaseForm.setPositionRequested(0L);
oBaseForm.setTotalCount(0L);
oBaseForm.setTotalDetailRecord(0L);
oBaseForm.setTotalHeaderRecord(0L);
oBaseForm.setHeaderPrimaryKey(null);
oBaseForm.setUserPageRequested(null);
oBaseForm.setDetailId(null);
oBaseForm.setStatus(null);
oBaseForm.setDetailDataChanged(false);
oBaseForm.setHeaderDataChanged(false);
oBaseForm.setChecked(null);
oBaseForm.setUserPositionRequested(null);
oBaseForm.setTotalCount(0L);
oBaseForm.setNewPageRequested(null);
oBaseForm.setItemChecked(null);
oBaseForm.setLovKey(null);
oBaseForm.setTxtSearchFields(null);
oBaseForm.setTxtDisplayFields(null);
oBaseForm.setTxtIndex(null);
oBaseForm.setThisPageDetailCount(0);
oBaseForm.setTotalPageCount(0L);
oBaseForm.setHeaderStatus(null);
oBaseForm.setButtonClicked(null);
oBaseForm.setButtonName(null);
oBaseForm.setDetailStartPage(0);
}
protected void checkDetailNavigation(BaseForm oBaseForm, BaseDetailVO oBaseDetailVO) throws EnrgiseApplicationException {
boolean flag = false;
long lPageRequested = 0L;
if (EnrgiseUtil.checkString(oBaseForm.getUserPageRequested())) {
lPageRequested = Long.parseLong(oBaseForm.getUserPageRequested());
} else {
flag = true;
}
if (null != oBaseDetailVO) {
if (flag == false) {
if (lPageRequested <= 0L || oBaseDetailVO.getTotalDetailRecord() <= oBaseDetailVO.getRecordsPerPage() * (lPageRequested - 1L))
throw new EnrgiseApplicationException("wenrgise.common.detailNavigation", "E");
oBaseForm.setPageRequested(lPageRequested);
} else if (oBaseForm.getDetailList() != null) {
oBaseForm.setPageRequested(1L);
} else {
oBaseForm.setPageRequested(0L);
}
} else {
throw new EnrgiseApplicationException("wenrgise.common.detailNavigation", "E");
}
}
protected void enableDisable(BaseForm oBaseForm, ArrayList arylstFields, String enableFlag) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
if (null != arylstFields) {
Iterator iterFields = arylstFields.iterator();
while (iterFields.hasNext()) {
StringBuffer sField = new StringBuffer(iterFields.next());
String sProperty = String.valueOf("setDisab").concat(String.valueOf(sField.toString()));
try {
Class[] oCls = { Class.forName("java.lang.String") };
Method oMethod = oBaseForm.getClass().getMethod(sProperty, oCls);
String sFlag = enableFlag.equals("D") ? "true" : "false";
Object[] obj = { sFlag };
oMethod.invoke(oBaseForm, obj);
} catch (NoSuchMethodException nse) {
System.out.println(String.valueOf(String.valueOf(String.valueOf("The problem is ").concat(String.valueOf(nse.getMessage()))).concat(String.valueOf(" "))).concat(String.valueOf(sProperty)));
}
}
}
}
protected void enableAll(BaseForm oBaseForm) {
try {
ArrayList arylstDisFields = new ArrayList();
ArrayList arylstFields = new ArrayList();
arylstFields = getFieldList(arylstFields, oBaseForm.getClass());
Iterator iterFields = arylstFields.iterator();
while (iterFields.hasNext()) {
Field oField = iterFields.next();
if (oField.getName().startsWith("disab"))
arylstDisFields.add(oField.getName().replaceFirst("disab", ""));
}
enableDisable(oBaseForm, arylstDisFields, "E");
} catch (Exception exception) {}
}
protected void disableAll(BaseForm oBaseForm) {
try {
ArrayList arylstDisFields = new ArrayList();
ArrayList arylstFields = new ArrayList();
arylstFields = getFieldList(arylstFields, oBaseForm.getClass());
Iterator iterFields = arylstFields.iterator();
while (iterFields.hasNext()) {
Field oField = iterFields.next();
if (oField.getName().startsWith("disab"))
arylstDisFields.add(oField.getName().replaceFirst("disab", ""));
}
enableDisable(oBaseForm, arylstDisFields, "D");
} catch (Exception exception) {}
}
protected ArrayList queryClicked() {
ArrayList arylstFields = new ArrayList();
arylstFields.add("butQuery");
arylstFields.add("butSave");
arylstFields.add("butDelete");
arylstFields.add("butPrint");
arylstFields.add("butGetDetail");
arylstFields.add("butAddRow");
arylstFields.add("butDelRow");
arylstFields.add("butNextHeader");
arylstFields.add("butPrevHeader");
arylstFields.add("newPositionRequested");
arylstFields.add("butJumpHeader");
arylstFields.add("butNextDetail");
arylstFields.add("butPrevDetail");
arylstFields.add("newPageRequested");
arylstFields.add("butJumpDetail");
return arylstFields;
}
protected ArrayList insertClicked() {
ArrayList arylstFields = new ArrayList();
arylstFields.add("butInsert");
arylstFields.add("butExecute");
arylstFields.add("butDelete");
arylstFields.add("butPrint");
arylstFields.add("butGetDetail");
arylstFields.add("butAddRow");
arylstFields.add("butDelRow");
arylstFields.add("butNextHeader");
arylstFields.add("butPrevHeader");
arylstFields.add("newPositionRequested");
arylstFields.add("butJumpHeader");
arylstFields.add("butNextDetail");
arylstFields.add("butPrevDetail");
arylstFields.add("newPageRequested");
arylstFields.add("butJumpDetail");
return arylstFields;
}
protected ArrayList executeClicked() {
ArrayList arylstFields = new ArrayList();
arylstFields.add("butExecute");
arylstFields.add("butAddRow");
arylstFields.add("butDelRow");
arylstFields.add("butExecute");
arylstFields.add("butNextDetail");
arylstFields.add("butPrevDetail");
arylstFields.add("butJumpDetail");
arylstFields.add("newPageRequested");
return arylstFields;
}
protected ArrayList deleteClicked() {
ArrayList arylstFields = new ArrayList();
arylstFields.add("butQuery");
arylstFields.add("butExecute");
arylstFields.add("butDelete");
return arylstFields;
}
protected ArrayList saveClicked() {
ArrayList arylstFields = new ArrayList();
arylstFields.add("butExecute");
arylstFields.add("butGetDetail");
return arylstFields;
}
protected ArrayList refreshClicked() {
ArrayList arylstFields = new ArrayList();
return arylstFields;
}
protected ArrayList nextHeaderClicked() {
ArrayList arylstFields = new ArrayList();
arylstFields.add("butExecute");
arylstFields.add("butAddRow");
arylstFields.add("butDelRow");
arylstFields.add("butNextDetail");
arylstFields.add("butPrevDetail");
arylstFields.add("butJumpDetail");
arylstFields.add("newPageRequested");
return arylstFields;
}
protected ArrayList prevHeaderClicked() {
ArrayList arylstFields = new ArrayList();
arylstFields.add("butExecute");
arylstFields.add("butAddRow");
arylstFields.add("butDelRow");
arylstFields.add("butNextDetail");
arylstFields.add("butPrevDetail");
arylstFields.add("butJumpDetail");
arylstFields.add("newPageRequested");
return arylstFields;
}
protected ArrayList getDetailClicked() {
ArrayList arylstFields = new ArrayList();
arylstFields.add("butGetDetail");
return arylstFields;
}
protected ArrayList addRowClicked() {
ArrayList arylstFields = new ArrayList();
arylstFields.add("butGetDetail");
return arylstFields;
}
protected ArrayList delRowClicked() {
ArrayList arylstFields = new ArrayList();
arylstFields.add("butDelRow");
arylstFields.add("butGetDetail");
return arylstFields;
}
protected void controlHeaderNavigation(BaseForm oBaseForm) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
ArrayList arylstFields = new ArrayList();
long lTotalRecord = oBaseForm.getTotalCount();
long lRecordNum = oBaseForm.getPositionRequested();
if (lTotalRecord == 0L || lTotalRecord == 1L) {
arylstFields.add("butNextHeader");
arylstFields.add("butPrevHeader");
arylstFields.add("newPositionRequested");
arylstFields.add("butJumpHeader");
} else {
if (lRecordNum == lTotalRecord)
arylstFields.add("butNextHeader");
if (lRecordNum == 1L)
arylstFields.add("butPrevHeader");
}
enableDisable(oBaseForm, arylstFields, "D");
}
protected void controlDetailNavigation(BaseForm oBaseForm) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
ArrayList oEnableList = new ArrayList();
ArrayList oDisableList = new ArrayList();
long lTotalRecord = oBaseForm.getTotalPageCount();
long lRecordNum = oBaseForm.getPageRequested();
if (lTotalRecord == 0L || lTotalRecord == 1L) {
oDisableList.add("butNextDetail");
oDisableList.add("butPrevDetail");
oDisableList.add("newPageRequested");
oDisableList.add("butJumpDetail");
} else if (lRecordNum == lTotalRecord) {
oEnableList.add("butPrevDetail");
oEnableList.add("newPageRequested");
oEnableList.add("butJumpDetail");
oDisableList.add("butNextDetail");
} else if (lRecordNum == 1L) {
oEnableList.add("newPageRequested");
oEnableList.add("butJumpDetail");
oEnableList.add("butNextDetail");
oDisableList.add("butPrevDetail");
} else {
oEnableList.add("newPageRequested");
oEnableList.add("butJumpDetail");
oEnableList.add("butNextDetail");
oEnableList.add("butPrevDetail");
}
enableDisable(oBaseForm, oEnableList, "E");
enableDisable(oBaseForm, oDisableList, "D");
}
protected void resetDetailPageData(BaseForm oBaseForm) {
oBaseForm.setPageRequested(0L);
oBaseForm.setTotalPageCount(0L);
}
protected long calculateTotalDetailPage(String sFormName, String sScreenName, long lTotDetRecord) {
long totRecPerPage = ParamUtil.getDetailRecordPerPage(sFormName, sScreenName);
if (lTotDetRecord % totRecPerPage != 0L)
return lTotDetRecord / totRecPerPage + 1L;
return lTotDetRecord / totRecPerPage;
}
protected BaseDetailVO getDetailData(BaseForm oBaseForm, String sFormName, String sScreenName, long lPageRequested, HttpServletRequest request, BaseBD oBaseBD, boolean bForce, UserSession oUser) throws RemoteException, ClassNotFoundException, InvocationTargetException, InstantiationException, IllegalAccessException, EnrgiseApplicationException, EnrgiseSystemException {
String sHeaderPrimaryKey = oBaseForm.getHeaderPrimaryKey();
String pseudoHeader = ParamUtil.getPseudoHeaderFlag(sFormName);
DetailSizeValues oDetailSizeValues = new DetailSizeValues();
oDetailSizeValues.setDetailRecordPerPage(ParamUtil.getDetailRecordPerPage(sFormName, sScreenName));
oDetailSizeValues.setMaxPages(ParamUtil.getMaxDetailPages(sFormName, sScreenName));
BaseDetailVO oBaseDetailVO = null;
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, sScreenName);
if (!EnrgiseUtil.checkString(pseudoHeader)) {
oBaseDetailVO = oBaseBD.getDetailRecord(sFormName, sScreenName, sHeaderPrimaryKey, lPageRequested, oDetailSizeValues, oBaseDetailVO, bForce, oUser);
} else {
BaseQueryVO oBaseQueryVO = getQueryVO((ActionForm)oBaseForm);
BeanUtils.copyProperties(oBaseQueryVO, oBaseForm);
oBaseDetailVO = oBaseBD.getDetailRecord(sFormName, sScreenName, oBaseQueryVO, lPageRequested, oDetailSizeValues, oBaseDetailVO, bForce, oUser);
}
if (oBaseDetailVO.getOThisPageData() != null)
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oBaseDetailVO.getOThisPageData());
oBaseForm.setPageRequested(lPageRequested);
oBaseForm.setThisPageDetailCount((null != oBaseDetailVO.getOThisPageData()) ? oBaseDetailVO.getOThisPageData().size() : 0);
BeanUtils.copyProperties(oBaseForm, oBaseDetailVO);
oBaseForm.setNewPageRequested(null);
oBaseForm.setPageRequested(lPageRequested);
oUser.putBaseDetailVO(sFormName, sScreenName, oBaseDetailVO);
return oBaseDetailVO;
}
protected void onLoad(ActionForm form, HttpServletRequest request, int actionName) throws RemoteException, ClassNotFoundException, InvocationTargetException, InstantiationException, IllegalAccessException, EnrgiseApplicationException, EnrgiseSystemException {
BaseForm oBaseForm = (BaseForm)form;
String sFormName = form.getClass().getName();
String sScreenName = oBaseForm.getScreenName();
BaseDetailVO oBaseDetailVO = new BaseDetailVO();
UserSession oUser = getUserSessionBean(request);
BaseBD oBaseBD = getHeaderBusinessDelegate(form, request);
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
BeanUtils.copyProperties(oBaseHeaderBean, form);
ThisPageVO oThisPageVO = new ThisPageVO();
oThisPageVO.setActionName(actionName);
oThisPageVO.setOHeaderBean(oBaseHeaderBean);
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
oThisPageVO.setScreenName(oBaseForm.getScreenName());
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, sScreenName);
if (null != oBaseDetailVO) {
ArrayList oDetailList = getDetailArrayList(oBaseForm, sFormName, sScreenName);
oThisPageVO.setODetailList(oDetailList);
}
oBaseBD.onLoadAction(oThisPageVO);
if (oThisPageVO != null)
if (oThisPageVO.getOHeaderBean() != null)
BeanUtils.copyProperties(form, oThisPageVO.getOHeaderBean());
if (oThisPageVO.getODetailList() != null) {
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oThisPageVO.getODetailList());
}
}
protected void checkAccessInfo(UserSession oUserSession, String sComponentName, String sScreenMode, String sButtonName, int iActionName, String sWorkListId) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
HashMap oSecMap = oUserSession.getAccessInfo();
AccessBean objBean = (AccessBean)oSecMap.get(sComponentName);
if (!EnrgiseUtil.checkString(sWorkListId)) {
if (iActionName == 10 || iActionName == 14 || iActionName == 23)
if (!objBean.getInsertFlag().equalsIgnoreCase("Y")) {
ArrayList oParam = new ArrayList();
MessageKey oMessageKey = new MessageKey("right.for.insert");
oParam.add(oMessageKey);
throw new EnrgiseMessageKeyException("wenrgise.authorisation.error", oParam, "M");
}
if (iActionName == 8)
if (sScreenMode.equalsIgnoreCase("N")) {
if (!objBean.getInsertFlag().equalsIgnoreCase("Y")) {
ArrayList oParam = new ArrayList();
MessageKey oMessageKey = new MessageKey("right.for.insert");
oParam.add(oMessageKey);
throw new EnrgiseMessageKeyException("wenrgise.authorisation.error", oParam, "M");
}
} else if (sScreenMode.equalsIgnoreCase("U")) {
if (!objBean.getUpdateFlag().equalsIgnoreCase("Y")) {
ArrayList oParam = new ArrayList();
MessageKey oMessageKey = new MessageKey("right.for.update");
oParam.add(oMessageKey);
throw new EnrgiseMessageKeyException("wenrgise.authorisation.error", oParam, "M");
}
}
if (iActionName == 17 || iActionName == 15)
if (!objBean.getDeleteFlag().equalsIgnoreCase("Y")) {
ArrayList oParam = new ArrayList();
MessageKey oMessageKey = new MessageKey("right.for.delete");
oParam.add(oMessageKey);
throw new EnrgiseMessageKeyException("wenrgise.authorisation.error", oParam, "M");
}
}
}
protected String getComponentName(String sFormName) {
String sModFormName = sFormName.replace('.', ',');
int index = 0;
char g = ',';
char[] arrayModeFormName = sModFormName.toCharArray();
System.out.println(sModFormName.substring(index));
int k;
for (k = arrayModeFormName.length - 1; k > 0; k--) {
System.out.println(arrayModeFormName[k]);
if (arrayModeFormName[k] == g) {
index = k + 1;
break;
}
}
String sComponentName = sModFormName.substring(index, sModFormName.length());
return sComponentName;
}
public abstract ActionForward executeImpl(ActionMapping paramActionMapping, ActionForm paramActionForm, HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException;
}

View File

@@ -0,0 +1,64 @@
package wenrgise.hrms.webtier.action;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import wenrgise.common.bean.BaseDetailBean;
import wenrgise.common.exception.EnrgiseApplicationException;
import wenrgise.common.exception.EnrgiseSystemException;
import wenrgise.common.vo.BaseDetailVO;
import wenrgise.common.webtier.action.BaseAction;
import wenrgise.common.webtier.form.BaseForm;
import wenrgise.ejb.common.session.UserSession;
import wenrgise.ejb.common.utility.ParamUtil;
public class DecrAction extends BaseAction {
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
BaseForm oBaseForm = (BaseForm)form;
String sFormName = form.getClass().getName();
String sScreenName = oBaseForm.getScreenName();
UserSession oUser = getUserSessionBean(request);
BaseDetailVO oBaseDetailVO = oUser.getBaseDetailVO(sFormName, sScreenName);
int count = 0;
ArrayList oDetailArray = getDetailArray(oBaseForm);
try {
String[] itemChecked = oBaseForm.getItemChecked();
String[] sStatuss = oBaseForm.getStatus();
String[] sStartFields = BeanUtils.getArrayProperty(oBaseForm, "txtFromAmount");
System.out.println(itemChecked.length);
for (int i = 0; i < itemChecked.length; i++) {
if (itemChecked[i].equals("Y")) {
count++;
String sStartField = sStartFields[i];
for (int j = i + 1; j < itemChecked.length; j++) {
String sStatus = sStatuss[j];
if (!sStatus.equals("D")) {
sStartFields[j] = sStartField;
BaseDetailBean oBaseDetailBean = oDetailArray.get(j);
oBaseDetailBean.setStatus("U");
BeanUtils.setProperty(oBaseDetailBean, "txtFromAmount", sStartField);
oDetailArray.set(j, oBaseDetailBean);
break;
}
}
((BaseDetailBean)oDetailArray.get(i)).setStatus("D");
((BaseDetailBean)oDetailArray.get(i)).setItemChecked("N");
oBaseDetailVO.setRowDeleted(oBaseDetailVO.getRowDeleted() + 1);
}
}
} catch (NoSuchMethodException noSuchMethodException) {}
if (count == 0)
throw new EnrgiseApplicationException("wenrgise.common.norowselected");
if (count > 0)
oBaseForm.setDetailDataChanged(true);
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oDetailArray);
return mapping.findForward("success");
}
}

View File

@@ -0,0 +1,54 @@
package wenrgise.hrms.webtier.action;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.InvocationTargetException;
import java.util.Locale;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jxl.Workbook;
import jxl.WorkbookSettings;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import wenrgise.common.bean.BaseHeaderBean;
import wenrgise.common.exception.EnrgiseApplicationException;
import wenrgise.common.exception.EnrgiseSystemException;
import wenrgise.hrms.bean.HrmAdhocReportHdrBean;
import wenrgise.hrms.ejb.business.HrmAdhocReportBO;
import wenrgise.hrms.webtier.form.HrmAdhocReportForm;
public class HrmAdhocReportAction extends BaseAction {
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
response.setContentType("application/vnd.ms-excel");
WorkbookSettings ws = new WorkbookSettings();
ws.setLocale(new Locale("en", "EN"));
ServletOutputStream servletOutputStream = response.getOutputStream();
HrmAdhocReportForm oForm = (HrmAdhocReportForm)form;
String sFormName = oForm.getClass().getName();
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
BeanUtils.copyProperties(oBaseHeaderBean, oForm);
HrmAdhocReportBO oHrmAdhocReportBO = new HrmAdhocReportBO();
String reportName = oForm.getCode();
StringBuffer fileName = new StringBuffer("\\");
fileName.append(reportName);
fileName.append(".xls");
response.setHeader("Content-disposition", String.valueOf(String.valueOf("attachment; filename=\"").concat(String.valueOf(fileName.toString()))).concat(String.valueOf("\"")));
try {
WritableWorkbook workbook = Workbook.createWorkbook((OutputStream)servletOutputStream, ws);
WritableSheet s = workbook.createSheet(reportName, 0);
oHrmAdhocReportBO.downloadAdhocReport((HrmAdhocReportHdrBean)oBaseHeaderBean, s);
workbook.write();
workbook.close();
servletOutputStream.flush();
} catch (Exception e) {
e.printStackTrace();
}
return mapping.findForward("success");
}
}

View File

@@ -0,0 +1,101 @@
package wenrgise.hrms.webtier.action;
import java.io.IOException;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.HashMap;
import javax.ejb.CreateException;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import wenrgise.common.bean.EmpInfoBean;
import wenrgise.common.businessdelegate.SecurityBD;
import wenrgise.common.exception.EnrgiseSystemException;
import wenrgise.common.utility.ServiceLocator;
import wenrgise.common.utility.UserInfo;
import wenrgise.ejb.common.session.UserSession;
import wenrgise.ejb.common.session.UserSessionHome;
import wenrgise.ejb.common.utility.ParamUtil;
import wenrgise.hrms.ejb.facade.HrmFacade;
import wenrgise.hrms.ejb.facade.HrmFacadeHome;
import wenrgise.hrms.ejb.facade.HrmSecondFacade;
import wenrgise.hrms.ejb.facade.HrmSecondFacadeHome;
import wenrgise.hrms.ejb.facade.HrmThirdFacade;
import wenrgise.hrms.ejb.facade.HrmThirdFacadeHome;
import wenrgise.hrms.webtier.form.HrmBaseForm;
public class HrmGenLoginAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
Cookie[] cookies = request.getCookies();
String sEmpId = null;
String sSiteId = null;
if (null != cookies)
for (int i = 0; i < cookies.length; i++) {
if ("EmpId".equals(cookies[i].getName()))
sEmpId = cookies[i].getValue();
if ("SiteId".equals(cookies[i].getName()))
sSiteId = cookies[i].getValue();
}
HttpSession oSes = request.getSession();
HrmBaseForm oBaseForm = new HrmBaseForm();
oBaseForm.setEmpId(sEmpId);
try {
populateUserInfo(sEmpId, sSiteId, oSes);
} catch (EnrgiseSystemException enrgiseSystemException) {}
return mapping.findForward("success");
}
private UserInfo populateUserInfo(String sEmpId, String sSiteId, HttpSession session) throws EnrgiseSystemException {
UserInfo oUserInfo = new UserInfo();
try {
UserSession oUser = (UserSession)session.getAttribute(ParamUtil.getSessionBeanName());
if (oUser == null) {
UserSessionHome oUserHome = (UserSessionHome)ServiceLocator.getLocator().getService("HrmUserSession");
oUser = oUserHome.create();
HrmFacadeHome oHome = (HrmFacadeHome)ServiceLocator.getLocator().getService("HrmFacade");
HrmFacade oHrmFacade = oHome.create();
oUserInfo = oHrmFacade.getLoginUserInfo(sEmpId, sSiteId);
oUser.setUserInfo(oUserInfo);
HrmSecondFacadeHome oSecHome = (HrmSecondFacadeHome)ServiceLocator.getLocator().getService("HrmSecondFacade");
HrmSecondFacade oSecHrmFacade = oSecHome.create();
HrmThirdFacadeHome oThirdHome = (HrmThirdFacadeHome)ServiceLocator.getLocator().getService("HrmThirdFacade");
HrmThirdFacade oThirdFacade = oThirdHome.create();
HashMap oMap = new HashMap();
oMap.put(ParamUtil.getModuleName(), oHrmFacade);
oMap.put("SecHRMS", oSecHrmFacade);
oMap.put("ThirdHRMS", oThirdFacade);
oUser.setModuleFacade(oMap);
session.setAttribute(ParamUtil.getSessionBeanName(), oUser);
EmpInfoBean oEmpInfoBean = new EmpInfoBean();
oEmpInfoBean.setModuleId("8");
oEmpInfoBean.setEmpId(oUserInfo.getUserTypeId());
SecurityBD oSecurityBD = new SecurityBD();
ArrayList menu = oSecurityBD.getTreeSet(oEmpInfoBean);
HashMap secMap = oSecurityBD.getAccessInfo(oEmpInfoBean);
oUser.setAccessInfo(secMap);
session.setAttribute("menuList", menu);
session.setAttribute("userId", sEmpId);
}
} catch (RemoteException oRmt) {
oRmt.printStackTrace();
throw new EnrgiseSystemException();
} catch (CreateException oCrt) {
oCrt.printStackTrace();
throw new EnrgiseSystemException();
} catch (Exception oExCc) {
oExCc.printStackTrace();
throw new EnrgiseSystemException();
}
return oUserInfo;
}
private String getUserId(String sEmpId) {
return null;
}
}

View File

@@ -0,0 +1,110 @@
package wenrgise.hrms.webtier.action;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRRuntimeException;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.util.JRLoader;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import wenrgise.common.exception.EnrgiseApplicationException;
import wenrgise.common.exception.EnrgiseSystemException;
import wenrgise.common.utility.ServiceLocator;
import wenrgise.common.webtier.action.BaseAction;
import wenrgise.hrms.webtier.form.JasperReportForm;
public class ReportViewerAction extends BaseAction {
private String sDbName = "jdbc/conDS";
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
JasperReportForm oForm = (JasperReportForm)form;
req.setAttribute("reportBody", createJasperPrint(req, oForm));
return mapping.findForward("success");
}
protected JasperPrint createJasperPrint(HttpServletRequest req, JasperReportForm form) {
Map reportParams = null;
if (null != form)
reportParams = prepareReportInput(req, form);
createReportFileName(req, reportParams);
String repPath = req.getParameter("reportPath");
System.out.println(String.valueOf("Report Path is ..").concat(String.valueOf(repPath)));
File reportFile = new File(req.getSession(false).getServletContext().getRealPath(repPath));
if (!reportFile.exists())
throw new JRRuntimeException("File WebappReport.jasper not found. The report design must be compiled first.");
JasperReport jasperReport = null;
try {
jasperReport = (JasperReport)JRLoader.loadObject(reportFile.getPath());
} catch (JRException e) {
e.printStackTrace();
throw new RuntimeException("Exception while loading the report", e);
}
if (null == jasperReport)
throw new RuntimeException(String.valueOf("Report not found in Path ").concat(String.valueOf(repPath)));
if (null == reportParams)
reportParams = new HashMap(2, 1.0F);
reportParams.put("ReportTitle", req.getParameter("title"));
reportParams.put("BaseDir", reportFile.getParentFile());
reportParams.put("SUBREPORT_DIR", reportFile.getParentFile().getAbsolutePath());
Connection conn = null;
JasperPrint jasperPrint = null;
try {
Object dataSourceObj = ServiceLocator.getLocator().getLocalService(this.sDbName);
DataSource oDataSource = (DataSource)dataSourceObj;
conn = oDataSource.getConnection();
jasperPrint = JasperFillManager.fillReport(jasperReport, reportParams, conn);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("Exception while filling the report with data", e);
} finally {
if (null != conn)
try {
conn.close();
} catch (SQLException e) {
throw new RuntimeException("Exception while closing Connection ", e);
}
}
return jasperPrint;
}
private void createReportFileName(HttpServletRequest req, Map reportParams) {
StringBuffer fileName = new StringBuffer("attachment; filename=\"");
String repPath = req.getParameter("reportPath");
String reportName = req.getParameter("reportName");
if ("C".equalsIgnoreCase(req.getParameter("DOWNLOAD"))) {
fileName.append(reportName);
fileName.append(".csv\"");
} else if ("T".equalsIgnoreCase(req.getParameter("DOWNLOAD"))) {
fileName.append(reportName);
fileName.append(".txt\"");
} else if ("P".equalsIgnoreCase(req.getParameter("DOWNLOAD"))) {
fileName.append(reportName);
fileName.append(".pdf\"");
} else if ("E".equalsIgnoreCase(req.getParameter("DOWNLOAD"))) {
fileName.append(reportName);
fileName.append(".xls\"");
} else {
fileName.append(reportName);
fileName.append(".html\"");
}
req.setAttribute("fileName", fileName.toString());
}
protected Map prepareReportInput(HttpServletRequest req, JasperReportForm form) {
Map reportInput = (Map)form.getData(req);
return reportInput;
}
}

View File

@@ -0,0 +1,23 @@
package wenrgise.hrms.webtier.form;
public class HrmAcademicQualRepForm extends HrmBaseForm {
private String butInsertData;
private String disabbutInsertData;
public String getButInsertData() {
return this.butInsertData;
}
public void setButInsertData(String newButInsertData) {
this.butInsertData = newButInsertData;
}
public String getDisabbutInsertData() {
return this.disabbutInsertData;
}
public void setDisabbutInsertData(String newDisabbutInsertData) {
this.disabbutInsertData = newDisabbutInsertData;
}
}

View File

@@ -0,0 +1,305 @@
package wenrgise.hrms.webtier.form;
import java.util.ArrayList;
public class HrmAdhocReportForm extends JasperReportForm {
private String query;
private String butDownload;
private String disabbutDownload;
private String butQueryCode;
private String disabbutQueryCode;
private String id;
private String code;
private String query_desc;
private String category_tag;
private String param1;
private String param2;
private String param3;
private String param4;
private String param5;
private String param6;
private String param7;
private String param8;
private String param9;
private String param10;
private String paramval1;
private String paramval2;
private String paramval3;
private String paramval4;
private String paramval5;
private String paramval6;
private String paramval7;
private String paramval8;
private String paramval9;
private String paramval10;
private ArrayList arylstAdhocReport = new ArrayList();
public String getQuery() {
return this.query;
}
public void setQuery(String newQuery) {
this.query = newQuery;
}
public String getButDownload() {
return this.butDownload;
}
public void setButDownload(String newButDownload) {
this.butDownload = newButDownload;
}
public String getDisabbutDownload() {
return this.disabbutDownload;
}
public void setDisabbutDownload(String newDisabbutDownload) {
this.disabbutDownload = newDisabbutDownload;
}
public String getButQueryCode() {
return this.butQueryCode;
}
public void setButQueryCode(String newButQueryCode) {
this.butQueryCode = newButQueryCode;
}
public String getDisabbutQueryCode() {
return this.disabbutQueryCode;
}
public void setDisabbutQueryCode(String newDisabbutQueryCode) {
this.disabbutQueryCode = newDisabbutQueryCode;
}
public ArrayList getArylstAdhocReport() {
return this.arylstAdhocReport;
}
public void setArylstAdhocReport(ArrayList newArylstAdhocReport) {
this.arylstAdhocReport = newArylstAdhocReport;
}
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getQuery_desc() {
return this.query_desc;
}
public void setQuery_desc(String query_desc) {
this.query_desc = query_desc;
}
public String getCategory_tag() {
return this.category_tag;
}
public void setCategory_tag(String category_tag) {
this.category_tag = category_tag;
}
public String getParam1() {
return this.param1;
}
public void setParam1(String param1) {
this.param1 = param1;
}
public String getParam2() {
return this.param2;
}
public void setParam2(String param2) {
this.param2 = param2;
}
public String getParam3() {
return this.param3;
}
public void setParam3(String param3) {
this.param3 = param3;
}
public String getParam4() {
return this.param4;
}
public void setParam4(String param4) {
this.param4 = param4;
}
public String getParam5() {
return this.param5;
}
public void setParam5(String param5) {
this.param5 = param5;
}
public String getParam6() {
return this.param6;
}
public void setParam6(String param6) {
this.param6 = param6;
}
public String getParam7() {
return this.param7;
}
public void setParam7(String param7) {
this.param7 = param7;
}
public String getParam8() {
return this.param8;
}
public void setParam8(String param8) {
this.param8 = param8;
}
public String getParam9() {
return this.param9;
}
public void setParam9(String param9) {
this.param9 = param9;
}
public String getParam10() {
return this.param10;
}
public void setParam10(String param10) {
this.param10 = param10;
}
public String getParamval1() {
return this.paramval1;
}
public void setParamval1(String paramval1) {
this.paramval1 = paramval1;
}
public String getParamval2() {
return this.paramval2;
}
public void setParamval2(String paramval2) {
this.paramval2 = paramval2;
}
public String getParamval3() {
return this.paramval3;
}
public void setParamval3(String paramval3) {
this.paramval3 = paramval3;
}
public String getParamval4() {
return this.paramval4;
}
public void setParamval4(String paramval4) {
this.paramval4 = paramval4;
}
public String getParamval5() {
return this.paramval5;
}
public void setParamval5(String paramval5) {
this.paramval5 = paramval5;
}
public String getParamval6() {
return this.paramval6;
}
public void setParamval6(String paramval6) {
this.paramval6 = paramval6;
}
public String getParamval7() {
return this.paramval7;
}
public void setParamval7(String paramval7) {
this.paramval7 = paramval7;
}
public String getParamval8() {
return this.paramval8;
}
public void setParamval8(String paramval8) {
this.paramval8 = paramval8;
}
public String getParamval9() {
return this.paramval9;
}
public void setParamval9(String paramval9) {
this.paramval9 = paramval9;
}
public String getParamval10() {
return this.paramval10;
}
public void setParamval10(String paramval10) {
this.paramval10 = paramval10;
}
}

View File

@@ -0,0 +1,23 @@
package wenrgise.hrms.webtier.form;
public class HrmAgeAnalysisForm extends JasperReportForm {
private String butInsertData;
private String disabbutInsertData;
public String getButInsertData() {
return this.butInsertData;
}
public void setButInsertData(String newButInsertData) {
this.butInsertData = newButInsertData;
}
public String getDisabbutInsertData() {
return this.disabbutInsertData;
}
public void setDisabbutInsertData(String newDisabbutInsertData) {
this.disabbutInsertData = newDisabbutInsertData;
}
}

View File

@@ -0,0 +1,76 @@
package wenrgise.hrms.webtier.form;
import wenrgise.common.webtier.form.BaseForm;
public class HrmBaseForm extends BaseForm {
private String txtDisplayFields;
private String txtSearchFields;
private String listRowClass;
private String actionName;
String addIncrValue;
private String siteId;
private String empId = "";
public String getTxtDisplayFields() {
return this.txtDisplayFields;
}
public void setTxtDisplayFields(String newTxtDisplayFields) {
this.txtDisplayFields = newTxtDisplayFields;
}
public String getTxtSearchFields() {
return this.txtSearchFields;
}
public void setTxtSearchFields(String newTxtSearchFields) {
this.txtSearchFields = newTxtSearchFields;
}
public String getListRowClass() {
if ("oddRow".equals(this.listRowClass)) {
this.listRowClass = "evenRow";
} else {
this.listRowClass = "oddRow";
}
return this.listRowClass;
}
public String getActionName() {
return this.actionName;
}
public void setActionName(String newActionName) {
this.actionName = newActionName;
}
public String getAddIncrValue() {
return this.addIncrValue;
}
public void setAddIncrValue(String newAddIncrValue) {
this.addIncrValue = newAddIncrValue;
}
public String getSiteId() {
return this.siteId;
}
public void setSiteId(String newSiteId) {
this.siteId = newSiteId;
}
public String getEmpId() {
return this.empId;
}
public void setEmpId(String newEmpId) {
this.empId = newEmpId;
}
}

View File

@@ -0,0 +1,236 @@
package wenrgise.hrms.webtier.form;
import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
public class HrmMediclaimMasterForm extends HrmBaseForm {
private String claimCode;
private String txtClass;
private String cadre;
private boolean allEmp;
private String dependents;
private String[] coverName;
private String[] sumInsured;
private ArrayList arrHrmMediclaimMstDtl = new ArrayList();
private String[] selectAll;
private String[] salaryUnit;
private String[] premium;
private String[] ageFrom;
private String[] ageTo;
private String[] aicContribution;
private String[] documentRequired;
String txtClassId;
String txtCadreId;
String butTxtClass;
String butCadre;
private String allEmployeeApplicable;
String disabbutTxtClass;
String disabbutCadre;
public String getDisabbutTxtClass() {
return this.disabbutTxtClass;
}
public void setDisabbutTxtClass(String disabbutTxtClass) {
this.disabbutTxtClass = disabbutTxtClass;
}
public String getDisabbutCadre() {
return this.disabbutCadre;
}
public void setDisabbutCadre(String disabbutCadre) {
this.disabbutCadre = disabbutCadre;
}
public String getTxtClassId() {
return this.txtClassId;
}
public void setTxtClassId(String txtClassId) {
this.txtClassId = txtClassId;
}
public String getTxtCadreId() {
return this.txtCadreId;
}
public void setTxtCadreId(String txtCadreId) {
this.txtCadreId = txtCadreId;
}
public String getButTxtClass() {
return this.butTxtClass;
}
public void setButTxtClass(String butTxtClass) {
this.butTxtClass = butTxtClass;
}
public String getButCadre() {
return this.butCadre;
}
public void setButCadre(String butCadre) {
this.butCadre = butCadre;
}
public void reset(ActionMapping mapping, HttpServletRequest request) {
super.reset(mapping, request);
}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
return super.validate(mapping, request);
}
public String getClaimCode() {
return this.claimCode;
}
public void setClaimCode(String claimCode) {
this.claimCode = claimCode;
}
public String getTxtClass() {
return this.txtClass;
}
public void setTxtClass(String txtClass) {
this.txtClass = txtClass;
}
public String getCadre() {
return this.cadre;
}
public void setCadre(String cadre) {
this.cadre = cadre;
}
public boolean getAllEmp() {
return this.allEmp;
}
public void setAllEmp(boolean allEmp) {
this.allEmp = allEmp;
}
public String getDependents() {
return this.dependents;
}
public void setDependents(String dependents) {
this.dependents = dependents;
}
public String[] getCoverName() {
return this.coverName;
}
public void setCoverName(String[] coverName) {
this.coverName = coverName;
}
public String[] getSumInsured() {
return this.sumInsured;
}
public void setSumInsured(String[] sumInsured) {
this.sumInsured = sumInsured;
}
public ArrayList getArrHrmMediclaimMstDtl() {
return this.arrHrmMediclaimMstDtl;
}
public void setArrHrmMediclaimMstDtl(ArrayList newArrHrmMediclaimMstDtl) {
this.arrHrmMediclaimMstDtl = newArrHrmMediclaimMstDtl;
}
public String[] getSelectAll() {
return this.selectAll;
}
public void setSelectAll(String[] newSelectAll) {
this.selectAll = newSelectAll;
}
public String[] getSalaryUnit() {
return this.salaryUnit;
}
public void setSalaryUnit(String[] salaryUnit) {
this.salaryUnit = salaryUnit;
}
public String[] getPremium() {
return this.premium;
}
public void setPremium(String[] premium) {
this.premium = premium;
}
public String[] getAgeFrom() {
return this.ageFrom;
}
public void setAgeFrom(String[] ageFrom) {
this.ageFrom = ageFrom;
}
public String[] getAgeTo() {
return this.ageTo;
}
public void setAgeTo(String[] ageTo) {
this.ageTo = ageTo;
}
public String[] getAicContribution() {
return this.aicContribution;
}
public void setAicContribution(String[] aicContribution) {
this.aicContribution = aicContribution;
}
public String[] getDocumentRequired() {
return this.documentRequired;
}
public void setDocumentRequired(String[] documentRequired) {
this.documentRequired = documentRequired;
}
public String getAllEmployeeApplicable() {
return this.allEmployeeApplicable;
}
public void setAllEmployeeApplicable(String newAllEmployeeApplicable) {
this.allEmployeeApplicable = newAllEmployeeApplicable;
}
}

View File

@@ -0,0 +1,105 @@
package wenrgise.hrms.webtier.form;
import java.util.ArrayList;
public class HrmMisReportForm extends JasperReportForm {
private String[] txtPosition;
private String[] txtDesiredStrength;
private String optSelect;
private String[] butPosition;
private ArrayList arrMisReport = new ArrayList();
private String[] txtPositionId;
private String locationCode;
private String butGenRep;
private String disabbutGenRep;
private String txtYearMonth;
public String[] getTxtPosition() {
return this.txtPosition;
}
public void setTxtPosition(String[] newTxtPosition) {
this.txtPosition = newTxtPosition;
}
public String[] getTxtDesiredStrength() {
return this.txtDesiredStrength;
}
public void setTxtDesiredStrength(String[] newTxtDesiredStrength) {
this.txtDesiredStrength = newTxtDesiredStrength;
}
public String getOptSelect() {
return this.optSelect;
}
public void setOptSelect(String newOptSelect) {
this.optSelect = newOptSelect;
}
public String[] getButPosition() {
return this.butPosition;
}
public void setButPosition(String[] newButPosition) {
this.butPosition = newButPosition;
}
public ArrayList getArrMisReport() {
return this.arrMisReport;
}
public void setArrMisReport(ArrayList newArrMisReport) {
this.arrMisReport = newArrMisReport;
}
public String[] getTxtPositionId() {
return this.txtPositionId;
}
public void setTxtPositionId(String[] newTxtPositionId) {
this.txtPositionId = newTxtPositionId;
}
public String getLocationCode() {
return this.locationCode;
}
public void setLocationCode(String newLocationCode) {
this.locationCode = newLocationCode;
}
public String getButGenRep() {
return this.butGenRep;
}
public void setButGenRep(String newButGenRep) {
this.butGenRep = newButGenRep;
}
public String getDisabbutGenRep() {
return this.disabbutGenRep;
}
public void setDisabbutGenRep(String newDisabbutGenRep) {
this.disabbutGenRep = newDisabbutGenRep;
}
public String getTxtYearMonth() {
return this.txtYearMonth;
}
public void setTxtYearMonth(String newTxtYearMonth) {
this.txtYearMonth = newTxtYearMonth;
}
}

View File

@@ -0,0 +1,195 @@
package wenrgise.hrms.webtier.form;
import java.util.ArrayList;
public class HrmMyWorkflowForm extends HrmBaseForm {
private String workflowType;
private String txtStatus;
private String id;
private String requestType;
private String selectAll;
private String[] requestId;
private String[] requestor;
private String[] requestorName;
private String[] approver;
private String[] approverName;
private String[] level;
private String[] docDtlId;
private String employeeNoId;
private String butId;
private String disabbutId;
private String butAct;
private String disabbutAct;
private String disabselectAll;
private ArrayList arrHrmMyWorkflowDtl = new ArrayList();
public String getWorkflowType() {
return this.workflowType;
}
public void setWorkflowType(String newWorkflowType) {
this.workflowType = newWorkflowType;
}
public String getTxtStatus() {
return this.txtStatus;
}
public void setTxtStatus(String newTxtStatus) {
this.txtStatus = newTxtStatus;
}
public String getId() {
return this.id;
}
public void setId(String newId) {
this.id = newId;
}
public String getRequestType() {
return this.requestType;
}
public void setRequestType(String newRequestType) {
this.requestType = newRequestType;
}
public String[] getRequestId() {
return this.requestId;
}
public void setRequestId(String[] newRequestId) {
this.requestId = newRequestId;
}
public String[] getRequestor() {
return this.requestor;
}
public void setRequestor(String[] newRequestor) {
this.requestor = newRequestor;
}
public String[] getRequestorName() {
return this.requestorName;
}
public void setRequestorName(String[] newRequestorName) {
this.requestorName = newRequestorName;
}
public String[] getApprover() {
return this.approver;
}
public void setApprover(String[] newApprover) {
this.approver = newApprover;
}
public String[] getApproverName() {
return this.approverName;
}
public void setApproverName(String[] newApproverName) {
this.approverName = newApproverName;
}
public String[] getLevel() {
return this.level;
}
public void setLevel(String[] newLevel) {
this.level = newLevel;
}
public String getEmployeeNoId() {
return this.employeeNoId;
}
public void setEmployeeNoId(String newEmployeeNoId) {
this.employeeNoId = newEmployeeNoId;
}
public String getButAct() {
return this.butAct;
}
public void setButAct(String butAct) {
this.butAct = butAct;
}
public String getDisabbutAct() {
return this.disabbutAct;
}
public void setDisabbutAct(String disabbutAct) {
this.disabbutAct = disabbutAct;
}
public String[] getDocDtlId() {
return this.docDtlId;
}
public void setDocDtlId(String[] docDtlId) {
this.docDtlId = docDtlId;
}
public ArrayList getArrHrmMyWorkflowDtl() {
return this.arrHrmMyWorkflowDtl;
}
public void setArrHrmMyWorkflowDtl(ArrayList arrHrmMyWorkflowDtl) {
this.arrHrmMyWorkflowDtl = arrHrmMyWorkflowDtl;
}
public String getSelectAll() {
return this.selectAll;
}
public void setSelectAll(String selectAll) {
this.selectAll = selectAll;
}
public String getDisabselectAll() {
return this.disabselectAll;
}
public void setDisabselectAll(String disabselectAll) {
this.disabselectAll = disabselectAll;
}
public String getButId() {
return this.butId;
}
public void setButId(String newButId) {
this.butId = newButId;
}
public String getDisabbutId() {
return this.disabbutId;
}
public void setDisabbutId(String disabbutId) {
this.disabbutId = disabbutId;
}
}

View File

@@ -0,0 +1,86 @@
package wenrgise.hrms.webtier.form;
import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
public class HrmOrgDistMstForm extends HrmBaseForm {
private String[] txtDistrictCode;
private String[] txtDistrictName;
private String selectAll;
private ArrayList arrHrmDistrictDtl = new ArrayList();
private String disabselectAll;
private String disabtxtDistrictCode;
private String disabtxtDistrictName;
public void reset(ActionMapping mapping, HttpServletRequest request) {
super.reset(mapping, request);
}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
return super.validate(mapping, request);
}
public String[] getTxtDistrictCode() {
return this.txtDistrictCode;
}
public void setTxtDistrictCode(String[] newTxtDistrictCode) {
this.txtDistrictCode = newTxtDistrictCode;
}
public String[] getTxtDistrictName() {
return this.txtDistrictName;
}
public void setTxtDistrictName(String[] newTxtDistrictName) {
this.txtDistrictName = newTxtDistrictName;
}
public String getSelectAll() {
return this.selectAll;
}
public ArrayList getArrHrmDistrictDtl() {
return this.arrHrmDistrictDtl;
}
public void setArrHrmDistrictDtl(ArrayList newArrHrmDistrictDtl) {
this.arrHrmDistrictDtl = newArrHrmDistrictDtl;
}
public void setSelectAll(String newSelectAll) {
this.selectAll = newSelectAll;
}
public String getDisabselectAll() {
return this.disabselectAll;
}
public void setDisabselectAll(String newDisabselectAll) {
this.disabselectAll = newDisabselectAll;
}
public String getDisabtxtDistrictCode() {
return this.disabtxtDistrictCode;
}
public void setDisabtxtDistrictCode(String newDisabtxtDistrictCode) {
this.disabtxtDistrictCode = newDisabtxtDistrictCode;
}
public String getDisabtxtDistrictName() {
return this.disabtxtDistrictName;
}
public void setDisabtxtDistrictName(String newDisabtxtDistrictName) {
this.disabtxtDistrictName = newDisabtxtDistrictName;
}
}

View File

@@ -0,0 +1,86 @@
package wenrgise.hrms.webtier.form;
import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
public class HrmOrgTehMstForm extends HrmBaseForm {
private String[] txtTehsilCode;
private String[] txtTehsilName;
private String selectAll;
private ArrayList arrHrmTehsilDtl = new ArrayList();
private String disabselectAll;
private String disabtxtTehsilCode;
private String disabtxtTehsilName;
public void reset(ActionMapping mapping, HttpServletRequest request) {
super.reset(mapping, request);
}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
return super.validate(mapping, request);
}
public String[] getTxtTehsilCode() {
return this.txtTehsilCode;
}
public void setTxtTehsilCode(String[] newTxtTehsilCode) {
this.txtTehsilCode = newTxtTehsilCode;
}
public String[] getTxtTehsilName() {
return this.txtTehsilName;
}
public void setTxtTehsilName(String[] newTxtTehsilName) {
this.txtTehsilName = newTxtTehsilName;
}
public String getSelectAll() {
return this.selectAll;
}
public ArrayList getArrHrmTehsilDtl() {
return this.arrHrmTehsilDtl;
}
public void setArrHrmTehsilDtl(ArrayList newArrHrmTehsilDtl) {
this.arrHrmTehsilDtl = newArrHrmTehsilDtl;
}
public void setSelectAll(String newSelectAll) {
this.selectAll = newSelectAll;
}
public String getDisabselectAll() {
return this.disabselectAll;
}
public void setDisabselectAll(String newDisabselectAll) {
this.disabselectAll = newDisabselectAll;
}
public String getDisabtxtTehsilCode() {
return this.disabtxtTehsilCode;
}
public void setDisabtxtTehsilCode(String newDisabtxtTehsilCode) {
this.disabtxtTehsilCode = newDisabtxtTehsilCode;
}
public String getDisabtxtTehsilName() {
return this.disabtxtTehsilName;
}
public void setDisabtxtTehsilName(String newDisabtxtTehsilName) {
this.disabtxtTehsilName = newDisabtxtTehsilName;
}
}

View File

@@ -0,0 +1,123 @@
package wenrgise.hrms.webtier.form;
public class HrmRetireForecastForm extends HrmBaseForm {
private String fromDate;
private String toDate;
private String butFromDate;
private String disabbutFromDate;
private String disabbutToDate;
private String butGenReport;
private String disabbutGenReport;
private String butViewReport;
private String disabbutViewReport;
private String butInsertData;
private String disabbutInsertData;
private String flag1;
public String getFromDate() {
return this.fromDate;
}
public void setFromDate(String newFromDate) {
this.fromDate = newFromDate;
}
public String getToDate() {
return this.toDate;
}
public void setToDate(String newToDate) {
this.toDate = newToDate;
}
public String getButFromDate() {
return this.butFromDate;
}
public void setButFromDate(String newButFromDate) {
this.butFromDate = newButFromDate;
}
public String getDisabbutFromDate() {
return this.disabbutFromDate;
}
public void setDisabbutFromDate(String newDisabbutFromDate) {
this.disabbutFromDate = newDisabbutFromDate;
}
public String getDisabbutToDate() {
return this.disabbutToDate;
}
public void setDisabbutToDate(String newDisabbutToDate) {
this.disabbutToDate = newDisabbutToDate;
}
public String getButGenReport() {
return this.butGenReport;
}
public void setButGenReport(String newButGenReport) {
this.butGenReport = newButGenReport;
}
public String getDisabbutGenReport() {
return this.disabbutGenReport;
}
public void setDisabbutGenReport(String newDisabbutGenReport) {
this.disabbutGenReport = newDisabbutGenReport;
}
public String getButViewReport() {
return this.butViewReport;
}
public void setButViewReport(String newButViewReport) {
this.butViewReport = newButViewReport;
}
public String getDisabbutViewReport() {
return this.disabbutViewReport;
}
public void setDisabbutViewReport(String newDisabbutViewReport) {
this.disabbutViewReport = newDisabbutViewReport;
}
public String getButInsertData() {
return this.butInsertData;
}
public void setButInsertData(String newButInsertData) {
this.butInsertData = newButInsertData;
}
public String getDisabbutInsertData() {
return this.disabbutInsertData;
}
public void setDisabbutInsertData(String newDisabbutInsertData) {
this.disabbutInsertData = newDisabbutInsertData;
}
public String getFlag1() {
return this.flag1;
}
public void setFlag1(String newFlag1) {
this.flag1 = newFlag1;
}
}

View File

@@ -0,0 +1,266 @@
package wenrgise.hrms.webtier.form;
import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
public class HrmRoasterEntryForm extends HrmBaseForm {
private String txtRoasterCode;
private String txtRoasterDescription;
private String roasterCodeId;
private String disabtxtRoasterCode;
private String selectAll;
private String butRoasterCode;
private String disabbutRoasterCode;
private String disabtxtRoasterDescription;
private String[] txtEmployeeNo;
private String[] txtEmployeeName;
private String[] txtAppointmentDate;
private String[] txtDob;
private String[] txtCategory;
private String[] txtRoasterPoint;
private String[] txtCategoryAsPerRoaster;
private String[] socialStatus;
private String[] empNoId;
private String[] txtCategoryId;
private String butCategoryAsPerRoaster;
private String disabbutCategoryAsPerRoaster;
private String butEmployeeNo;
private String disabbutEmployeeNo;
private ArrayList arrHrmRoasterEntryDtl = new ArrayList();
private String disabselectAll;
private String[] entryMode;
public void reset(ActionMapping mapping, HttpServletRequest request) {
super.reset(mapping, request);
}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
return super.validate(mapping, request);
}
public String getSelectAll() {
return this.selectAll;
}
public void setSelectAll(String selectAll) {
this.selectAll = selectAll;
}
public ArrayList getArrHrmRoasterEntryDtl() {
return this.arrHrmRoasterEntryDtl;
}
public void setArrHrmRoasterEntryDtl(ArrayList arrHrmRoasterEntryDtl) {
this.arrHrmRoasterEntryDtl = arrHrmRoasterEntryDtl;
}
public String getDisabselectAll() {
return this.disabselectAll;
}
public void setDisabselectAll(String disabselectAll) {
this.disabselectAll = disabselectAll;
}
public String getTxtRoasterCode() {
return this.txtRoasterCode;
}
public void setTxtRoasterCode(String txtRoasterCode) {
this.txtRoasterCode = txtRoasterCode;
}
public String getTxtRoasterDescription() {
return this.txtRoasterDescription;
}
public void setTxtRoasterDescription(String newTxtRoasterDescription) {
this.txtRoasterDescription = newTxtRoasterDescription;
}
public String[] getTxtRoasterPoint() {
return this.txtRoasterPoint;
}
public void setTxtRoasterPoint(String[] txtRoasterPoint) {
this.txtRoasterPoint = txtRoasterPoint;
}
public String[] getTxtCategoryAsPerRoaster() {
return this.txtCategoryAsPerRoaster;
}
public void setTxtCategoryAsPerRoaster(String[] txtCategoryAsPerRoaster) {
this.txtCategoryAsPerRoaster = txtCategoryAsPerRoaster;
}
public String getDisabtxtRoasterDescription() {
return this.disabtxtRoasterDescription;
}
public void setDisabtxtRoasterDescription(String newDisabtxtRoasterDescription) {
this.disabtxtRoasterDescription = newDisabtxtRoasterDescription;
}
public String getDisabtxtRoasterCode() {
return this.disabtxtRoasterCode;
}
public void setDisabtxtRoasterCode(String newDisabtxtRoasterCode) {
this.disabtxtRoasterCode = newDisabtxtRoasterCode;
}
public String[] getSocialStatus() {
return this.socialStatus;
}
public void setSocialStatus(String[] socialStatus) {
this.socialStatus = socialStatus;
}
public String[] getEmpNoId() {
return this.empNoId;
}
public void setEmpNoId(String[] empNoId) {
this.empNoId = empNoId;
}
public String[] getTxtCategoryId() {
return this.txtCategoryId;
}
public void setTxtCategoryId(String[] txtCategoryId) {
this.txtCategoryId = txtCategoryId;
}
public String getRoasterCodeId() {
return this.roasterCodeId;
}
public void setRoasterCodeId(String newRoasterCodeId) {
this.roasterCodeId = newRoasterCodeId;
}
public String getButRoasterCode() {
return this.butRoasterCode;
}
public void setButRoasterCode(String newButRoasterCode) {
this.butRoasterCode = newButRoasterCode;
}
public String getDisabbutRoasterCode() {
return this.disabbutRoasterCode;
}
public void setDisabbutRoasterCode(String newDisabbutRoasterCode) {
this.disabbutRoasterCode = newDisabbutRoasterCode;
}
public String getButCategoryAsPerRoaster() {
return this.butCategoryAsPerRoaster;
}
public void setButCategoryAsPerRoaster(String newButCategoryAsPerRoaster) {
this.butCategoryAsPerRoaster = newButCategoryAsPerRoaster;
}
public String getDisabbutCategoryAsPerRoaster() {
return this.disabbutCategoryAsPerRoaster;
}
public void setDisabbutCategoryAsPerRoaster(String newDisabbutCategoryAsPerRoaster) {
this.disabbutCategoryAsPerRoaster = newDisabbutCategoryAsPerRoaster;
}
public String[] getTxtEmployeeNo() {
return this.txtEmployeeNo;
}
public void setTxtEmployeeNo(String[] txtEmployeeNo) {
this.txtEmployeeNo = txtEmployeeNo;
}
public String[] getTxtEmployeeName() {
return this.txtEmployeeName;
}
public void setTxtEmployeeName(String[] txtEmployeeName) {
this.txtEmployeeName = txtEmployeeName;
}
public String[] getTxtAppointmentDate() {
return this.txtAppointmentDate;
}
public void setTxtAppointmentDate(String[] txtAppointmentDate) {
this.txtAppointmentDate = txtAppointmentDate;
}
public String[] getTxtDob() {
return this.txtDob;
}
public void setTxtDob(String[] txtDob) {
this.txtDob = txtDob;
}
public String[] getTxtCategory() {
return this.txtCategory;
}
public void setTxtCategory(String[] txtCategory) {
this.txtCategory = txtCategory;
}
public String getButEmployeeNo() {
return this.butEmployeeNo;
}
public void setButEmployeeNo(String newButEmployeeNo) {
this.butEmployeeNo = newButEmployeeNo;
}
public String getDisabbutEmployeeNo() {
return this.disabbutEmployeeNo;
}
public void setDisabbutEmployeeNo(String newDisabbutEmployeeNo) {
this.disabbutEmployeeNo = newDisabbutEmployeeNo;
}
public String[] getEntryMode() {
return this.entryMode;
}
public void setEntryMode(String[] entryMode) {
this.entryMode = entryMode;
}
}

View File

@@ -0,0 +1,44 @@
package wenrgise.hrms.webtier.form;
import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
public class JasperReportForm extends HrmBaseForm {
private static final long serialVersionUID = 19981017L;
private String downloadOption;
public String getDownloadOption() {
return this.downloadOption;
}
public void setDownloadOption(String newDownloadOption) {
this.downloadOption = newDownloadOption;
}
public Serializable getData(HttpServletRequest req) {
HashMap data = new HashMap();
Class formBeanClass = getClass();
Method[] methods = formBeanClass.getDeclaredMethods();
StringBuffer fieldName = new StringBuffer();
for (int i = 0; i < methods.length; i++) {
String methodName = methods[i].getName();
if (methodName.startsWith("get") && (
methods[i].getParameterTypes()).length <= 0)
try {
Object val = methods[i].invoke(this, null);
if (null != val && val instanceof String && ((String)val).trim().length() == 0)
val = null;
fieldName.append(methodName.substring(3, 4).toLowerCase());
fieldName.append(methodName.substring(4));
data.put(fieldName.toString(), val);
fieldName.delete(0, fieldName.length());
} catch (Exception e) {
e.printStackTrace();
}
}
return data;
}
}

View File

@@ -0,0 +1,33 @@
package wenrgise.hrms.webtier.form;
public class ReportInputForm extends JasperReportForm {
private String txtYear;
private String txtMonth;
private String disabtxtMonth;
public String getTxtYear() {
return this.txtYear;
}
public void setTxtYear(String newTxtYear) {
this.txtYear = newTxtYear;
}
public String getTxtMonth() {
return this.txtMonth;
}
public void setTxtMonth(String newTxtMonth) {
this.txtMonth = newTxtMonth;
}
public String getDisabtxtMonth() {
return this.disabtxtMonth;
}
public void setDisabtxtMonth(String newDisabtxtMonth) {
this.disabtxtMonth = newDisabtxtMonth;
}
}