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

     1  package model
     2  
     3  // LoadControlEventListDataType
     4  
     5  var _ Updater = (*LoadControlEventListDataType)(nil)
     6  
     7  func (r *LoadControlEventListDataType) UpdateList(remoteWrite, persist bool, newList any, filterPartial, filterDelete *FilterType) (any, bool) {
     8  	var newData []LoadControlEventDataType
     9  	if newList != nil {
    10  		newData = newList.(*LoadControlEventListDataType).LoadControlEventData
    11  	}
    12  
    13  	data, success := UpdateList(remoteWrite, r.LoadControlEventData, newData, filterPartial, filterDelete)
    14  
    15  	if success && persist {
    16  		r.LoadControlEventData = data
    17  	}
    18  
    19  	return data, success
    20  }
    21  
    22  // LoadControlStateListDataType
    23  
    24  var _ Updater = (*LoadControlStateListDataType)(nil)
    25  
    26  func (r *LoadControlStateListDataType) UpdateList(remoteWrite, persist bool, newList any, filterPartial, filterDelete *FilterType) (any, bool) {
    27  	var newData []LoadControlStateDataType
    28  	if newList != nil {
    29  		newData = newList.(*LoadControlStateListDataType).LoadControlStateData
    30  	}
    31  
    32  	data, success := UpdateList(remoteWrite, r.LoadControlStateData, newData, filterPartial, filterDelete)
    33  
    34  	if success && persist {
    35  		r.LoadControlStateData = data
    36  	}
    37  
    38  	return data, success
    39  }
    40  
    41  // LoadControlLimitListDataType
    42  
    43  var _ Updater = (*LoadControlLimitListDataType)(nil)
    44  
    45  func (r *LoadControlLimitListDataType) UpdateList(remoteWrite, persist bool, newList any, filterPartial, filterDelete *FilterType) (any, bool) {
    46  	var newData []LoadControlLimitDataType
    47  	if newList != nil {
    48  		newData = newList.(*LoadControlLimitListDataType).LoadControlLimitData
    49  	}
    50  
    51  	data, success := UpdateList(remoteWrite, r.LoadControlLimitData, newData, filterPartial, filterDelete)
    52  
    53  	if success && persist {
    54  		r.LoadControlLimitData = data
    55  	}
    56  
    57  	return data, success
    58  }
    59  
    60  // LoadControlLimitConstraintsListDataType
    61  
    62  var _ Updater = (*LoadControlLimitConstraintsListDataType)(nil)
    63  
    64  func (r *LoadControlLimitConstraintsListDataType) UpdateList(remoteWrite, persist bool, newList any, filterPartial, filterDelete *FilterType) (any, bool) {
    65  	var newData []LoadControlLimitConstraintsDataType
    66  	if newList != nil {
    67  		newData = newList.(*LoadControlLimitConstraintsListDataType).LoadControlLimitConstraintsData
    68  	}
    69  
    70  	data, success := UpdateList(remoteWrite, r.LoadControlLimitConstraintsData, newData, filterPartial, filterDelete)
    71  
    72  	if success && persist {
    73  		r.LoadControlLimitConstraintsData = data
    74  	}
    75  
    76  	return data, success
    77  }
    78  
    79  // LoadControlLimitDescriptionListDataType
    80  
    81  var _ Updater = (*LoadControlLimitDescriptionListDataType)(nil)
    82  
    83  func (r *LoadControlLimitDescriptionListDataType) UpdateList(remoteWrite, persist bool, newList any, filterPartial, filterDelete *FilterType) (any, bool) {
    84  	var newData []LoadControlLimitDescriptionDataType
    85  	if newList != nil {
    86  		newData = newList.(*LoadControlLimitDescriptionListDataType).LoadControlLimitDescriptionData
    87  	}
    88  
    89  	data, success := UpdateList(remoteWrite, r.LoadControlLimitDescriptionData, newData, filterPartial, filterDelete)
    90  
    91  	if success && persist {
    92  		r.LoadControlLimitDescriptionData = data
    93  	}
    94  
    95  	return data, success
    96  }