@Override
	public CommerceOrderNote fetchByPrimaryKey(Serializable primaryKey) {
		Serializable serializable = entityCache.getResult(CommerceOrderNoteModelImpl.ENTITY_CACHE_ENABLED,
				CommerceOrderNoteImpl.class, primaryKey);

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

		CommerceOrderNote commerceOrderNote = (CommerceOrderNote)serializable;

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

			try {
				session = openSession();

				commerceOrderNote = (CommerceOrderNote)session.get(CommerceOrderNoteImpl.class,
						primaryKey);

				if (commerceOrderNote != null) {
					cacheResult(commerceOrderNote);
				}
				else {
					entityCache.putResult(CommerceOrderNoteModelImpl.ENTITY_CACHE_ENABLED,
						CommerceOrderNoteImpl.class, primaryKey, nullModel);
				}
			}
			catch (Exception e) {
				entityCache.removeResult(CommerceOrderNoteModelImpl.ENTITY_CACHE_ENABLED,
					CommerceOrderNoteImpl.class, primaryKey);

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

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

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