You can always look up an order in the repository using it’s ID. But then you want to use the properties of this order object you will always be calling getPropertyValue and casting it to the type you expect.
A better and much simpler way is to look up the order using the OrderManager. Then you get a strongly typed Order object and don’t have have to deal with the repository. Life has become a little easier. 🙂
OrderManager orderManager = getOrderManager; Order order = orderManager.loadOrder(orderId);
Now that you have the order you can also get the profile for that order.
RepositoryItem profile = getProfileTools().getProfileForOrder(order);