|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ElmoManager
Manages the basic operations of Elmo JavaBeans.
| Method Summary | ||
|---|---|---|
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. |
|
ElmoQuery |
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(QName qname,
Class<T> concept,
Class<?>... concepts)
Assigns concept to the named entity subject. |
|
|
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. |
|
Entity |
find(QName qname)
Retrieves the rdf:type, creates a Java Bean class and instantiates it. |
|
|
findAll(Class<T> role)
Creates an iteration of entities that implement this role. |
|
Locale |
getLocale()
Locale this manager was created with. |
|
EntityTransaction |
getTransaction()
Returns the resource-level transaction object. |
|
boolean |
isOpen()
If this manager currently has an open connection to the repository. |
|
|
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 entity,
QName qname)
Removes all the references to the given entity and replaces
them with references to the new qname. |
|
void |
undoMemento(Memento memento)
Rolls-back any changes made after this memento object was created. |
|
| Method Detail |
|---|
Locale getLocale()
boolean isOpen()
true if the connection is open.void close()
void close(Iterator<?> iter)
EntityTransaction getTransaction()
Memento createMemento()
undoMemento(Memento)void undoMemento(Memento memento)
memento - Transaction to be rolled-back.createMemento()void redoMemento(Memento memento)
memento - Transaction to be repeated.createMemento(),
undoMemento(Memento)boolean contains(Object entity)
entity -
true if the instance belongs to the current
persistence context.
<T> T create(Class<T> concept,
Class<?>... concepts)
type to a new anonymous entity.
concept - interface to be translated to rdf:type.concepts - additional interfaces to be translated to rdf:type.
<T> T create(QName qname,
Class<T> concept,
Class<?>... concepts)
concept to the new named entity.
qname - 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
<T> T designate(Class<T> concept,
Class<?>... concepts)
type to a new anonymous entity. Use create instead.
concept - interface to be translated to rdf:type.concepts - additional interfaces to be translated to rdf:type.
<T> T designate(QName qname,
Class<T> concept,
Class<?>... concepts)
concept to the named entity subject.
qname - 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
<T> T designate(Class<T> concept,
QName qname)
concept to the named entity subject.
concept - interface to be translated to rdf:type.qname - URI of the entity.
<T> T designateEntity(Object entity,
Class<T> concept,
Class<?>... concepts)
concept to the given entity and return a new object
reference that implements the given concept.
T - entity - 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
<T> T designateEntity(Class<T> concept,
Object entity)
concept to the given entity and return a new object
reference that implements the given concept.
T - concept - interface to be translated to rdf:type.entity - An existing entity retrieved from this manager.
entity that implements
concept.
Entity removeDesignation(Object entity,
Class<?>... concepts)
concept designation from this
entity.
entity - An existing entity retrieved from this manager.concepts - interface to be translated to rdf:type.
entity that does not
implement concept.
@Deprecated
Entity removeDesignation(Class<?> concept,
Object entity)
concept designation from this
entity.
concept - interface to be translated to rdf:type.entity - An existing entity retrieved from this manager.
entity that does not
implement concept.
<T> T rename(T entity,
QName qname)
entity 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.
entity - current Entity to be renamedqname - new qualified name of the entity
entity with the given qname.Entity find(QName qname)
qname - URI of the entity.
ElmoQuery createQuery(String query)
query - rdf query in the configured language - default SPARQL.
ElmoQuery.<T> Iterable<T> findAll(Class<T> role)
role.
role - concept or behaviour to be translated to one or more
rdf:types.
void refresh(Object entity)
entity 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.
entity - <T> T merge(T bean)
bean implements Entity its QName will be
used to look up the managed entity, otherwise a new anonymous entity will
be created.
T - bean - with values that shoud be merged
void persist(Object bean)
bean implements Entity its QName will be
used to look up the managed entity, otherwise a new anonymous entity will
be created.
bean - with values that shoud be mergedvoid remove(Object entity)
entity or any
other object referencing it are no longer used and any object that may
have cached a value containing this is refreshed.
entity - to be removed from the pool and repository.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||