|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface EntityManager
An Entity Manager to manage instances of entities annotated with the Subject annotation Subject Annotation The EntityManager handles all client interactions with the Jena Model using the annotated classes.
Subject| Method Summary | ||
|---|---|---|
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. |
|
|
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. |
|
| Method Detail |
|---|
SubjectInfo getSubjectInfo(Class<?> clazz)
clazz - The class to get SubjectInfo for.
IllegalArgumentException - if clazz is not properly annotated with Subject annotations.
<T> T read(Object source,
Class<T> primaryClass,
Class<?>... secondaryClasses)
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)
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 process
MissingAnnotationIf 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 process
MissingAnnotationClassLoader.getResources(String)
Object update(Object source,
Object target)
throws IllegalArgumentException
source - The object to copy data from.target - The object to copy data to.
IllegalArgumentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||