Package org.wso2.carbon.billing.core

Examples of org.wso2.carbon.billing.core.DataAccessManager


        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        return dataAccessManager.addSubscription(subscription);
    }

    public Customer getCustomerWithName (String customerName) throws Exception {
        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        Customer customer = null;
        List<Customer> customers = dataAccessManager.getCustomersWithName(customerName);
        if(customers.size()>0){
            customer = customers.get(0);
        }
        return customer;
    }
View Full Code Here


        }
        return customer;
    }

    public Subscription getSubscription(int subscriptionId) throws Exception {
        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        return dataAccessManager.getSubscription(subscriptionId);
    }
View Full Code Here

        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        return dataAccessManager.getSubscription(subscriptionId);
    }

    public Subscription getActiveSubscriptionOfCustomer (int customerId) throws Exception {
        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        return dataAccessManager.getActiveSubscriptionOfCustomer(customerId);
    }
View Full Code Here

        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        return dataAccessManager.getActiveSubscriptionOfCustomer(customerId);
    }

    public int getItemIdWithName (String name, int parentId) throws Exception {
        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        return dataAccessManager.getItemIdWithName(name, parentId);
    }
View Full Code Here

        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        return dataAccessManager.getItemIdWithName(name, parentId);
    }

    public boolean changeSubscription (int customerId, String subscriptionPlan) throws Exception {
        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        return dataAccessManager.changeSubscription(customerId, subscriptionPlan);           
    }
View Full Code Here

        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        return dataAccessManager.changeSubscription(customerId, subscriptionPlan);           
    }

    public Subscription[] getInactiveSubscriptionsOfCustomer(int customerId) throws Exception {
        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        List<Subscription> subscriptions = dataAccessManager.getInactiveSubscriptionsOfCustomer(customerId);
        Subscription[] subscriptionArray;
        if(subscriptions!=null && subscriptions.size()>0){
            subscriptionArray = subscriptions.toArray(new Subscription[subscriptions.size()]);
        }else{
            subscriptionArray = new Subscription[0];
View Full Code Here

        }
        return subscriptionArray;
    }
   
    public boolean activateSubscription(int subscriptionId) throws Exception{
        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        return dataAccessManager.activateSubscription(subscriptionId);           
    }
View Full Code Here

     * @return The end line number, or -1 if could not be determined
     */
    public int getEndLineNumber() {
      int ret=-1;
     
      ActivityInterface parent=getParent();
     
      if (parent != null) {
        int index=parent.getSubActivities().indexOf(this);
       
        if (index != -1) {
          if (index < (parent.getSubActivities().size()-1)) {
            ActivityInterface other=parent.getSubActivities().get(index+1);
           
            ret = other.getStartLineNumber()-1;
          } else {
            ret = parent.getEndLineNumber();
          }
        }
      }
View Full Code Here

     *
     * @param lineNumber The line number
     * @return The activity, or null if not found
     */
    public ActivityInterface getActivityAtLineNumber(int lineNumber) {
      ActivityInterface ret=null;
     
      int endline=getEndLineNumber();
     
      if (getStartLineNumber() <= lineNumber && (endline == -1 || endline >= lineNumber)) {
       
View Full Code Here

            int width = 0;
            int height = 0;
            dimensions = new SVGDimension(width, height);

            SVGDimension subActivityDim = null;
            ActivityInterface activity = null;
            Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
            while (itr.hasNext()) {
                activity = itr.next();
                subActivityDim = activity.getDimensions();
                if (subActivityDim.getWidth() > width) {
                    width += subActivityDim.getWidth();
                }
                height += subActivityDim.getHeight();
            }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.billing.core.DataAccessManager

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.