Skip to content

Commit

Permalink
Applying auto format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wluyima committed Jun 11, 2013
1 parent 23b96b2 commit c2a2419
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion api/src/main/java/org/openmrs/api/OrderService.java
Expand Up @@ -91,7 +91,7 @@ public interface OrderService extends OpenmrsService {
* @param order The Order to remove from the system
* @param cascade
* @throws APIException
* @since 1.9.4
* @since 1.9.4
* @should delete order
* @should delete order when cascade is false
* @should delete order when cascade is true and also delete any Obs that references it
Expand Down
4 changes: 2 additions & 2 deletions api/src/main/java/org/openmrs/api/context/Context.java
Expand Up @@ -199,8 +199,8 @@ public static Class<?> loadClass(String className) throws ClassNotFoundException
/**
* Sets the user context on the thread local so that the service layer can perform
* authentication/authorization checks.<br/>
* <br />
* This is thread safe since it stores the given user context in ThreadLocal.
* <br />
* This is thread safe since it stores the given user context in ThreadLocal.
*
* @param ctx UserContext to set
*/
Expand Down
8 changes: 4 additions & 4 deletions api/src/main/java/org/openmrs/api/db/OrderDAO.java
Expand Up @@ -97,10 +97,10 @@ public <Ord extends Order> List<Ord> getOrders(Class<Ord> orderClassType, List<P
* @see org.openmrs.api.OrderService#getOrderHistoryByOrderNumber(java.lang.String)
*/
public List<Order> getOrderHistoryByOrderNumber(String orderNumber);

/**
* Delete Obs that references an order
*/
/**
* Delete Obs that references an order
*/
public void deleteObsThatReference(Order order);

}
Expand Up @@ -208,17 +208,17 @@ public List<DrugOrder> getDrugOrdersByPatientAndIngredient(Patient patient, Conc

return (List<DrugOrder>) searchDrugOrderCriteria.list();
}

/**
* Delete Obs that references (deleted) Order
*/
public void deleteObsThatReference(Order order) {
if (order != null) {
sessionFactory.getCurrentSession().createQuery("delete Obs where order = :order").setParameter("order", order)
.executeUpdate();

}
}
/**
* Delete Obs that references (deleted) Order
*/
public void deleteObsThatReference(Order order) {
if (order != null) {
sessionFactory.getCurrentSession().createQuery("delete Obs where order = :order").setParameter("order", order)
.executeUpdate();
}
}

/* (non-Javadoc)
* @see org.openmrs.api.db.OrderDAO#getOrderHistoryByOrderNumber(java.lang.String)
Expand Down
6 changes: 3 additions & 3 deletions api/src/test/java/org/openmrs/api/OrderServiceTest.java
Expand Up @@ -583,7 +583,7 @@ public void saveOrder_shouldAssignOrderNumberForNewOrder() throws Exception {
Assert.assertNotNull(order.getOrderId());
Assert.assertNotNull(order.getOrderNumber());
}

/**
* @throws Exception
* @see OrderService#getOrderHistoryByOrderNumber(String)
Expand Down Expand Up @@ -611,7 +611,7 @@ public void getOrderHistoryByOrderNumber_shouldReturnTheListOfOrdersInAHistory()
Assert.assertEquals(expectedHistory, history);

}

@Test
public void purgeOrder_shouldDeleteObsThatReference() throws Exception {
executeDataSet(OBS_THAT_REFERENCE_DATASET_XML);
Expand Down Expand Up @@ -642,5 +642,5 @@ public void purgeOrder_shouldDeleteObsThatReference() throws Exception {
Assert.assertNull(os.getObsByUuid(obsUuid));

}

}
3 changes: 2 additions & 1 deletion web/src/main/java/org/openmrs/web/WebDaemon.java
Expand Up @@ -33,7 +33,8 @@ public class WebDaemon extends Daemon {
*
* @param servletContext the servlet context.
*/
public static void startOpenmrs(final ServletContext servletContext) throws DatabaseUpdateException, InputRequiredException {
public static void startOpenmrs(final ServletContext servletContext) throws DatabaseUpdateException,
InputRequiredException {

// create a new thread and start openmrs in it.
DaemonThread startOpenmrsThread = new DaemonThread() {
Expand Down

0 comments on commit c2a2419

Please sign in to comment.