public class EntityManagerImpl extends Object implements EntityManager
| Constructor and Description |
|---|
EntityManagerImpl()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
com.hp.hpl.jena.rdf.model.Resource |
addInstanceProperties(com.hp.hpl.jena.rdf.model.Resource r,
Class<?> clazz)
Read an instance of clazz from Resource r.
|
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)
Since the EntityManger implements the manager as a live data read against
the Model, this method
provides a mechanism to copy all the values from the source to the
target.
|
public com.hp.hpl.jena.rdf.model.Resource addInstanceProperties(com.hp.hpl.jena.rdf.model.Resource r,
Class<?> clazz)
r - The Resource to verify.clazz - The Subject annotated class to verify against.public Subject getSubject(Class<?> clazz)
EntityManagergetSubject in interface EntityManagerpublic SubjectInfo getSubjectInfo(Class<?> clazz)
EntityManagergetSubjectInfo in interface EntityManagerclazz - The class to get SubjectInfo for.public boolean isInstance(Object target, Class<?> clazz)
EntityManagerisInstance in interface EntityManagertarget - The object to check.clazz - A Subject annotated class.public void parseClasses(String packageName) throws MissingAnnotation
EntityManagerparseClasses in interface EntityManagerpackageName - 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.public void parseClasses(String[] packageNames) throws MissingAnnotation
EntityManagerparseClasses in interface EntityManagerpackageNames - The array of package names to processMissingAnnotationClassLoader.getResources(String)public <T> T read(Object source, Class<T> primaryClass, Class<?>... secondaryClasses) throws MissingAnnotation
EntityManagerread in interface EntityManagersource - 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.EntityManager.isInstance(Object, Class)public Object update(Object source, Object target)
update in interface EntityManagersource - The object that has the values to transfer.target - The object that has the receptors for the values.Copyright © 2012-2013 XENEI.com. All Rights Reserved.