* @param url
*/
public void createSupplier(String supplierID, String name, String street, String city, String state, String zip, String phone, String url) {
try {
Util.debug("SuppliersBean.createSupplier() - Entered");
Supplier supplier = null;
/*
try {
// Create a new Supplier if there is NOT an existing Supplier.
supplier = getSupplierLocalHome().findByPrimaryKey(new SupplierKey(supplierID));
} catch (FinderException e) {
*/
supplier = em.find(Supplier.class, supplierID);
if (supplier == null) {
Util.debug("SuppliersBean.createSupplier() - supplier doesn't exist.");
Util.debug("SuppliersBean.createSupplier() - Creating Supplier for SupplierID: " + supplierID);
//supplier = getSupplierLocalHome().create(supplierID, name, street, city, state, zip, phone, url);
supplier = new Supplier(supplierID, name, street, city, state, zip, phone, url);
em.persist(supplier);
}
} catch (Exception e) {
Util.debug("SuppliersBean.createSupplier() - Exception: " + e);
}