docs: @Override
  	public List<CommerceAccount> filterFindByCompanyId(long companyId,
  		int start, int end, OrderByComparator<CommerceAccount> orderByComparator) {
  		if (!InlineSQLHelperUtil.isEnabled(companyId, 0)) {
  			return findByCompanyId(companyId, start, end, orderByComparator);
  		}
  
  		StringBundler query = null;
  
  		if (orderByComparator != null) {
  			query = new StringBundler(3 +
  					(orderByComparator.getOrderByFields().length * 2));
  		}
  		else {
  			query = new StringBundler(4);
  		}
  
  		if (getDB().isSupportsInlineDistinct()) {
  			query.append(_FILTER_SQL_SELECT_COMMERCEACCOUNT_WHERE);
  		}
  		else {
  			query.append(_FILTER_SQL_SELECT_COMMERCEACCOUNT_NO_INLINE_DISTINCT_WHERE_1);
  		}
  
  		query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
  
  		if (!getDB().isSupportsInlineDistinct()) {
  			query.append(_FILTER_SQL_SELECT_COMMERCEACCOUNT_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(CommerceAccountModelImpl.ORDER_BY_JPQL);
  			}
  			else {
  				query.append(CommerceAccountModelImpl.ORDER_BY_SQL);
  			}
  		}
  
  		String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(),
  				CommerceAccount.class.getName(),
  				_FILTER_ENTITY_TABLE_FILTER_PK_COLUMN);
  
  		Session session = null;
  
  		try {
  			session = openSession();
  
  			SQLQuery q = session.createSynchronizedSQLQuery(sql);
  
  			if (getDB().isSupportsInlineDistinct()) {
  				q.addEntity(_FILTER_ENTITY_ALIAS, CommerceAccountImpl.class);
  			}
  			else {
  				q.addEntity(_FILTER_ENTITY_TABLE, CommerceAccountImpl.class);
  			}
  
  			QueryPos qPos = QueryPos.getInstance(q);
  
  			qPos.add(companyId);
  
  			return (List<CommerceAccount>)QueryUtil.list(q, getDialect(),
  				start, end);
  		}
  		catch (Exception e) {
  			throw processException(e);
  		}
  		finally {
  			closeSession(session);
  		}
  	}