public class CassandraEntityClassScanner extends Object
entity annotations
on the class path using either base package names, base package
classes or both.ClassUtils.forName(String, ClassLoader)
Constructor and Description |
---|
CassandraEntityClassScanner()
Creates a new
CassandraEntityClassScanner . |
CassandraEntityClassScanner(Class<?>... entityBasePackageClasses)
Creates a new
CassandraEntityClassScanner given entityBasePackageClasses . |
CassandraEntityClassScanner(Collection<String> entityBasePackages)
Creates a new
CassandraEntityClassScanner given entityBasePackages . |
CassandraEntityClassScanner(Collection<String> entityBasePackages,
Collection<Class<?>> entityBasePackageClasses)
|
CassandraEntityClassScanner(String... entityBasePackages)
Creates a new
CassandraEntityClassScanner given entityBasePackages . |
Modifier and Type | Method and Description |
---|---|
protected Class<? extends Annotation>[] |
getEntityAnnotations() |
Set<Class<?>> |
getEntityBasePackageClasses() |
Set<String> |
getEntityBasePackages() |
static Set<Class<?>> |
scan(Class<?>... entityBasePackageClasses)
Scan one or more base packages for entity classes.
|
static Set<Class<?>> |
scan(Collection<String> entityBasePackages)
Scan one or more base packages for entity classes.
|
static Set<Class<?>> |
scan(Collection<String> entityBasePackages,
Collection<Class<?>> entityBasePackageClasses)
Scan one or more base packages for entity classes.
|
static Set<Class<?>> |
scan(String... entityBasePackages)
Scan one or more base packages for entity classes.
|
protected Set<Class<?>> |
scanBasePackageForEntities(String basePackage) |
Set<Class<?>> |
scanForEntityClasses()
Scans the mapping base package for entity classes annotated with
Table or Persistent . |
void |
setBeanClassLoader(ClassLoader beanClassLoader)
Set the bean
ClassLoader to load class candidates discovered by the class path scan. |
void |
setEntityBasePackageClasses(Collection<Class<?>> entityBasePackageClasses)
Set the base package classes to be used for the entity scan.
|
void |
setEntityBasePackages(Collection<String> entityBasePackages)
Set the base package names to be used for the entity scan.
|
public CassandraEntityClassScanner()
CassandraEntityClassScanner
.public CassandraEntityClassScanner(Class<?>... entityBasePackageClasses)
CassandraEntityClassScanner
given entityBasePackageClasses
.entityBasePackageClasses
- must not be null.public CassandraEntityClassScanner(String... entityBasePackages)
CassandraEntityClassScanner
given entityBasePackages
.entityBasePackages
- must not be null.public CassandraEntityClassScanner(Collection<String> entityBasePackages)
CassandraEntityClassScanner
given entityBasePackages
.entityBasePackages
- must not be null.public CassandraEntityClassScanner(Collection<String> entityBasePackages, Collection<Class<?>> entityBasePackageClasses)
entityBasePackages
- must not be null.entityBasePackageClasses
- must not be null.public static Set<Class<?>> scan(String... entityBasePackages) throws ClassNotFoundException
entityBasePackages
- must not be null.Set
containing all discovered entity classes.ClassNotFoundException
public static Set<Class<?>> scan(Class<?>... entityBasePackageClasses) throws ClassNotFoundException
entityBasePackageClasses
- must not be null.Set
containing all discovered entity classes.ClassNotFoundException
- if a discovered class could not be loaded via.public static Set<Class<?>> scan(Collection<String> entityBasePackages) throws ClassNotFoundException
entityBasePackages
- must not be null.Set
containing all discovered entity classes.ClassNotFoundException
- if a discovered class could not be loaded via.public static Set<Class<?>> scan(Collection<String> entityBasePackages, Collection<Class<?>> entityBasePackageClasses) throws ClassNotFoundException
entityBasePackages
- must not be null.entityBasePackageClasses
- must not be null.Set
containing all discovered entity classes.ClassNotFoundException
- if a discovered class could not be loaded via.public Set<String> getEntityBasePackages()
public void setEntityBasePackages(Collection<String> entityBasePackages)
entityBasePackages
- must not be null.public Set<Class<?>> getEntityBasePackageClasses()
public void setEntityBasePackageClasses(Collection<Class<?>> entityBasePackageClasses)
entityBasePackageClasses
- must not be null.public void setBeanClassLoader(ClassLoader beanClassLoader)
ClassLoader
to load class candidates discovered by the class path scan.beanClassLoader
- must not be null.public Set<Class<?>> scanForEntityClasses() throws ClassNotFoundException
Table
or Persistent
.Set<Class<?>>
representing the annotated entity classes found.ClassNotFoundException
- if a discovered class could not be loaded via.getEntityBasePackages()
protected Set<Class<?>> scanBasePackageForEntities(String basePackage) throws ClassNotFoundException
ClassNotFoundException
protected Class<? extends Annotation>[] getEntityAnnotations()
Table
,
Persistent
,
PrimaryKeyClass
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.