Annotation Type JpaEntityScan
-
@Retention(RUNTIME) @Target(TYPE) @Documented @Import(JpaEntityScanBeanRegistrar.class) public @interface JpaEntityScan
Similar toEntityScan, but allows for tying the scanned entities to a particular route for use withJpaDataRouteandRoutingJpaDataSource. It is expected that theroutePackage()values matches that ofJpaDataRoute.routePackage(). The end result is that one or more entities will be tied to a particular datasource, thereby limiting the scope to a specific backing datastore or database partition.- Author:
- Jeff Fischer
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description String[]basePackagesOne or more packages to scan for valid JPA annotated entities.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanincludeInAllRoutesIfRoutePackageEmptyIfroutePackage()is left empty, the system will normally try to infer a route package.StringroutePackageThe portion of a package name that uniquely identifies this route.
-
-
-
Element Detail
-
basePackages
String[] basePackages
One or more packages to scan for valid JPA annotated entities.- Returns:
- One or more packages to scan for valid JPA annotated entities.
-
-
-
routePackage
String routePackage
The portion of a package name that uniquely identifies this route. For example, the Broadleaf offer service exposes a packagecom.broadleafcommerce.promotion.offerthat uniquely belongs to all classes in the offer service. This can be left blank, in which case, the domain classes in the basePackages will be reviewed for extensions of out-of-the-box domain by which the routePackage may be deduced. Failing that, all scanned entities in thebasePackages()will be included in all EntityManagerFactory instances.- Returns:
- The portion of a package name that uniquely identifies this route.
- Default:
- ""
-
-
-
includeInAllRoutesIfRoutePackageEmpty
boolean includeInAllRoutesIfRoutePackageEmpty
IfroutePackage()is left empty, the system will normally try to infer a route package. IfincludeInAllRoutesIfRoutePackageEmptyis set to true, the system will skip that step and automatically include the scanned entities in all routes. The default is false.- Returns:
- Whether or not to include scanned entities in all routes if
routePackage()is empty.
- Default:
- false
-
-