Package net.sf.basedb.util.annotations
Class RunnableInheritAnnotationsManager
java.lang.Object
net.sf.basedb.util.annotations.RunnableInheritAnnotationsManager
- All Implemented Interfaces:
Runnable
Utility class for processing multiple items with a
InheritAnnotationsManager
in a separated thread
with progress reporting.
Initialize this class with a session control, a list
of Annotatable
items and a list of
InheritSpecification
:s, then start a new
thread: new Thread(manager).start();
- Since:
- 3.5
- Author:
- nicklas
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List<Annotatable>
private ProgressReporter
private final SessionControl
private final List<InheritSpecification>
-
Constructor Summary
ConstructorDescriptionCreate a new instance that should use the given session control. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllItems
(Collection<? extends Annotatable> items) Add all items for processing.void
addItem
(Annotatable item) Add an item that should inherit annotations.void
addSpecification
(InheritSpecification specification) Add a specification with rules for inheriting annotations.void
run()
void
setProgressReporter
(ProgressReporter progress) Set the progress reporter to use for reporting progress.
-
Field Details
-
sc
-
progress
-
specifications
-
items
-
-
Constructor Details
-
RunnableInheritAnnotationsManager
Create a new instance that should use the given session control.
-
-
Method Details
-
setProgressReporter
Set the progress reporter to use for reporting progress. -
addSpecification
Add a specification with rules for inheriting annotations. -
addItem
Add an item that should inherit annotations. The item will be processed withInheritAnnotationsManager.process(Annotatable)
once the thread is stared. -
addAllItems
Add all items for processing. -
run
public void run()
-