@Override
	public CommerceVirtualOrderItem fetchByPrimaryKey(Serializable primaryKey) {
		Serializable serializable = entityCache.getResult(CommerceVirtualOrderItemModelImpl.ENTITY_CACHE_ENABLED,
				CommerceVirtualOrderItemImpl.class, primaryKey);

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

		CommerceVirtualOrderItem commerceVirtualOrderItem = (CommerceVirtualOrderItem)serializable;

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

			try {
				session = openSession();

				commerceVirtualOrderItem = (CommerceVirtualOrderItem)session.get(CommerceVirtualOrderItemImpl.class,
						primaryKey);

				if (commerceVirtualOrderItem != null) {
					cacheResult(commerceVirtualOrderItem);
				}
				else {
					entityCache.putResult(CommerceVirtualOrderItemModelImpl.ENTITY_CACHE_ENABLED,
						CommerceVirtualOrderItemImpl.class, primaryKey,
						nullModel);
				}
			}
			catch (Exception e) {
				entityCache.removeResult(CommerceVirtualOrderItemModelImpl.ENTITY_CACHE_ENABLED,
					CommerceVirtualOrderItemImpl.class, primaryKey);

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

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

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