github.com/enbility/spine-go@v0.7.0/model/identification_additions.go (about)

     1  package model
     2  
     3  // IdentificationListDataType
     4  
     5  var _ Updater = (*IdentificationListDataType)(nil)
     6  
     7  func (r *IdentificationListDataType) UpdateList(remoteWrite, persist bool, newList any, filterPartial, filterDelete *FilterType) (any, bool) {
     8  	var newData []IdentificationDataType
     9  	if newList != nil {
    10  		newData = newList.(*IdentificationListDataType).IdentificationData
    11  	}
    12  
    13  	data, success := UpdateList(remoteWrite, r.IdentificationData, newData, filterPartial, filterDelete)
    14  
    15  	if success && persist {
    16  		r.IdentificationData = data
    17  	}
    18  
    19  	return persist, success
    20  }
    21  
    22  // SessionIdentificationListDataType
    23  
    24  var _ Updater = (*SessionIdentificationListDataType)(nil)
    25  
    26  func (r *SessionIdentificationListDataType) UpdateList(remoteWrite, persist bool, newList any, filterPartial, filterDelete *FilterType) (any, bool) {
    27  	var newData []SessionIdentificationDataType
    28  	if newList != nil {
    29  		newData = newList.(*SessionIdentificationListDataType).SessionIdentificationData
    30  	}
    31  
    32  	data, success := UpdateList(remoteWrite, r.SessionIdentificationData, newData, filterPartial, filterDelete)
    33  
    34  	if success && persist {
    35  		r.SessionIdentificationData = data
    36  	}
    37  
    38  	return persist, success
    39  }
    40  
    41  // SessionMeasurementRelationListDataType
    42  
    43  var _ Updater = (*SessionMeasurementRelationListDataType)(nil)
    44  
    45  func (r *SessionMeasurementRelationListDataType) UpdateList(remoteWrite, persist bool, newList any, filterPartial, filterDelete *FilterType) (any, bool) {
    46  	var newData []SessionMeasurementRelationDataType
    47  	if newList != nil {
    48  		newData = newList.(*SessionMeasurementRelationListDataType).SessionMeasurementRelationData
    49  	}
    50  
    51  	data, success := UpdateList(remoteWrite, r.SessionMeasurementRelationData, newData, filterPartial, filterDelete)
    52  
    53  	if success && persist {
    54  		r.SessionMeasurementRelationData = data
    55  	}
    56  
    57  	return persist, success
    58  }