Class IdHelper


  • public class IdHelper
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      IdHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void setIdOnPersistentObject​(PersistentObject persistentObject, java.lang.Integer id)
      Helper method that uses reflection to set the (inaccessible) id field of the given PersistentObject.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IdHelper

        public IdHelper()
    • Method Detail

      • setIdOnPersistentObject

        public static final void setIdOnPersistentObject​(PersistentObject persistentObject,
                                                         java.lang.Integer id)
                                                  throws java.lang.NoSuchFieldException,
                                                         java.lang.IllegalAccessException
        Helper method that uses reflection to set the (inaccessible) id field of the given PersistentObject.
        Parameters:
        persistentObject - The object with the inaccessible id field
        id - The id to set
        Throws:
        java.lang.NoSuchFieldException
        java.lang.IllegalAccessException