docs: @Override
  	public List<CommerceNotificationTemplate> filterFindByG_T_E(long groupId,
  		String type, boolean enabled, int start, int end,
  		OrderByComparator<CommerceNotificationTemplate> orderByComparator) {
  		if (!InlineSQLHelperUtil.isEnabled(groupId)) {
  			return findByG_T_E(groupId, type, enabled, start, end,
  				orderByComparator);
  		}
  
  		StringBundler query = null;
  
  		if (orderByComparator != null) {
  			query = new StringBundler(5 +
  					(orderByComparator.getOrderByFields().length * 2));
  		}
  		else {
  			query = new StringBundler(6);
  		}
  
  		if (getDB().isSupportsInlineDistinct()) {
  			query.append(_FILTER_SQL_SELECT_COMMERCENOTIFICATIONTEMPLATE_WHERE);
  		}
  		else {
  			query.append(_FILTER_SQL_SELECT_COMMERCENOTIFICATIONTEMPLATE_NO_INLINE_DISTINCT_WHERE_1);
  		}
  
  		query.append(_FINDER_COLUMN_G_T_E_GROUPID_2);
  
  		boolean bindType = false;
  
  		if (type == null) {
  			query.append(_FINDER_COLUMN_G_T_E_TYPE_1_SQL);
  		}
  		else if (type.equals("")) {
  			query.append(_FINDER_COLUMN_G_T_E_TYPE_3_SQL);
  		}
  		else {
  			bindType = true;
  
  			query.append(_FINDER_COLUMN_G_T_E_TYPE_2_SQL);
  		}
  
  		query.append(_FINDER_COLUMN_G_T_E_ENABLED_2);
  
  		if (!getDB().isSupportsInlineDistinct()) {
  			query.append(_FILTER_SQL_SELECT_COMMERCENOTIFICATIONTEMPLATE_NO_INLINE_DISTINCT_WHERE_2);
  		}
  
  		if (orderByComparator != null) {
  			if (getDB().isSupportsInlineDistinct()) {
  				appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
  					orderByComparator, true);
  			}
  			else {
  				appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE,
  					orderByComparator, true);
  			}
  		}
  		else {
  			if (getDB().isSupportsInlineDistinct()) {
  				query.append(CommerceNotificationTemplateModelImpl.ORDER_BY_JPQL);
  			}
  			else {
  				query.append(CommerceNotificationTemplateModelImpl.ORDER_BY_SQL);
  			}
  		}
  
  		String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(),
  				CommerceNotificationTemplate.class.getName(),
  				_FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
  
  		Session session = null;
  
  		try {
  			session = openSession();
  
  			SQLQuery q = session.createSynchronizedSQLQuery(sql);
  
  			if (getDB().isSupportsInlineDistinct()) {
  				q.addEntity(_FILTER_ENTITY_ALIAS,
  					CommerceNotificationTemplateImpl.class);
  			}
  			else {
  				q.addEntity(_FILTER_ENTITY_TABLE,
  					CommerceNotificationTemplateImpl.class);
  			}
  
  			QueryPos qPos = QueryPos.getInstance(q);
  
  			qPos.add(groupId);
  
  			if (bindType) {
  				qPos.add(type);
  			}
  
  			qPos.add(enabled);
  
  			return (List<CommerceNotificationTemplate>)QueryUtil.list(q,
  				getDialect(), start, end);
  		}
  		catch (Exception e) {
  			throw processException(e);
  		}
  		finally {
  			closeSession(session);
  		}
  	}