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];