com.continuent.tungsten.replicator.prefetch
Class PrefetchSqlTransformer

java.lang.Object
  extended by com.continuent.tungsten.replicator.prefetch.PrefetchSqlTransformer

public class PrefetchSqlTransformer
extends java.lang.Object

Contains utility methods to perform standard transformations to aid prefetch. This logic is encapsulated in a separate class that is easy to unit test.


Constructor Summary
PrefetchSqlTransformer()
           
 
Method Summary
 java.lang.String addLimitToQuery(java.lang.String query, int limit)
          Adds a LIMIT clause to the query if none is present already *and* the limit is greater than 0.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrefetchSqlTransformer

public PrefetchSqlTransformer()
Method Detail

addLimitToQuery

public java.lang.String addLimitToQuery(java.lang.String query,
                                        int limit)
Adds a LIMIT clause to the query if none is present already *and* the limit is greater than 0.

Parameters:
query - Query which should be adorned
limit - Number of rows to limit; must be greater than 0
Returns:
Query with limit clause