docs: @Override
  	public List<CommerceNotificationTemplate> findByG_T_E(long groupId,
  		String type, boolean enabled, int start, int end,
  		OrderByComparator<CommerceNotificationTemplate> orderByComparator,
  		boolean retrieveFromCache) {
  		boolean pagination = true;
  		FinderPath finderPath = null;
  		Object[] finderArgs = null;
  
  		if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
  				(orderByComparator == null)) {
  			pagination = false;
  			finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_T_E;
  			finderArgs = new Object[] { groupId, type, enabled };
  		}
  		else {
  			finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_T_E;
  			finderArgs = new Object[] {
  					groupId, type, enabled,
  					
  					start, end, orderByComparator
  				};
  		}
  
  		List<CommerceNotificationTemplate> list = null;
  
  		if (retrieveFromCache) {
  			list = (List<CommerceNotificationTemplate>)finderCache.getResult(finderPath,
  					finderArgs, this);
  
  			if ((list != null) && !list.isEmpty()) {
  				for (CommerceNotificationTemplate commerceNotificationTemplate : list) {
  					if ((groupId != commerceNotificationTemplate.getGroupId()) ||
  							!Objects.equals(type,
  								commerceNotificationTemplate.getType()) ||
  							(enabled != commerceNotificationTemplate.isEnabled())) {
  						list = null;
  
  						break;
  					}
  				}
  			}
  		}
  
  		if (list == null) {
  			StringBundler query = null;
  
  			if (orderByComparator != null) {
  				query = new StringBundler(5 +
  						(orderByComparator.getOrderByFields().length * 2));
  			}
  			else {
  				query = new StringBundler(5);
  			}
  
  			query.append(_SQL_SELECT_COMMERCENOTIFICATIONTEMPLATE_WHERE);
  
  			query.append(_FINDER_COLUMN_G_T_E_GROUPID_2);
  
  			boolean bindType = false;
  
  			if (type == null) {
  				query.append(_FINDER_COLUMN_G_T_E_TYPE_1);
  			}
  			else if (type.equals("")) {
  				query.append(_FINDER_COLUMN_G_T_E_TYPE_3);
  			}
  			else {
  				bindType = true;
  
  				query.append(_FINDER_COLUMN_G_T_E_TYPE_2);
  			}
  
  			query.append(_FINDER_COLUMN_G_T_E_ENABLED_2);
  
  			if (orderByComparator != null) {
  				appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
  					orderByComparator);
  			}
  			else
  			 if (pagination) {
  				query.append(CommerceNotificationTemplateModelImpl.ORDER_BY_JPQL);
  			}
  
  			String sql = query.toString();
  
  			Session session = null;
  
  			try {
  				session = openSession();
  
  				Query q = session.createQuery(sql);
  
  				QueryPos qPos = QueryPos.getInstance(q);
  
  				qPos.add(groupId);
  
  				if (bindType) {
  					qPos.add(type);
  				}
  
  				qPos.add(enabled);
  
  				if (!pagination) {
  					list = (List<CommerceNotificationTemplate>)QueryUtil.list(q,
  							getDialect(), start, end, false);
  
  					Collections.sort(list);
  
  					list = Collections.unmodifiableList(list);
  				}
  				else {
  					list = (List<CommerceNotificationTemplate>)QueryUtil.list(q,
  							getDialect(), start, end);
  				}
  
  				cacheResult(list);
  
  				finderCache.putResult(finderPath, finderArgs, list);
  			}
  			catch (Exception e) {
  				finderCache.removeResult(finderPath, finderArgs);
  
  				throw processException(e);
  			}
  			finally {
  				closeSession(session);
  			}
  		}
  
  		return list;
  	}