Returns the commerce order note with the primary key.

@param commerceOrderNoteId the primary key of the commerce order note
@return the commerce order note
@throws PortalException if a commerce order note with the primary key could not be found
175938
@Override
	public com.liferay.commerce.model.CommerceOrderNote getCommerceOrderNote(
		long commerceOrderNoteId)
		throws com.liferay.portal.kernel.exception.PortalException {
		return _commerceOrderNoteLocalService.getCommerceOrderNote(commerceOrderNoteId);
	}
605615
public static com.liferay.commerce.model.CommerceOrderPayment createCommerceOrderPayment(
		long commerceOrderPaymentId) {
		return getService().createCommerceOrderPayment(commerceOrderPaymentId);
	}
323600
@Override
	public List<CommercePriceList> findByCommerceCurrencyId(
		long commerceCurrencyId) {
		return findByCommerceCurrencyId(commerceCurrencyId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
480967
@Override
	public List<CommerceOrderItem> findByC_I(long commerceOrderId,
		long CPInstanceId) {
		return findByC_I(commerceOrderId, CPInstanceId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
1366294
public static com.liferay.commerce.model.CommerceOrderPayment addCommerceOrderPayment(
		com.liferay.commerce.model.CommerceOrderPayment commerceOrderPayment) {
		return getService().addCommerceOrderPayment(commerceOrderPayment);
	}
182236
@Indexable(type = IndexableType.DELETE)
	@Override
	public CommerceOrder deleteCommerceOrder(CommerceOrder commerceOrder)
		throws PortalException {
		return commerceOrderPersistence.remove(commerceOrder);
	}
267795
@Override
	public void cacheResult(CommerceOrderNote commerceOrderNote) {
		entityCache.putResult(CommerceOrderNoteModelImpl.ENTITY_CACHE_ENABLED,
			CommerceOrderNoteImpl.class, commerceOrderNote.getPrimaryKey(),
			commerceOrderNote);

		finderCache.putResult(FINDER_PATH_FETCH_BY_C_ERC,
			new Object[] {
				commerceOrderNote.getCompanyId(),
				commerceOrderNote.getExternalReferenceCode()
			}, commerceOrderNote);

		commerceOrderNote.resetOriginalValues();
	}
467533
@Override
	@Transactional(enabled = false)
	public CommerceOrderNote createCommerceOrderNote(long commerceOrderNoteId) {
		return commerceOrderNotePersistence.create(commerceOrderNoteId);
	}
380430
public static com.liferay.commerce.model.CommerceOrderNote deleteCommerceOrderNote(
		com.liferay.commerce.model.CommerceOrderNote commerceOrderNote) {
		return getService().deleteCommerceOrderNote(commerceOrderNote);
	}
716222
@Override
	public int countByCommerceOrderItemId(long commerceOrderItemId) {
		FinderPath finderPath = FINDER_PATH_COUNT_BY_COMMERCEORDERITEMID;

		Object[] finderArgs = new Object[] { commerceOrderItemId };

		Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);

		if (count == null) {
			StringBundler query = new StringBundler(2);

			query.append(_SQL_COUNT_COMMERCEVIRTUALORDERITEM_WHERE);

			query.append(_FINDER_COLUMN_COMMERCEORDERITEMID_COMMERCEORDERITEMID_2);

			String sql = query.toString();

			Session session = null;

			try {
				session = openSession();

				Query q = session.createQuery(sql);

				QueryPos qPos = QueryPos.getInstance(q);

				qPos.add(commerceOrderItemId);

				count = (Long)q.uniqueResult();

				finderCache.putResult(finderPath, finderArgs, count);
			}
			catch (Exception e) {
				finderCache.removeResult(finderPath, finderArgs);

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

		return count.intValue();
	}
834406
@Override
	public CommerceOrderItem create(long commerceOrderItemId) {
		CommerceOrderItem commerceOrderItem = new CommerceOrderItemImpl();

		commerceOrderItem.setNew(true);
		commerceOrderItem.setPrimaryKey(commerceOrderItemId);

		commerceOrderItem.setCompanyId(companyProvider.getCompanyId());

		return commerceOrderItem;
	}
1333450
public static com.liferay.commerce.price.list.model.CommercePriceEntry addCommercePriceEntry(
		long cpInstanceId, long commercePriceListId,
		java.math.BigDecimal price, java.math.BigDecimal promoPrice,
		com.liferay.portal.kernel.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService()
				   .addCommercePriceEntry(cpInstanceId, commercePriceListId,
			price, promoPrice, serviceContext);
	}
686959
public static com.liferay.commerce.model.CommerceOrder deleteCommerceOrder(
		com.liferay.commerce.model.CommerceOrder commerceOrder)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService().deleteCommerceOrder(commerceOrder);
	}
440965
@Override
	public CommerceOrderPayment create(long commerceOrderPaymentId) {
		CommerceOrderPayment commerceOrderPayment = new CommerceOrderPaymentImpl();

		commerceOrderPayment.setNew(true);
		commerceOrderPayment.setPrimaryKey(commerceOrderPaymentId);

		commerceOrderPayment.setCompanyId(companyProvider.getCompanyId());

		return commerceOrderPayment;
	}
642818
@Override
	public CommerceOrder getCommerceOrderByUuidAndGroupId(String uuid,
		long groupId) throws PortalException {
		return commerceOrderPersistence.findByUUID_G(uuid, groupId);
	}
1289924
@RequestMapping(path = "/{orderId}", method = {RequestMethod.GET, RequestMethod.POST})
    public ResponseEntity<Order> getOrder(@PathVariable("orderId") Long orderId) {
        Order order = orderService.getOrder(orderId);
        if(order != null){
            return new ResponseEntity(order, HttpStatus.OK);
        }
        return new ResponseEntity<Order>(HttpStatus.NOT_FOUND);
    }
202835
@Override
	public List<CommerceOrder> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}