public interface EntityManager
Subject| Modifier and Type | Method and Description |
|---|---|
Subject |
getSubject(Class<?> clazz)
Get the subject annotation for the class.
|
SubjectInfo |
getSubjectInfo(Class<?> clazz)
Get the SubjectInfo for the class.
|
boolean |
isInstance(Object target,
Class<?> clazz)
Determine if target has all the properties required in the Subject( type
) annotation value.
|
void |
parseClasses(String packageName)
Parses the the classes in a package (and subpackages) looking for Subject
annotated classes.
|
void |
parseClasses(String[] packageNames)
Parses the the classes in an array of packages (and subpackages) looking
for Subject annotated classes.
|
<T> T |
read(Object source,
Class<T> primaryClass,
Class<?>... secondaryClasses)
Read an instance of clazz from source.
|
Object |
update(Object source,
Object target)
Calls the target.setX predicate methods with the results of the
source.getX predicate
methods.
|
Subject getSubject(Class<?> clazz)
clazz - SubjectInfo getSubjectInfo(Class<?> clazz)
clazz - The class to get SubjectInfo for.IllegalArgumentException - if clazz is not properly annotated with Subject annotations.boolean isInstance(Object target, Class<?> clazz)
target - The object to check.clazz - A Subject annotated class.IllegalArgumentException - if clazz is not a Subject annotated class.void parseClasses(String packageName) throws MissingAnnotation
packageName - The name of the package to processMissingAnnotationIf any Subject annotated classes are missing required annotations, a
log entry is written.
If any Subject annotated classes faild parsing a MissingAnnotation
exception is thrown after
all classes have been processed.void parseClasses(String[] packageNames) throws MissingAnnotation
packageNames - The array of package names to processMissingAnnotationClassLoader.getResources(String)<T> T read(Object source, Class<T> primaryClass, Class<?>... secondaryClasses) throws MissingAnnotation
source - Must either implement Resource or ResourceWrapper interfaces.primaryClass - The class of the object to be returned.secondaryClasses - A lost of other classes that are implemented.MissingAnnotation - if any of the classes do not have Subject annotations.IllegalArgumentException - if source implements neither Resource nor ResourceWrapper.isInstance(Object, Class)Object update(Object source, Object target) throws IllegalArgumentException
source - The object to copy data from.target - The object to copy data to.IllegalArgumentExceptionCopyright © 2012-2013 XENEI.com. All Rights Reserved.