public EventEmailFeatureBean getEventEmailFeature(EventEmailFeatureBean eventEmailFeatureBean) { EventEmailFeatureBean finalFeatureBean = new EventEmailFeatureBean(); if (eventEmailFeatureBean != null && !Utility.isNullOrEmpty(eventEmailFeatureBean.getEventEmailId())) { String sQuery = "SELECT * FROM GTEVENTEMAILFEATURES WHERE FEATURENAME = ? AND FK_EVENTEMAILID = ?"; ArrayList<Object> aParams = DBDAO.createConstraint( eventEmailFeatureBean.getFeatureType().toString(), eventEmailFeatureBean.getEventEmailId()); ArrayList<HashMap<String, String>> arrResult = DBDAO.getDBData( EVENTADMIN_DB, sQuery, aParams, false, "EventEmailFeatureData.java", "getEventEmailFeature()"); if (arrResult != null && !arrResult.isEmpty()) { for (HashMap<String, String> hmResult : arrResult) { finalFeatureBean = new EventEmailFeatureBean(hmResult); } } } return finalFeatureBean; }
public ArrayList<EventEmailFeatureBean> getMultipleFeatures( ArrayList<EventEmailFeatureBean> arrEventEmailFeatureBean, String sEventEmailId) { ArrayList<EventEmailFeatureBean> arrMultipleFeatureBean = new ArrayList<EventEmailFeatureBean>(); String sQuery = "SELECT * FROM GTEVENTEMAILFEATURES WHERE FK_EVENTEMAILID = ? "; ArrayList<Object> aParams = DBDAO.createConstraint(sEventEmailId); if (arrEventEmailFeatureBean != null && !arrEventEmailFeatureBean.isEmpty()) { sQuery = sQuery + " AND FEATURENAME IN (" + DBDAO.createParamQuestionMarks(arrEventEmailFeatureBean.size()) + ")"; for (EventEmailFeatureBean tmpventEmailFeatureBean : arrEventEmailFeatureBean) { aParams.add(tmpventEmailFeatureBean.getFeatureType().toString()); } } ArrayList<HashMap<String, String>> arrResult = DBDAO.getDBData( EVENTADMIN_DB, sQuery, aParams, false, "EventEmailFeatureData.java", "getMultipleFeatures()"); if (arrResult != null && !arrResult.isEmpty()) { for (HashMap<String, String> hmResult : arrResult) { EventEmailFeatureBean eventEmailFeatureBean = new EventEmailFeatureBean(hmResult); arrMultipleFeatureBean.add(eventEmailFeatureBean); } } return arrMultipleFeatureBean; }