org.specrunner.plugins.core.objects
Interface IObjectSelector<T>

Type Parameters:
T - The source of selection.
All Known Implementing Classes:
ObjectSelector

public interface IObjectSelector<T>

Perform object searches.

Author:
Thiago Santos

Method Summary
 T getSource(AbstractPluginObject caller, IContext context)
          The source for object selection.
 void release()
          Release comparison resources. i.e.
 List<Object> select(AbstractPluginObject caller, IContext context, Object instance, RowAdapter row, IResultSet result)
          Performs a select on object repository to compare with the reference.
 

Method Detail

getSource

T getSource(AbstractPluginObject caller,
            IContext context)
            throws Exception
The source for object selection.

Parameters:
caller - The plugin.
context - The testing context.
Returns:
The source.
Throws:
Exception - On selection errors.

select

List<Object> select(AbstractPluginObject caller,
                    IContext context,
                    Object instance,
                    RowAdapter row,
                    IResultSet result)
                    throws Exception
Performs a select on object repository to compare with the reference.

Parameters:
caller - The caller plugin.
context - The test context.
instance - The object to be compared with repository version.
row - The row which was the source for object creation.
result - The result set.
Returns:
The corresponding objects from repository.
Throws:
Exception - On selection errors.

release

void release()
             throws Exception
Release comparison resources. i.e. For Hibernate repositories free sessions in use for comparison.

Throws:
Exception - On release errors.


Copyright © 2014. All rights reserved.