Class MPCManagerInMemory

java.lang.Object
com.helger.phase4.model.mpc.MPCManagerInMemory
All Implemented Interfaces:
IMPCManager

@ThreadSafe public class MPCManagerInMemory extends Object implements IMPCManager
Manager for MPC objects.
Author:
Philip Helger
  • Constructor Details

    • MPCManagerInMemory

      public MPCManagerInMemory()
  • Method Details

    • createMPC

      public final void createMPC(@Nonnull MPC aMPC)
      Description copied from interface: IMPCManager
      Create a new MPC.
      Specified by:
      createMPC in interface IMPCManager
      Parameters:
      aMPC - The MPC to be added. May not be null.
    • updateMPC

      @Nonnull public com.helger.commons.state.EChange updateMPC(@Nonnull IMPC aMPC)
      Description copied from interface: IMPCManager
      Update an existing MPC
      Specified by:
      updateMPC in interface IMPCManager
      Parameters:
      aMPC - The MPC to be updated. May not be null.
      Returns:
      EChange.CHANGED if something changed, EChange.UNCHANGED otherwise.
    • markMPCDeleted

      @Nonnull public com.helger.commons.state.EChange markMPCDeleted(@Nullable String sMPCID)
      Description copied from interface: IMPCManager
      Mark the MPC with the provided ID as deleted.
      Specified by:
      markMPCDeleted in interface IMPCManager
      Parameters:
      sMPCID - The ID of the MPC to be marked as deleted. May be null.
      Returns:
      EChange.CHANGED if marking as deleted succeeded, EChange.UNCHANGED otherwise.
    • deleteMPC

      @Nonnull public com.helger.commons.state.EChange deleteMPC(@Nullable String sMPCID)
      Description copied from interface: IMPCManager
      Delete the MPC with the provided ID.
      Specified by:
      deleteMPC in interface IMPCManager
      Parameters:
      sMPCID - The ID of the MPC to be deleted. May be null.
      Returns:
      EChange.CHANGED if deleting succeeded, EChange.UNCHANGED otherwise.
    • getMPCOfID

      @Nullable public IMPC getMPCOfID(@Nullable String sID)
      Description copied from interface: IMPCManager
      Get the MPC with the specified ID.
      Specified by:
      getMPCOfID in interface IMPCManager
      Parameters:
      sID - The ID to search. May be null.
      Returns:
      null if no such MPC exists, the MPC otherwise.
    • containsWithID

      public boolean containsWithID(String sID)
      Description copied from interface: IMPCManager
      Check if an MPC with the specified ID is contained.
      Specified by:
      containsWithID in interface IMPCManager
      Parameters:
      sID - The ID to search. May be null.
      Returns:
      true if such an MPC is contained, false otherwise.