Package com.emc.plants.pojo.beans

Examples of com.emc.plants.pojo.beans.SupplierInfo


   * @param url
   * @return supplierInfo
   */
  @Transactional
  public SupplierInfo updateSupplier(String supplierID, String name, String street, String city, String state, String zip, String phone, String url) {
    SupplierInfo supplierInfo = null;
    try {
      Util.debug("SuppliersBean.updateSupplier() - Entered");
      Supplier supplier = null;
      /*
       try { */
      supplier = em.find(Supplier.class, supplierID);
      if (supplier != null) {
        // Create a new Supplier if there is NOT an existing Supplier.
        // supplier = getSupplierLocalHome().findByPrimaryKey(new SupplierKey(supplierID));
        supplier.setName(name);
        supplier.setStreet(street);
        supplier.setCity(city);
        supplier.setUsstate(state);
        supplier.setZip(zip);
        supplier.setPhone(phone);
        supplier.setUrl(url);
        supplierInfo = new SupplierInfo(supplier);
        em.persist(supplier);
        em.flush();
      } else { // catch (FinderException e) {
        Util.debug("SuppliersBean.updateSupplier() - supplier doesn't exist.");
        Util.debug("SuppliersBean.updateSupplier() - Couldn't update Supplier for SupplierID: " + supplierID);
View Full Code Here


  }
  /**
   * @return supplierItem
   */
  public SupplierInfo getSupplierInfo(String supplierID) {
    SupplierInfo supplierItem = null;
    Util.debug("SuppliersBean.getSupplierInfo() - Entered");
    Supplier supplier = null;
   
    // Return the supplier Info if the supplier exists.
    supplier = em.find(Supplier.class, supplierID);
    if (supplier != null)
      supplierItem = new SupplierInfo(supplier);
    else {
      Util.debug("SuppliersBean.getSupplierInfo() - Supplier "+supplierID+" not found");
    }
    return (supplierItem);
  }
View Full Code Here

  /**
   * @return supplierInfo
   */
  public SupplierInfo getSupplierInfo() {
    // Retrieve the first Supplier Info
    SupplierInfo supplierInfo = null;
    try {
      Collection <SupplierInfo>suppliers = this.findSuppliers();
      if (suppliers != null) {
        Util.debug("AdminServlet.getSupplierInfo() - Supplier found!");
        Iterator <SupplierInfo>i = suppliers.iterator();
View Full Code Here

    List l=q.getResultList();
    if (l!=null){
      Iterator i=l.iterator();
      while (i.hasNext()) {
         Supplier supplier = (Supplier) i.next();
         suppliers.add(new SupplierInfo(supplier));
      }
    }
   
    return suppliers;
  }
View Full Code Here

     */
    private URL getPortAddress(String defaultPortAddress) throws NoSupplierException, MalformedURLException {
        try {
            if (portAddress == null) {
                String stringPortAddress = "";
                SupplierInfo supplierInfo = suppliers.getSupplierInfo();
                if (supplierInfo != null)
                    stringPortAddress = suppliers.getSupplierURL(supplierInfo.getID());
                Util.debug("ReceiveOrdersProxy.getPortAddress(): PortAddress URL read: " + stringPortAddress);
                if ((stringPortAddress == null) || (stringPortAddress.equals(""))) {
                    Util.debug("ReceiveOrdersProxy.getPortAddress(): Invalid URL in Supplier Configuration");
                    Util.debug("ReceiveOrdersProxy.getPortAddress(): Setting to default Port Address: " + defaultPortAddress);
                    stringPortAddress = defaultPortAddress;
View Full Code Here

     * @param location_url
     * @return supplierInfo
     */
    public SupplierInfo updateSupplierInfo(String supplierID, String name, String street, String city, String state, String zip, String phone, String location_url) {
        // Only retrieving info for 1 supplier.
        SupplierInfo supplierInfo = null;
        try {
            supplierInfo = suppliers.updateSupplier(supplierID, name, street, city, state, zip, phone, location_url);
        } catch (Exception e) {
            Util.debug("AdminServlet.updateSupplierInfo() - Exception: " + e);
        }
View Full Code Here

     * @param resp
     * @throws ServletException
     * @throws IOException
     */
    public void performSupplierConfig(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        SupplierInfo supplierInfo = null;
        String action = null;
        action = req.getParameter(Util.ATTR_ACTION);
        if ((action == null) || (action.equals("")))
            action = Util.ACTION_GETSUPPLIER;
        Util.debug("AdminServlet.performSupplierConfig() - action=" + action);
View Full Code Here

     * @throws IOException
     */
    public String performSupplierConfig(HttpServletRequest req,
        HttpServletResponse resp) throws ServletException {
      logger.debug("AdminController:performSupplierConfig");
        SupplierInfo supplierInfo = null;
        String action = null;
        action = req.getParameter(Util.ATTR_ACTION);
        if ((action == null) || (action.equals("")))
            action = Util.ACTION_GETSUPPLIER;
        logger.debug("AdminController.performSupplierConfig() - action=" + action);
View Full Code Here

  public SupplierInfo updateSupplierInfo(String supplierID, String name,
      String street, String city, String state, String zip, String phone,
      String location_url) {
      logger.debug("AdminController:updateSupplierInfo");
        // Only retrieving info for 1 supplier.
        SupplierInfo supplierInfo = null;
        try {
            supplierInfo = suppliers.updateSupplier(supplierID, name, street, city, state, zip, phone, location_url);
        } catch (Exception e) {
            logger.debug("AdminController.updateSupplierInfo() - Exception: " + e);
        }
View Full Code Here

TOP

Related Classes of com.emc.plants.pojo.beans.SupplierInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.