类 ObjectRetrievalFailureException

    • 构造器详细资料

      • ObjectRetrievalFailureException

        public ObjectRetrievalFailureException​(String msg,
                                               Throwable cause)
        Create a general ObjectRetrievalFailureException with the given message, without any information on the affected object.
        参数:
        msg - the detail message
        cause - the source exception
      • ObjectRetrievalFailureException

        public ObjectRetrievalFailureException​(Class<?> persistentClass,
                                               Object identifier)
        Create a new ObjectRetrievalFailureException for the given object, with the default "not found" message.
        参数:
        persistentClass - the persistent class
        identifier - the ID of the object that should have been retrieved
      • ObjectRetrievalFailureException

        public ObjectRetrievalFailureException​(Class<?> persistentClass,
                                               Object identifier,
                                               String msg,
                                               @Nullable
                                               Throwable cause)
        Create a new ObjectRetrievalFailureException for the given object, with the given explicit message and exception.
        参数:
        persistentClass - the persistent class
        identifier - the ID of the object that should have been retrieved
        msg - the detail message
        cause - the source exception
      • ObjectRetrievalFailureException

        public ObjectRetrievalFailureException​(String persistentClassName,
                                               Object identifier)
        Create a new ObjectRetrievalFailureException for the given object, with the default "not found" message.
        参数:
        persistentClassName - the name of the persistent class
        identifier - the ID of the object that should have been retrieved
      • ObjectRetrievalFailureException

        public ObjectRetrievalFailureException​(String persistentClassName,
                                               Object identifier,
                                               String msg,
                                               @Nullable
                                               Throwable cause)
        Create a new ObjectRetrievalFailureException for the given object, with the given explicit message and exception.
        参数:
        persistentClassName - the name of the persistent class
        identifier - the ID of the object that should have been retrieved
        msg - the detail message
        cause - the source exception
    • 方法详细资料

      • getPersistentClass

        @Nullable
        public Class<?> getPersistentClass()
        Return the persistent class of the object that was not found. If no Class was specified, this method returns null.
      • getPersistentClassName

        @Nullable
        public String getPersistentClassName()
        Return the name of the persistent class of the object that was not found. Will work for both Class objects and String names.