@Override
	public CommerceOrderPayment fetchByPrimaryKey(Serializable primaryKey) {
		Serializable serializable = entityCache.getResult(CommerceOrderPaymentModelImpl.ENTITY_CACHE_ENABLED,
				CommerceOrderPaymentImpl.class, primaryKey);

		if (serializable == nullModel) {
			return null;
		}

		CommerceOrderPayment commerceOrderPayment = (CommerceOrderPayment)serializable;

		if (commerceOrderPayment == null) {
			Session session = null;

			try {
				session = openSession();

				commerceOrderPayment = (CommerceOrderPayment)session.get(CommerceOrderPaymentImpl.class,
						primaryKey);

				if (commerceOrderPayment != null) {
					cacheResult(commerceOrderPayment);
				}
				else {
					entityCache.putResult(CommerceOrderPaymentModelImpl.ENTITY_CACHE_ENABLED,
						CommerceOrderPaymentImpl.class, primaryKey, nullModel);
				}
			}
			catch (Exception e) {
				entityCache.removeResult(CommerceOrderPaymentModelImpl.ENTITY_CACHE_ENABLED,
					CommerceOrderPaymentImpl.class, primaryKey);

				throw processException(e);
			}
			finally {
				closeSession(session);
			}
		}

		return commerceOrderPayment;
	}
@ Override public CommerceOrderPayment fetchByPrimaryKey ( Serializable primaryKey ) { Serializable serializable = entityCache . getResult ( CommerceOrderPaymentModelImpl . ENTITY_CACHE_ENABLED , CommerceOrderPaymentImpl . class , primaryKey ) ; if ( serializable == nullModel ) { return null ; } CommerceOrderPayment commerceOrderPayment = ( CommerceOrderPayment ) serializable ; if ( commerceOrderPayment == null ) { Session session = null ; try { session = openSession ( ) ; commerceOrderPayment = ( CommerceOrderPayment ) session . get ( CommerceOrderPaymentImpl . class , primaryKey ) ; if ( commerceOrderPayment != null ) { cacheResult ( commerceOrderPayment ) ; } else { entityCache . putResult ( CommerceOrderPaymentModelImpl . ENTITY_CACHE_ENABLED , CommerceOrderPaymentImpl . class , primaryKey , nullModel ) ; } } catch ( Exception e ) { entityCache . removeResult ( CommerceOrderPaymentModelImpl . ENTITY_CACHE_ENABLED , CommerceOrderPaymentImpl . class , primaryKey ) ; throw processException ( e ) ; } finally { closeSession ( session ) ; } } return commerceOrderPayment ; }
Returns the commerce order payment with the primary key or returns <code>null</code> if it could not be found.

@param primaryKey the primary key of the commerce order payment
@return the commerce order payment, or <code>null</code> if a commerce order payment with the primary key could not be found