diff options
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo/replicated')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java index 2c73200..b28fab5 100644 --- a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java +++ b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java @@ -24,8 +24,6 @@ import java.util.Set; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.cojen.util.BeanComparator;
-
import com.amazon.carbonado.CorruptEncodingException;
import com.amazon.carbonado.Cursor;
import com.amazon.carbonado.FetchException;
@@ -49,6 +47,8 @@ import com.amazon.carbonado.capability.ResyncCapability; import com.amazon.carbonado.capability.ShutdownCapability;
import com.amazon.carbonado.capability.StorableInfoCapability;
+import com.amazon.carbonado.cursor.SortedCursor;
+
import com.amazon.carbonado.info.Direction;
import com.amazon.carbonado.info.StorableInfo;
import com.amazon.carbonado.info.StorableIntrospector;
@@ -389,11 +389,7 @@ class ReplicatedRepository }
}
- BeanComparator bc = BeanComparator.forClass(type);
- for (String order : orderBy) {
- bc = bc.orderBy(order);
- bc = bc.caseSensitive();
- }
+ Comparator comparator = SortedCursor.createComparator(type, orderBy);
replicaQuery = replicaQuery.orderBy(orderBy);
masterQuery = masterQuery.orderBy(orderBy);
@@ -417,7 +413,7 @@ class ReplicatedRepository replicaStorage, replicaQuery,
masterStorage, masterQuery,
throttle, desiredSpeed,
- bc, replicaTxn);
+ comparator, replicaTxn);
replicaTxn.commit();
} finally {
|