Class PartialModelUpdateFacility


  • public class PartialModelUpdateFacility
    extends Object
    Takes partially-loaded model and fills it with nodes from a fully-loaded counterpart. Preserves instances of original partially-loaded model as they might be already exposed to user code (i.e. full load triggered as part of model traversal, with partial root already accessed by a client). Fully-loaded model is not preserved. SHALL MOVE TO [smodel] once LazySNode and InterfaceSNode move there (either with SNode or as interfaces).
    • Constructor Detail

      • PartialModelUpdateFacility

        public PartialModelUpdateFacility​(@NotNull
                                          SModelData model,
                                          @NotNull
                                          SModelData fullModel,
                                          @NotNull
                                          SModel dataOwner)
        Parameters:
        model - model being updated, survives.
        fullModel - source of nodes to inject into updated models, for disposal.
        dataOwner - provides extra information about location in case anything goes wrong
    • Method Detail

      • update

        public void update()
        Update initial model with elements from full model. Instance of initial model is the one to keep.