public static < S extends Model > Object getAndRemovePrimaryKey ( S model ) { String fieldName = getPKField ( model . getClass ( ) ) ; Object value = invokeMethod ( model , getGetterName ( fieldName ) , EMPTY_ARG ) ; if ( null != value ) { invokeMethod ( model , getSetterName ( fieldName ) , NULL_ARG ) ; } return value ; }
Return the primary key of the model and set it to null