private static < T extends MPBase > T cleanResource ( T resource ) throws MPException { Field [ ] declaredFields = resource . getClass ( ) . getDeclaredFields ( ) ; for ( Field field : declaredFields ) { try { field . setAccessible ( true ) ; field . set ( resource , null ) ; } catch ( Exception ex ) { throw new MPException ( ex ) ; } } return resource ; }
Removes all data from the attributes members of the Resource obj . Used when a delete request is called