src/main/java/com/qa/IMS/persistence/dao/OrderDAO.java
@Override
	public Order create(Order order) {
		try (Connection connection = DBUtils.getInstance().getConnection();
				Statement statement = connection.createStatement();) {
			statement.executeUpdate("INSERT INTO orders(customer_id, order_date) values('" + order.getCustomer_id()
					+ "','" + order.getDate() + "')");
			return readLatest();
		} catch (Exception e) {
			
			LOGGER.info(e.getMessage());
		}
		return null;
	}
/**
	 * Creates a customer in the database
	 * 
	 * @param customer - takes in a customer object. id will be ignored
	 */
Creates a customer in the database

@param customer - takes in a customer object. id will be ignored
Creates a customer in the database @param customer - takes in a customer object . id will be ignored
@Override
	public Order create(Order order) {
		try (Connection connection = DBUtils.getInstance().getConnection();
				Statement statement = connection.createStatement();) {
			statement.executeUpdate("INSERT INTO orders(customer_id, order_date) values('" + order.getCustomer_id()
					+ "','" + order.getDate() + "')");
			return readLatest();
		} catch (Exception e) {
			LOGGER.info(e.getMessage());
		}
		return null;
	}
@ Override public Order create ( Order order ) { try ( Connection connection = DBUtils . getInstance ( ) . getConnection ( ) ; Statement statement = connection . createStatement ( ) ; ) { statement . executeUpdate ( "INSERT INTO orders(customer_id, order_date) values('" + order . getCustomer_id ( ) + "','" + order . getDate ( ) + "')" ) ; return readLatest ( ) ; } catch ( Exception e ) { LOGGER . info ( e . getMessage ( ) ) ; } return null ; }
Creates a customer in the database
Creates a customer in the database