Class MCRObjectInfoEntityManager

java.lang.Object
org.mycore.backend.jpa.objectinfo.MCRObjectInfoEntityManager

public class MCRObjectInfoEntityManager extends Object
  • Constructor Details

    • MCRObjectInfoEntityManager

      public MCRObjectInfoEntityManager()
  • Method Details

    • removeAll

      public static void removeAll()
    • getByID

      public static MCRObjectInfoEntity getByID(MCRObjectID id)
      loads a MCRObjectInfoEntity from the database
      Parameters:
      id - the id of the MCRObjectInfoEntity
      Returns:
      null if MCRObjectEntity is not found
    • update

      public static void update(MCRObject obj)
      updates an object info of an object, if the object does not have an object info entity yet, then it will be created
      Parameters:
      obj - the object which info should be updated
    • create

      public static void create(MCRObject obj)
      creates a new MCRObjectInfoEntity for an object
      Parameters:
      obj - the object
    • remove

      public static void remove(MCRObject object)
      Removes object information from the Database
      Parameters:
      object - the object info which should be removed from the database
    • delete

      public static void delete(MCRObject object, Instant deletedDate, String deletedBy)
      Updates the state of the object info to be deleted (does not remove(MCRObject) the object)
      Parameters:
      object - the object which is deleted
      deletedBy - the user which deleted the object
      deletedDate - the date at which the object was deleted