@Test public void insertsANewOrder() { Order newOrder = createOrderWithAllFields(); persistence.insertOrder(newOrder); assertThat(newOrder.getOrderId(), notNullValue()); assertThat(newOrder.getVersion(), notNullValue()); persistence.flushContext(); persistence.detachEntity(newOrder); Order persistedOrder = persistence.getEntityManager() .find(Order.class, newOrder.getOrderId()); assertHaveSamePersistentFields(newOrder, persistedOrder); }
@Override public void insertOrder(@Nonnull final Order order) { create(order); }
OrderBasePersistence extends AbstractBasePersistence<Order, Integer> implements OrderMapper { @Override public void insertOrder(@Nonnull final Order order) { create(order); } }
OrderBasePersistence extends AbstractBasePersistence<Order, Integer> implements OrderMapper { @Override public void insertOrder(@Nonnull final Order order) { create(order); }  }
OrderBasePersistence extends AbstractBasePersistence<Order, Integer> implements OrderMapper { @Override public void insertOrder(@Nonnull final Order order) { create(order); }  @Override List<Order> getOrdersByUsername(@Nonnull final String username); @Override Order getOrder(final int orderId); @Override void insertOrder(@Nonnull final Order order); @Override void insertOrderStatus(@Nonnull final Order order); }
OrderBasePersistence extends AbstractBasePersistence<Order, Integer> implements OrderMapper { @Override public void insertOrder(@Nonnull final Order order) { create(order); }  @Override List<Order> getOrdersByUsername(@Nonnull final String username); @Override Order getOrder(final int orderId); @Override void insertOrder(@Nonnull final Order order); @Override void insertOrderStatus(@Nonnull final Order order);  }