docs: @Override
  	public CPInstance fetchByC_S(long CPDefinitionId, String sku,
  		boolean retrieveFromCache) {
  		Object[] finderArgs = new Object[] { CPDefinitionId, sku };
  
  		Object result = null;
  
  		if (retrieveFromCache) {
  			result = finderCache.getResult(FINDER_PATH_FETCH_BY_C_S,
  					finderArgs, this);
  		}
  
  		if (result instanceof CPInstance) {
  			CPInstance cpInstance = (CPInstance)result;
  
  			if ((CPDefinitionId != cpInstance.getCPDefinitionId()) ||
  					!Objects.equals(sku, cpInstance.getSku())) {
  				result = null;
  			}
  		}
  
  		if (result == null) {
  			StringBundler query = new StringBundler(4);
  
  			query.append(_SQL_SELECT_CPINSTANCE_WHERE);
  
  			query.append(_FINDER_COLUMN_C_S_CPDEFINITIONID_2);
  
  			boolean bindSku = false;
  
  			if (sku == null) {
  				query.append(_FINDER_COLUMN_C_S_SKU_1);
  			}
  			else if (sku.equals("")) {
  				query.append(_FINDER_COLUMN_C_S_SKU_3);
  			}
  			else {
  				bindSku = true;
  
  				query.append(_FINDER_COLUMN_C_S_SKU_2);
  			}
  
  			String sql = query.toString();
  
  			Session session = null;
  
  			try {
  				session = openSession();
  
  				Query q = session.createQuery(sql);
  
  				QueryPos qPos = QueryPos.getInstance(q);
  
  				qPos.add(CPDefinitionId);
  
  				if (bindSku) {
  					qPos.add(sku);
  				}
  
  				List<CPInstance> list = q.list();
  
  				if (list.isEmpty()) {
  					finderCache.putResult(FINDER_PATH_FETCH_BY_C_S, finderArgs,
  						list);
  				}
  				else {
  					CPInstance cpInstance = list.get(0);
  
  					result = cpInstance;
  
  					cacheResult(cpInstance);
  				}
  			}
  			catch (Exception e) {
  				finderCache.removeResult(FINDER_PATH_FETCH_BY_C_S, finderArgs);
  
  				throw processException(e);
  			}
  			finally {
  				closeSession(session);
  			}
  		}
  
  		if (result instanceof List<?>) {
  			return null;
  		}
  		else {
  			return (CPInstance)result;
  		}
  	}