logger.fine("found id field of "
+ containedClass.getName() + "\nIt is "
+ f.toGenericString());
}
if (returned != null)
throw new BadIdAnnotatedClassException(containedClass);
if (logger.isLoggable(Level.CONFIG))
logger.config("the field " + f.toGenericString()
+ " seems to be an id field");
if (Long.class.equals(f.getType())
|| Long.TYPE.equals(f.getType())) {
returned = new LongIdManager(containedClass, datastore, provider, repository, hierarchyManager);
logger.config("using standard LongIdManager");
} else if (String.class.equals(f.getType())) {
logger.config("using standard StringIdManager");
} else {
throw new NoSuchIdManagerException(f);
}
if (logger.isLoggable(Level.FINE)) {
logger.fine("As a consequence, id manager is a "
+ returned.getClass().getName());
}
}
// Side effect : access to the field !
f.setAccessible(true);
}
}
if (returned == null)
throw new BadIdAnnotatedClassException(containedClass);
return returned;
}