+//-------------------------------------------------------------------
+//
+//-------------------------------------------------------------------
+func (c *Control) WriteRESTSubscriptionToDb(restSubId string, restSubs *RESTSubscription) {
+ xapp.Logger.Debug("WriteRESTSubscriptionToDb() restSubId = %s", restSubId)
+ err := c.WriteRESTSubscriptionToSdl(restSubId, restSubs)
+ if err != nil {
+ xapp.Logger.Error("%v", err)
+ }
+}
+
+//-------------------------------------------------------------------
+//
+//-------------------------------------------------------------------
+func (c *Control) UpdateRESTSubscriptionInDB(restSubId string, restSubs *RESTSubscription, removeRestSubscriptionFromDb bool) {
+
+ if removeRestSubscriptionFromDb == true {
+ // Subscription was written in db already when subscription request was sent to BTS, except for merged request
+ c.RemoveRESTSubscriptionFromDb(restSubId)
+ } else {
+ c.WriteRESTSubscriptionToDb(restSubId, restSubs)
+ }
+}
+
+//-------------------------------------------------------------------
+//
+//-------------------------------------------------------------------
+func (c *Control) RemoveRESTSubscriptionFromDb(restSubId string) {
+ xapp.Logger.Debug("RemoveRESTSubscriptionFromDb() restSubId = %s", restSubId)
+ err := c.RemoveRESTSubscriptionFromSdl(restSubId)
+ if err != nil {
+ xapp.Logger.Error("%v", err)
+ }
+}
+