@Override
	public CommercePaymentMethodGroupRel fetchByPrimaryKey(
		Serializable primaryKey) {
		Serializable serializable = entityCache.getResult(CommercePaymentMethodGroupRelModelImpl.ENTITY_CACHE_ENABLED,
				CommercePaymentMethodGroupRelImpl.class, primaryKey);

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

		CommercePaymentMethodGroupRel commercePaymentMethodGroupRel = (CommercePaymentMethodGroupRel)serializable;

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

			try {
				session = openSession();

				commercePaymentMethodGroupRel = (CommercePaymentMethodGroupRel)session.get(CommercePaymentMethodGroupRelImpl.class,
						primaryKey);

				if (commercePaymentMethodGroupRel != null) {
					cacheResult(commercePaymentMethodGroupRel);
				}
				else {
					entityCache.putResult(CommercePaymentMethodGroupRelModelImpl.ENTITY_CACHE_ENABLED,
						CommercePaymentMethodGroupRelImpl.class, primaryKey,
						nullModel);
				}
			}
			catch (Exception e) {
				entityCache.removeResult(CommercePaymentMethodGroupRelModelImpl.ENTITY_CACHE_ENABLED,
					CommercePaymentMethodGroupRelImpl.class, primaryKey);

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

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

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