public static boolean onAutoGenerateId ( Field idField , Object idValue ) { if ( idField . isAnnotationPresent ( GeneratedValue . class ) ) { return ! isIdSet ( idValue , idField ) ; } return false ; }
Validates and set id in case not set and intended for auto generation .