org.apache.activemq.console.filter
Class ResultTransformFilter

java.lang.Object
  extended by org.apache.activemq.console.filter.ResultTransformFilter
All Implemented Interfaces:
QueryFilter
Direct Known Subclasses:
MapTransformFilter

public abstract class ResultTransformFilter
extends java.lang.Object
implements QueryFilter


Field Summary
 
Fields inherited from interface org.apache.activemq.console.filter.QueryFilter
QUERY_DELIMETER
 
Constructor Summary
protected ResultTransformFilter(QueryFilter next)
          Constructs a query filter that transform the format of the query result
 
Method Summary
 java.util.List<java.lang.Object> query(java.util.List queries)
          Transforms the queried results to a collection of different objects
 java.util.List query(java.lang.String query)
          Transforms the queried results to a collection of different objects
protected abstract  java.lang.Object transformElement(java.lang.Object obj)
          Transform a result object
protected  java.util.List<java.lang.Object> transformList(java.util.List<java.lang.Object> result)
          Transforms a collection to a collection of different objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultTransformFilter

protected ResultTransformFilter(QueryFilter next)
Constructs a query filter that transform the format of the query result

Parameters:
next - - the query filter to retrieve the results from
Method Detail

query

public java.util.List query(java.lang.String query)
                     throws java.lang.Exception
Transforms the queried results to a collection of different objects

Specified by:
query in interface QueryFilter
Parameters:
query - - the query string
Returns:
collections of transformed objects
Throws:
java.lang.Exception

query

public java.util.List<java.lang.Object> query(java.util.List queries)
                                       throws java.lang.Exception
Transforms the queried results to a collection of different objects

Specified by:
query in interface QueryFilter
Parameters:
queries - - the query map
Returns:
collections of transformed objects
Throws:
java.lang.Exception

transformList

protected java.util.List<java.lang.Object> transformList(java.util.List<java.lang.Object> result)
                                                  throws java.lang.Exception
Transforms a collection to a collection of different objects.

Parameters:
result - - the collection to transform
Returns:
collection of properties objects
Throws:
java.lang.Exception

transformElement

protected abstract java.lang.Object transformElement(java.lang.Object obj)
                                              throws java.lang.Exception
Transform a result object

Parameters:
obj - - the object instance to transform
Returns:
the transformed object
Throws:
java.lang.Exception


Copyright © 2005-2015. All Rights Reserved.