}
}
}
public static void bindPackage(String packageName, ExtendedMappings mappings) {
XPackage pckg = null;
try {
pckg = mappings.getReflectionManager().packageForName( packageName );
}
catch (ClassNotFoundException cnf) {
log.warn( "Package not found or wo package-info.java: " + packageName );
return;
}
if ( pckg.isAnnotationPresent( SequenceGenerator.class ) ) {
SequenceGenerator ann = pckg.getAnnotation( SequenceGenerator.class );
IdGenerator idGen = buildIdGenerator( ann, mappings );
mappings.addGenerator( idGen );
log.debug( "Add sequence generator with name: " + idGen.getName() );
}
if ( pckg.isAnnotationPresent( TableGenerator.class ) ) {
TableGenerator ann = pckg.getAnnotation( TableGenerator.class );
IdGenerator idGen = buildIdGenerator( ann, mappings );
mappings.addGenerator( idGen );
}
if ( pckg.isAnnotationPresent( GenericGenerator.class ) ) {
GenericGenerator ann = pckg.getAnnotation( GenericGenerator.class );
IdGenerator idGen = buildIdGenerator( ann, mappings );
mappings.addGenerator( idGen );
}
bindQueries( pckg, mappings );
bindFilterDefs( pckg, mappings );