|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.elmo.sesame.SesameManager
public class SesameManager
Handles operations of ElmoManager and EntityManager.
| Constructor Summary | |
|---|---|
SesameManager()
|
|
| Method Summary | ||
|---|---|---|
QName |
asQName(Resource resource)
Deprecated. |
|
void |
clear()
|
|
void |
close()
Closes any transactions or connections in the manager. |
|
void |
close(Iterator<?> iter)
Close an Iterator created by iterate() immediately, instead of waiting until the iteration is complete or connection is closed. |
|
boolean |
contains(Object entity)
Check if the instance belongs to the current persistence context. |
|
|
create(Class<T> concept,
Class<?>... concepts)
Assigns type to a new anonymous entity. |
|
|
create(QName qname,
Class<T> concept,
Class<?>... concepts)
Assigns concept to the new named entity. |
|
Memento |
createMemento()
Creates a new Memento Object that represents the current state of the Bean pool. |
|
Query |
createNamedQuery(String name)
|
|
SesameQuery |
createNativeQuery(String serql)
|
|
SesameQuery |
createNativeQuery(String serql,
Class concept)
|
|
SesameQuery |
createNativeQuery(String serql,
String nil)
|
|
SesameQuery |
createQuery(String query)
Creates an ElmoQuery to evaluate the query string. |
|
|
designate(Class<T> concept,
Class<?>... concepts)
Deprecated. |
|
|
designate(Class<T> concept,
QName qname)
Deprecated. |
|
|
designate(Class<T> concept,
Resource resource)
Deprecated. |
|
|
designate(QName qname,
Class<T> concept,
Class<?>... concepts)
Assigns concept to the named entity subject. |
|
|
designate(Resource resource,
Class<T> concept,
Class<?>... concepts)
|
|
|
designateEntity(Class<T> concept,
Object entity)
Deprecated. |
|
|
designateEntity(Object entity,
Class<T> concept,
Class<?>... concepts)
Assigns concept to the given entity and return a new object
reference that implements the given concept. |
|
|
find(Class<T> concept,
Object qname)
|
|
SesameEntity |
find(QName qname)
Retrieves the rdf:type, creates a Java Bean class and instantiates it. |
|
SesameEntity |
find(Resource resource)
|
|
|
findAll(Class<T> javaClass)
Creates an iteration of entities that implement this role. |
|
void |
flush()
|
|
ContextAwareConnection |
getConnection()
|
|
Object |
getDelegate()
|
|
FlushModeType |
getFlushMode()
|
|
Object |
getInstance(Value value)
|
|
String |
getLanguage()
|
|
LiteralManager<URI,Literal> |
getLiteralManager()
|
|
Locale |
getLocale()
Locale this manager was created with. |
|
Value |
getLocalizedValue(Object instance)
|
|
|
getReference(Class<T> concept,
Object qname)
|
|
ResourceManager<Resource> |
getResourceManager()
|
|
RoleMapper<URI> |
getRoleMapper()
|
|
EntityTransaction |
getTransaction()
Returns the resource-level transaction object. |
|
Value |
getValue(Object instance)
|
|
boolean |
isOpen()
If this manager currently has an open connection to the repository. |
|
void |
joinTransaction()
|
|
void |
lock(Object entity,
LockModeType mode)
|
|
|
merge(T bean)
Copies all non-null values from bean into an entity managed by this manager. |
|
void |
persist(Object bean)
Copies all non-null values from bean into an entity managed by this manager. |
|
void |
redoMemento(Memento memento)
Replays changes made after this memento object was created. |
|
void |
refresh(Object entity)
If entity implements Refreshable, its method
Refreshable.refresh() will be called. |
|
void |
remove(Object entity)
Removes the given entity or subject and all implementing roles. |
|
Entity |
removeDesignation(Class<?> concept,
Object entity)
Deprecated. |
|
Entity |
removeDesignation(Object entity,
Class<?>... concepts)
Removes the concept designation from this
entity. |
|
|
rename(T bean,
QName qname)
Removes all the references to the given entity and replaces
them with references to the new qname. |
|
|
rename(T bean,
Resource dest)
|
|
void |
setConnection(ContextAwareConnection connection)
|
|
void |
setFlushMode(FlushModeType mode)
|
|
void |
setLiteralManager(LiteralManager<URI,Literal> manager)
|
|
void |
setLocale(Locale locale)
|
|
void |
setResourceManager(ResourceManager<Resource> manager)
|
|
void |
setRoleMapper(RoleMapper<URI> mapper)
|
|
void |
undoMemento(Memento memento)
Rolls-back any changes made after this memento object was created. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SesameManager()
| Method Detail |
|---|
public ContextAwareConnection getConnection()
public void setConnection(ContextAwareConnection connection)
public EntityTransaction getTransaction()
ElmoManager
getTransaction in interface EntityManagergetTransaction in interface ElmoManagerpublic void joinTransaction()
joinTransaction in interface EntityManagerpublic Locale getLocale()
ElmoManager
getLocale in interface ElmoManagerpublic void setLocale(Locale locale)
public String getLanguage()
public ResourceManager<Resource> getResourceManager()
public void setResourceManager(ResourceManager<Resource> manager)
public LiteralManager<URI,Literal> getLiteralManager()
public void setLiteralManager(LiteralManager<URI,Literal> manager)
public RoleMapper<URI> getRoleMapper()
public void setRoleMapper(RoleMapper<URI> mapper)
public boolean isOpen()
ElmoManager
isOpen in interface EntityManagerisOpen in interface ElmoManagertrue if the connection is open.public void close()
ElmoManager
close in interface EntityManagerclose in interface ElmoManagerpublic void close(Iterator<?> iter)
ElmoManager
close in interface ElmoManagerpublic void flush()
flush in interface EntityManagerpublic void clear()
clear in interface EntityManagerpublic FlushModeType getFlushMode()
getFlushMode in interface EntityManagerpublic void setFlushMode(FlushModeType mode)
setFlushMode in interface EntityManagerpublic Object getDelegate()
getDelegate in interface EntityManagerpublic Memento createMemento()
ElmoManager
createMemento in interface ElmoManagerElmoManager.undoMemento(Memento)public void undoMemento(Memento memento)
ElmoManager
undoMemento in interface ElmoManagermemento - Transaction to be rolled-back.ElmoManager.createMemento()public void redoMemento(Memento memento)
ElmoManager
redoMemento in interface ElmoManagermemento - Transaction to be repeated.ElmoManager.createMemento(),
ElmoManager.undoMemento(Memento)public Object getInstance(Value value)
public Value getValue(Object instance)
public Value getLocalizedValue(Object instance)
public boolean contains(Object entity)
ElmoManager
contains in interface EntityManagercontains in interface ElmoManagertrue if the instance belongs to the current
persistence context.
public <T> T create(Class<T> concept,
Class<?>... concepts)
ElmoManagertype to a new anonymous entity.
create in interface ElmoManagerconcept - interface to be translated to rdf:type.concepts - additional interfaces to be translated to rdf:type.
public <T> T create(QName qname,
Class<T> concept,
Class<?>... concepts)
ElmoManagerconcept to the new named entity.
create in interface ElmoManagerqname - URI of the new entity that does not exist in the repository.concept - interface to be translated to rdf:type.concepts - additional interfaces to be translated to rdf:type.
@Deprecated
public <T> T designate(Class<T> concept,
Class<?>... concepts)
ElmoManagertype to a new anonymous entity. Use create instead.
designate in interface ElmoManagerconcept - interface to be translated to rdf:type.concepts - additional interfaces to be translated to rdf:type.
public <T> T designate(QName qname,
Class<T> concept,
Class<?>... concepts)
ElmoManagerconcept to the named entity subject.
designate in interface ElmoManagerqname - URI of the entity that may exist in the repository.concept - interface to be translated to rdf:type.concepts - additional interfaces to be translated to rdf:type.
@Deprecated
public <T> T designate(Class<T> concept,
QName qname)
ElmoManagerconcept to the named entity subject.
designate in interface ElmoManagerconcept - interface to be translated to rdf:type.qname - URI of the entity.
public <T> T designate(Resource resource,
Class<T> concept,
Class<?>... concepts)
@Deprecated
public <T> T designate(Class<T> concept,
Resource resource)
@Deprecated
public <T> T designateEntity(Class<T> concept,
Object entity)
ElmoManagerconcept to the given entity and return a new object
reference that implements the given concept.
designateEntity in interface ElmoManagerconcept - interface to be translated to rdf:type.entity - An existing entity retrieved from this manager.
entity that implements
concept.
public <T> T designateEntity(Object entity,
Class<T> concept,
Class<?>... concepts)
ElmoManagerconcept to the given entity and return a new object
reference that implements the given concept.
designateEntity in interface ElmoManagerentity - An existing entity retrieved from this manager.concept - interface to be translated to rdf:type.concepts - additional interfaces to be translated to rdf:type.
entity that implements
concept.
@Deprecated
public Entity removeDesignation(Class<?> concept,
Object entity)
ElmoManagerconcept designation from this
entity.
removeDesignation in interface ElmoManagerconcept - interface to be translated to rdf:type.entity - An existing entity retrieved from this manager.
entity that does not
implement concept.
public Entity removeDesignation(Object entity,
Class<?>... concepts)
ElmoManagerconcept designation from this
entity.
removeDesignation in interface ElmoManagerentity - An existing entity retrieved from this manager.concepts - interface to be translated to rdf:type.
entity that does not
implement concept.
public <T> T rename(T bean,
QName qname)
ElmoManagerentity and replaces
them with references to the new qname. It is the
responsibility of the caller to ensure that any object references to this
resource are replaced with the returned object. Previous referenced
objects must no longer be used and any cached values must be refreshed.
rename in interface ElmoManagerbean - current Entity to be renamedqname - new qualified name of the entity
entity with the given qname.
public <T> T rename(T bean,
Resource dest)
public SesameEntity find(QName qname)
ElmoManager
find in interface ElmoManagerqname - URI of the entity.
@Deprecated public QName asQName(Resource resource)
public SesameEntity find(Resource resource)
public <T> T find(Class<T> concept,
Object qname)
find in interface EntityManager
public <T> T getReference(Class<T> concept,
Object qname)
getReference in interface EntityManagerpublic void refresh(Object entity)
ElmoManagerentity implements Refreshable, its method
Refreshable.refresh() will be called. This call instructs
entities that their property values may have changed and they should
reload them as needed.
refresh in interface EntityManagerrefresh in interface ElmoManagerpublic <T> T merge(T bean)
ElmoManagerbean implements Entity its QName will be
used to look up the managed entity, otherwise a new anonymous entity will
be created.
merge in interface EntityManagermerge in interface ElmoManagerbean - with values that shoud be merged
public void persist(Object bean)
ElmoManagerbean implements Entity its QName will be
used to look up the managed entity, otherwise a new anonymous entity will
be created.
persist in interface EntityManagerpersist in interface ElmoManagerbean - with values that shoud be mergedpublic SesameQuery createQuery(String query)
ElmoManager
createQuery in interface EntityManagercreateQuery in interface ElmoManagerquery - rdf query in the configured language - default SPARQL.
ElmoQuery.public SesameQuery createNativeQuery(String serql)
createNativeQuery in interface EntityManager
public SesameQuery createNativeQuery(String serql,
Class concept)
createNativeQuery in interface EntityManager
public SesameQuery createNativeQuery(String serql,
String nil)
createNativeQuery in interface EntityManagerpublic Query createNamedQuery(String name)
createNamedQuery in interface EntityManagerpublic <T> Iterable<T> findAll(Class<T> javaClass)
ElmoManagerrole.
findAll in interface ElmoManagerjavaClass - concept or behaviour to be translated to one or more
rdf:types.
public void remove(Object entity)
ElmoManagerentity or any
other object referencing it are no longer used and any object that may
have cached a value containing this is refreshed.
remove in interface EntityManagerremove in interface ElmoManagerentity - to be removed from the pool and repository.
public void lock(Object entity,
LockModeType mode)
lock in interface EntityManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||