Package de.terrestris.shoguncore.helper
Class IdHelper
- java.lang.Object
-
- de.terrestris.shoguncore.helper.IdHelper
-
public class IdHelper extends Object
-
-
Constructor Summary
Constructors Constructor Description IdHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidsetIdOnPersistentObject(PersistentObject persistentObject, Integer id)Helper method that uses reflection to set the (inaccessible) id field of the givenPersistentObject.
-
-
-
Method Detail
-
setIdOnPersistentObject
public static final void setIdOnPersistentObject(PersistentObject persistentObject, Integer id) throws NoSuchFieldException, IllegalAccessException
Helper method that uses reflection to set the (inaccessible) id field of the givenPersistentObject.- Parameters:
persistentObject- The object with the inaccessible id fieldid- The id to set- Throws:
NoSuchFieldExceptionIllegalAccessException
-
-