org.milyn.scribe
Interface Queryable


public interface Queryable

The queryable interface

Provides methods for locating entities via a query. The syntax of the query depends on the implementation.

Author:
maurice.zeijen@smies.com

Method Summary
 java.lang.Object lookupByQuery(java.lang.String query, java.util.Map<java.lang.String,?> parameters)
          Looks up one or more entities via a query string.
 java.lang.Object lookupByQuery(java.lang.String query, java.lang.Object... parameters)
          Looks up one or more entities via a query string.
 

Method Detail

lookupByQuery

java.lang.Object lookupByQuery(java.lang.String query,
                               java.lang.Object... parameters)
Looks up one or more entities via a query string.

If one entity is located then the object should directly be returned. If multiple are located then a 'Collection', containing the entities, should be returned. If no entities are located then null should be returned.

Parameters:
query - the query
parameters - the array of parameters
Returns:
the located entity, a collection of located entities or null if no entities are located.
Throws:
javax.naming.OperationNotSupportedException - if the operation is not supported

lookupByQuery

java.lang.Object lookupByQuery(java.lang.String query,
                               java.util.Map<java.lang.String,?> parameters)
Looks up one or more entities via a query string.

If one entity is located then the object should directly be returned. If multiple are located then a 'Collection', containing the entities, should be returned. If no entities are located then null should be returned.

Parameters:
query - the query
parameters - the map of parameters
Returns:
the located entity, a collection of located entities or null if no entities are located.
Throws:
javax.naming.OperationNotSupportedException - if the operation is not supported


Copyright © 2011. All Rights Reserved.