summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2006-10-31 18:04:10 +0000
committerBrian S. O'Neill <bronee@gmail.com>2006-10-31 18:04:10 +0000
commite009e8ea98d8c9c15e0a90a5085ac435093cb9ed (patch)
tree946906546c3336252f21df1e049ca986df1d8448 /src/main
parentf749d6eb94666351520d29cd0668a95adc29f34a (diff)
Add feature to apply default direction to all indexes.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/amazon/carbonado/spi/StorableIndexSet.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/spi/StorableIndexSet.java b/src/main/java/com/amazon/carbonado/spi/StorableIndexSet.java
index e9295bc..965880e 100644
--- a/src/main/java/com/amazon/carbonado/spi/StorableIndexSet.java
+++ b/src/main/java/com/amazon/carbonado/spi/StorableIndexSet.java
@@ -175,6 +175,15 @@ public class StorableIndexSet<S extends Storable> extends TreeSet<StorableIndex<
// Now replace merged indexes.
replaceEntries(mergedReplacements);
+ setDefaultDirection(defaultDirection);
+ }
+
+ /**
+ * Set the default direction for all index properties.
+ *
+ * @param defaultDirection replace unspecified property directions with this
+ */
+ public void setDefaultDirection(Direction defaultDirection) {
// Apply default sort direction to those unspecified.
if (defaultDirection != Direction.UNSPECIFIED) {
Map<StorableIndex<S>, StorableIndex<S>> replacements = null;