diff options
Diffstat (limited to 'src/main/java/com/amazon/carbonado')
48 files changed, 7 insertions, 134 deletions
diff --git a/src/main/java/com/amazon/carbonado/Trigger.java b/src/main/java/com/amazon/carbonado/Trigger.java index 01e664f..6b7f9ea 100644 --- a/src/main/java/com/amazon/carbonado/Trigger.java +++ b/src/main/java/com/amazon/carbonado/Trigger.java @@ -289,6 +289,8 @@ public abstract class Trigger<S> { }
public static final class Abort extends PersistException {
+ private static final long serialVersionUID = -8498639796139966911L;
+
static final Abort INSTANCE = new Abort();
private Abort() {
diff --git a/src/main/java/com/amazon/carbonado/cursor/GroupedCursor.java b/src/main/java/com/amazon/carbonado/cursor/GroupedCursor.java index 5ec8a56..152c2fe 100644 --- a/src/main/java/com/amazon/carbonado/cursor/GroupedCursor.java +++ b/src/main/java/com/amazon/carbonado/cursor/GroupedCursor.java @@ -21,8 +21,6 @@ package com.amazon.carbonado.cursor; import java.util.Comparator;
import java.util.NoSuchElementException;
-import org.cojen.util.BeanComparator;
-
import com.amazon.carbonado.Cursor;
import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.FetchInterruptedException;
diff --git a/src/main/java/com/amazon/carbonado/qe/AbstractQuery.java b/src/main/java/com/amazon/carbonado/qe/AbstractQuery.java index 74d6e8d..436c2c2 100644 --- a/src/main/java/com/amazon/carbonado/qe/AbstractQuery.java +++ b/src/main/java/com/amazon/carbonado/qe/AbstractQuery.java @@ -32,8 +32,6 @@ import com.amazon.carbonado.Storable; import com.amazon.carbonado.filter.Filter;
-import com.amazon.carbonado.info.OrderedProperty;
-
import com.amazon.carbonado.util.Appender;
/**
diff --git a/src/main/java/com/amazon/carbonado/qe/CompositeScore.java b/src/main/java/com/amazon/carbonado/qe/CompositeScore.java index 7190776..9992690 100644 --- a/src/main/java/com/amazon/carbonado/qe/CompositeScore.java +++ b/src/main/java/com/amazon/carbonado/qe/CompositeScore.java @@ -19,9 +19,6 @@ package com.amazon.carbonado.qe;
import java.util.Comparator;
-import java.util.Collections;
-import java.util.List;
-
import com.amazon.carbonado.Storable;
import com.amazon.carbonado.filter.Filter;
diff --git a/src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java index ef44963..1fe3ba8 100644 --- a/src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java +++ b/src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java @@ -20,8 +20,6 @@ package com.amazon.carbonado.qe; import java.io.IOException;
-import java.util.List;
-
import com.amazon.carbonado.Cursor;
import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.Query;
@@ -31,8 +29,6 @@ import com.amazon.carbonado.Storage; import com.amazon.carbonado.filter.Filter;
import com.amazon.carbonado.filter.FilterValues;
-import com.amazon.carbonado.info.OrderedProperty;
-
/**
* QueryExecutor which delegates by executing a Query on a Storage.
*
diff --git a/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java b/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java index d0f133c..161ad90 100644 --- a/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java +++ b/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java @@ -22,7 +22,6 @@ import java.io.IOException; import com.amazon.carbonado.Cursor;
import com.amazon.carbonado.FetchException;
-import com.amazon.carbonado.IsolationLevel;
import com.amazon.carbonado.PersistNoneException;
import com.amazon.carbonado.Storable;
import com.amazon.carbonado.Query;
@@ -32,8 +31,6 @@ import com.amazon.carbonado.cursor.EmptyCursor; import com.amazon.carbonado.filter.Filter;
import com.amazon.carbonado.filter.FilterValues;
-import com.amazon.carbonado.info.OrderedProperty;
-
/**
* Special query implementation that fetches nothing.
*
diff --git a/src/main/java/com/amazon/carbonado/qe/FilteredQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/FilteredQueryExecutor.java index edf51cd..d431b3d 100644 --- a/src/main/java/com/amazon/carbonado/qe/FilteredQueryExecutor.java +++ b/src/main/java/com/amazon/carbonado/qe/FilteredQueryExecutor.java @@ -20,8 +20,6 @@ package com.amazon.carbonado.qe; import java.io.IOException;
-import java.util.List;
-
import com.amazon.carbonado.Cursor;
import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.Storable;
@@ -33,8 +31,6 @@ import com.amazon.carbonado.filter.Filter; import com.amazon.carbonado.filter.FilterValues;
import com.amazon.carbonado.filter.OpenFilter;
-import com.amazon.carbonado.info.OrderedProperty;
-
/**
* QueryExecutor which wraps another and filters results.
*
diff --git a/src/main/java/com/amazon/carbonado/qe/FilteringScore.java b/src/main/java/com/amazon/carbonado/qe/FilteringScore.java index 22a8c86..d3b3f35 100644 --- a/src/main/java/com/amazon/carbonado/qe/FilteringScore.java +++ b/src/main/java/com/amazon/carbonado/qe/FilteringScore.java @@ -23,7 +23,6 @@ import java.math.BigInteger; import java.util.ArrayList;
import java.util.Comparator;
import java.util.Collections;
-import java.util.Iterator;
import java.util.List;
import com.amazon.carbonado.Storable;
diff --git a/src/main/java/com/amazon/carbonado/qe/FullScanQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/FullScanQueryExecutor.java index f0e4517..d356e6b 100644 --- a/src/main/java/com/amazon/carbonado/qe/FullScanQueryExecutor.java +++ b/src/main/java/com/amazon/carbonado/qe/FullScanQueryExecutor.java @@ -20,9 +20,6 @@ package com.amazon.carbonado.qe; import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-
import com.amazon.carbonado.Cursor;
import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.Storable;
@@ -30,8 +27,6 @@ import com.amazon.carbonado.Storable; import com.amazon.carbonado.filter.Filter;
import com.amazon.carbonado.filter.FilterValues;
-import com.amazon.carbonado.info.OrderedProperty;
-
/**
* QueryExecutor which fully scans all Storables of a given type.
*
diff --git a/src/main/java/com/amazon/carbonado/qe/IndexedQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/IndexedQueryExecutor.java index 46527bf..45ce4aa 100644 --- a/src/main/java/com/amazon/carbonado/qe/IndexedQueryExecutor.java +++ b/src/main/java/com/amazon/carbonado/qe/IndexedQueryExecutor.java @@ -20,8 +20,6 @@ package com.amazon.carbonado.qe; import java.io.IOException;
-import java.util.Arrays;
-import java.util.Collections;
import java.util.List;
import com.amazon.carbonado.Cursor;
@@ -33,7 +31,6 @@ import com.amazon.carbonado.filter.FilterValues; import com.amazon.carbonado.filter.PropertyFilter;
import com.amazon.carbonado.info.StorableIndex;
-import com.amazon.carbonado.info.OrderedProperty;
/**
* QueryExecutor which utilizes an index.
diff --git a/src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java index 2272ecb..f3399a5 100644 --- a/src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java +++ b/src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java @@ -25,8 +25,6 @@ import java.util.Map; import org.cojen.classfile.ClassFile;
import org.cojen.classfile.CodeBuilder;
-import org.cojen.classfile.FieldInfo;
-import org.cojen.classfile.Label;
import org.cojen.classfile.LocalVariable;
import org.cojen.classfile.MethodInfo;
import org.cojen.classfile.Modifiers;
@@ -37,20 +35,13 @@ import org.cojen.util.SoftValuedHashMap; import com.amazon.carbonado.Cursor;
import com.amazon.carbonado.FetchException;
-import com.amazon.carbonado.Repository;
import com.amazon.carbonado.RepositoryException;
import com.amazon.carbonado.Storable;
-import com.amazon.carbonado.Storage;
-
import com.amazon.carbonado.cursor.MultiTransformedCursor;
-import com.amazon.carbonado.filter.AndFilter;
-import com.amazon.carbonado.filter.ClosedFilter;
import com.amazon.carbonado.filter.Filter;
import com.amazon.carbonado.filter.FilterValues;
import com.amazon.carbonado.filter.OpenFilter;
-import com.amazon.carbonado.filter.OrFilter;
-import com.amazon.carbonado.filter.PropertyFilter;
import com.amazon.carbonado.filter.RelOp;
import com.amazon.carbonado.info.ChainedProperty;
@@ -608,6 +599,7 @@ public class JoinedQueryExecutor<S extends Storable, T extends Storable> return mOuterLoopFilterValues.withValues(values.getValuesFor(mSourceFilterAsFromTarget));
}
+ @SuppressWarnings("unused")
private static interface Joiner {
/**
* Needs to be public for {@link QuickConstructorGenerator}, but hide
diff --git a/src/main/java/com/amazon/carbonado/qe/KeyQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/KeyQueryExecutor.java index fcf728d..f26a9b3 100644 --- a/src/main/java/com/amazon/carbonado/qe/KeyQueryExecutor.java +++ b/src/main/java/com/amazon/carbonado/qe/KeyQueryExecutor.java @@ -20,9 +20,6 @@ package com.amazon.carbonado.qe; import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-
import com.amazon.carbonado.Cursor;
import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.Storable;
@@ -30,7 +27,6 @@ import com.amazon.carbonado.Storable; import com.amazon.carbonado.filter.Filter;
import com.amazon.carbonado.filter.FilterValues;
-import com.amazon.carbonado.info.OrderedProperty;
import com.amazon.carbonado.info.StorableIndex;
/**
diff --git a/src/main/java/com/amazon/carbonado/qe/OrderingScore.java b/src/main/java/com/amazon/carbonado/qe/OrderingScore.java index 8eda9b9..15a277f 100644 --- a/src/main/java/com/amazon/carbonado/qe/OrderingScore.java +++ b/src/main/java/com/amazon/carbonado/qe/OrderingScore.java @@ -21,7 +21,6 @@ package com.amazon.carbonado.qe; import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
-import java.util.Map;
import java.util.Set;
import com.amazon.carbonado.Storable;
@@ -249,7 +248,7 @@ public class OrderingScore<S extends Storable> { if (shouldReverseOrder == null) {
freeProp = freeProp.direction(UNSPECIFIED);
} else {
- Direction freePropDir = freePropDir = freeProp.getDirection();
+ Direction freePropDir = freeProp.getDirection();
if (freePropDir == UNSPECIFIED) {
freePropDir = ASCENDING;
}
diff --git a/src/main/java/com/amazon/carbonado/qe/QueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/QueryExecutor.java index 6348fb9..b0ab801 100644 --- a/src/main/java/com/amazon/carbonado/qe/QueryExecutor.java +++ b/src/main/java/com/amazon/carbonado/qe/QueryExecutor.java @@ -20,8 +20,6 @@ package com.amazon.carbonado.qe; import java.io.IOException;
-import java.util.List;
-
import com.amazon.carbonado.Cursor;
import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.Storable;
@@ -29,8 +27,6 @@ import com.amazon.carbonado.Storable; import com.amazon.carbonado.filter.Filter;
import com.amazon.carbonado.filter.FilterValues;
-import com.amazon.carbonado.info.OrderedProperty;
-
/**
* Performs all the actual work of executing a query. QueryExecutors are linked
* together forming a <i>query plan</i>.
diff --git a/src/main/java/com/amazon/carbonado/qe/QueryExecutorCache.java b/src/main/java/com/amazon/carbonado/qe/QueryExecutorCache.java index 2729851..ab333a7 100644 --- a/src/main/java/com/amazon/carbonado/qe/QueryExecutorCache.java +++ b/src/main/java/com/amazon/carbonado/qe/QueryExecutorCache.java @@ -28,8 +28,6 @@ import com.amazon.carbonado.Storable; import com.amazon.carbonado.filter.Filter;
-import com.amazon.carbonado.info.OrderedProperty;
-
/**
* QueryExecutors should be cached since expensive analysis is often required
* to build them.
diff --git a/src/main/java/com/amazon/carbonado/qe/QueryFactory.java b/src/main/java/com/amazon/carbonado/qe/QueryFactory.java index 738d18a..b7ead1d 100644 --- a/src/main/java/com/amazon/carbonado/qe/QueryFactory.java +++ b/src/main/java/com/amazon/carbonado/qe/QueryFactory.java @@ -24,8 +24,6 @@ import com.amazon.carbonado.Storable; import com.amazon.carbonado.filter.FilterValues;
-import com.amazon.carbonado.info.OrderedProperty;
-
/**
* Produces {@link Query} instances from a query specification.
*
diff --git a/src/main/java/com/amazon/carbonado/qe/SortedQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/SortedQueryExecutor.java index 38a8e36..a142b72 100644 --- a/src/main/java/com/amazon/carbonado/qe/SortedQueryExecutor.java +++ b/src/main/java/com/amazon/carbonado/qe/SortedQueryExecutor.java @@ -33,8 +33,6 @@ import com.amazon.carbonado.cursor.SortedCursor; import com.amazon.carbonado.filter.Filter;
import com.amazon.carbonado.filter.FilterValues;
-import com.amazon.carbonado.info.OrderedProperty;
-
/**
* QueryExecutor which wraps another and sorts the results.
*
diff --git a/src/main/java/com/amazon/carbonado/qe/StandardQuery.java b/src/main/java/com/amazon/carbonado/qe/StandardQuery.java index 2e1cdfc..0a4c9d9 100644 --- a/src/main/java/com/amazon/carbonado/qe/StandardQuery.java +++ b/src/main/java/com/amazon/carbonado/qe/StandardQuery.java @@ -28,7 +28,6 @@ import com.amazon.carbonado.IsolationLevel; import com.amazon.carbonado.PersistException;
import com.amazon.carbonado.PersistMultipleException;
import com.amazon.carbonado.RepositoryException;
-import com.amazon.carbonado.Storage;
import com.amazon.carbonado.Storable;
import com.amazon.carbonado.Transaction;
import com.amazon.carbonado.Query;
@@ -436,10 +435,6 @@ public abstract class StandardQuery<S extends Storable> extends AbstractQuery<S> return newInstance(values, mOrdering);
}
- private Query<S> createQuery(FilterValues<S> values) throws FetchException {
- return queryFactory().query(values, mOrdering);
- }
-
private Query<S> createQuery(FilterValues<S> values, OrderingList<S> ordering)
throws FetchException
{
diff --git a/src/main/java/com/amazon/carbonado/qe/StandardQueryFactory.java b/src/main/java/com/amazon/carbonado/qe/StandardQueryFactory.java index e0f716f..c7ac720 100644 --- a/src/main/java/com/amazon/carbonado/qe/StandardQueryFactory.java +++ b/src/main/java/com/amazon/carbonado/qe/StandardQueryFactory.java @@ -25,12 +25,9 @@ import org.cojen.util.SoftValuedHashMap; import org.cojen.util.WeakIdentityMap;
import com.amazon.carbonado.FetchException;
-import com.amazon.carbonado.IsolationLevel;
import com.amazon.carbonado.Query;
import com.amazon.carbonado.RepositoryException;
import com.amazon.carbonado.Storable;
-import com.amazon.carbonado.Transaction;
-
import com.amazon.carbonado.filter.ClosedFilter;
import com.amazon.carbonado.filter.Filter;
import com.amazon.carbonado.filter.FilterValues;
diff --git a/src/main/java/com/amazon/carbonado/qe/StorageAccess.java b/src/main/java/com/amazon/carbonado/qe/StorageAccess.java index 643d61c..8bef2f9 100644 --- a/src/main/java/com/amazon/carbonado/qe/StorageAccess.java +++ b/src/main/java/com/amazon/carbonado/qe/StorageAccess.java @@ -20,13 +20,9 @@ package com.amazon.carbonado.qe; import java.util.Collection;
-import com.amazon.carbonado.Cursor;
-import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.Storable;
import com.amazon.carbonado.Storage;
-import com.amazon.carbonado.cursor.SortBuffer;
-
import com.amazon.carbonado.info.StorableIndex;
/**
diff --git a/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java b/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java index 3e7a0a3..64888ba 100644 --- a/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java +++ b/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java @@ -30,7 +30,6 @@ import java.util.Set; import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.RepositoryException;
import com.amazon.carbonado.Storable;
-import com.amazon.carbonado.Storage;
import com.amazon.carbonado.SupportException;
import com.amazon.carbonado.filter.AndFilter;
diff --git a/src/main/java/com/amazon/carbonado/qe/UnionQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/UnionQueryExecutor.java index 47672d1..aa3577f 100644 --- a/src/main/java/com/amazon/carbonado/qe/UnionQueryExecutor.java +++ b/src/main/java/com/amazon/carbonado/qe/UnionQueryExecutor.java @@ -34,8 +34,6 @@ import com.amazon.carbonado.cursor.UnionCursor; import com.amazon.carbonado.filter.Filter;
import com.amazon.carbonado.filter.FilterValues;
-import com.amazon.carbonado.info.OrderedProperty;
-
/**
* QueryExecutor which wraps several others and unions the results.
*
diff --git a/src/main/java/com/amazon/carbonado/raw/CustomStorableCodec.java b/src/main/java/com/amazon/carbonado/raw/CustomStorableCodec.java index e319e7c..60bde78 100644 --- a/src/main/java/com/amazon/carbonado/raw/CustomStorableCodec.java +++ b/src/main/java/com/amazon/carbonado/raw/CustomStorableCodec.java @@ -31,7 +31,6 @@ import org.cojen.util.WeakIdentityMap; import com.amazon.carbonado.CorruptEncodingException;
import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.Storable;
-import com.amazon.carbonado.Storage;
import com.amazon.carbonado.SupportException;
import com.amazon.carbonado.info.Direction;
diff --git a/src/main/java/com/amazon/carbonado/raw/GenericInstanceFactory.java b/src/main/java/com/amazon/carbonado/raw/GenericInstanceFactory.java index a9c535d..e436760 100644 --- a/src/main/java/com/amazon/carbonado/raw/GenericInstanceFactory.java +++ b/src/main/java/com/amazon/carbonado/raw/GenericInstanceFactory.java @@ -20,7 +20,6 @@ package com.amazon.carbonado.raw; import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.Storable;
-import com.amazon.carbonado.Storage;
/**
* Can be used with {@link com.amazon.carbonado.util.QuickConstructorGenerator}
diff --git a/src/main/java/com/amazon/carbonado/raw/GenericStorableCodec.java b/src/main/java/com/amazon/carbonado/raw/GenericStorableCodec.java index f572dd8..df3245b 100644 --- a/src/main/java/com/amazon/carbonado/raw/GenericStorableCodec.java +++ b/src/main/java/com/amazon/carbonado/raw/GenericStorableCodec.java @@ -40,7 +40,6 @@ import com.amazon.carbonado.FetchException; import com.amazon.carbonado.FetchNoneException;
import com.amazon.carbonado.RepositoryException;
import com.amazon.carbonado.Storable;
-import com.amazon.carbonado.Storage;
import com.amazon.carbonado.SupportException;
import com.amazon.carbonado.info.Direction;
import com.amazon.carbonado.info.OrderedProperty;
@@ -125,7 +124,6 @@ public class GenericStorableCodec<S extends Storable> implements StorableCodec<S cf.setTarget("1.5");
// Declare some types.
- final TypeDesc storageType = TypeDesc.forClass(Storage.class);
final TypeDesc rawSupportType = TypeDesc.forClass(RawSupport.class);
final TypeDesc byteArrayType = TypeDesc.forClass(byte[].class);
final TypeDesc[] byteArrayParam = {byteArrayType};
diff --git a/src/main/java/com/amazon/carbonado/raw/RawStorableGenerator.java b/src/main/java/com/amazon/carbonado/raw/RawStorableGenerator.java index a8c7f6b..93c38be 100644 --- a/src/main/java/com/amazon/carbonado/raw/RawStorableGenerator.java +++ b/src/main/java/com/amazon/carbonado/raw/RawStorableGenerator.java @@ -36,7 +36,6 @@ import org.cojen.util.WeakIdentityMap; import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.PersistException;
import com.amazon.carbonado.Storable;
-import com.amazon.carbonado.Storage;
import com.amazon.carbonado.SupportException;
import com.amazon.carbonado.spi.MasterFeature;
@@ -197,7 +196,6 @@ public class RawStorableGenerator { // Declare some types.
final TypeDesc storableType = TypeDesc.forClass(Storable.class);
- final TypeDesc storageType = TypeDesc.forClass(Storage.class);
final TypeDesc triggerSupportType = TypeDesc.forClass(TriggerSupport.class);
final TypeDesc masterSupportType = TypeDesc.forClass(MasterSupport.class);
final TypeDesc rawSupportType = TypeDesc.forClass(RawSupport.class);
diff --git a/src/main/java/com/amazon/carbonado/raw/StorableCodec.java b/src/main/java/com/amazon/carbonado/raw/StorableCodec.java index b781691..7965690 100644 --- a/src/main/java/com/amazon/carbonado/raw/StorableCodec.java +++ b/src/main/java/com/amazon/carbonado/raw/StorableCodec.java @@ -20,8 +20,6 @@ package com.amazon.carbonado.raw; import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.Storable;
-import com.amazon.carbonado.Storage;
-
import com.amazon.carbonado.info.StorableIndex;
/**
diff --git a/src/main/java/com/amazon/carbonado/repo/indexed/IndexedCursor.java b/src/main/java/com/amazon/carbonado/repo/indexed/IndexedCursor.java index 075df1b..3a50a84 100644 --- a/src/main/java/com/amazon/carbonado/repo/indexed/IndexedCursor.java +++ b/src/main/java/com/amazon/carbonado/repo/indexed/IndexedCursor.java @@ -25,7 +25,6 @@ import org.apache.commons.logging.LogFactory; import com.amazon.carbonado.Cursor;
import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.PersistException;
-import com.amazon.carbonado.Repository;
import com.amazon.carbonado.RepositoryException;
import com.amazon.carbonado.Storable;
import com.amazon.carbonado.Storage;
diff --git a/src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java b/src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java index fde1952..99407a8 100644 --- a/src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java +++ b/src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java @@ -20,7 +20,6 @@ package com.amazon.carbonado.repo.indexed; import java.util.ArrayList;
import java.util.Collection;
-import java.util.Comparator;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
@@ -30,18 +29,12 @@ import org.apache.commons.logging.LogFactory; import com.amazon.carbonado.Cursor;
import com.amazon.carbonado.FetchException;
-import com.amazon.carbonado.PersistException;
-import com.amazon.carbonado.PersistNoneException;
import com.amazon.carbonado.Query;
-import com.amazon.carbonado.Repository;
import com.amazon.carbonado.RepositoryException;
import com.amazon.carbonado.Storable;
import com.amazon.carbonado.Storage;
-import com.amazon.carbonado.SupportException;
import com.amazon.carbonado.Transaction;
import com.amazon.carbonado.Trigger;
-import com.amazon.carbonado.UniqueConstraintException;
-
import com.amazon.carbonado.capability.IndexInfo;
import com.amazon.carbonado.capability.IndexInfoCapability;
@@ -62,7 +55,6 @@ import com.amazon.carbonado.qe.QueryEngine; import com.amazon.carbonado.qe.QueryExecutorFactory;
import com.amazon.carbonado.qe.StorageAccess;
-import com.amazon.carbonado.spi.RepairExecutor;
import com.amazon.carbonado.spi.StorableIndexSet;
/**
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java index bb851ab..7e09690 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java @@ -45,9 +45,7 @@ import org.cojen.util.SoftValuedHashMap; import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.OptimisticLockException;
import com.amazon.carbonado.PersistException;
-import com.amazon.carbonado.Repository;
import com.amazon.carbonado.Storable;
-import com.amazon.carbonado.Storage;
import com.amazon.carbonado.SupportException;
import com.amazon.carbonado.lob.Lob;
@@ -136,7 +134,6 @@ class JDBCStorableGenerator<S extends Storable> { final Map<JDBCStorableProperty<S>, Class<?>> lobLoaderMap = generateLobLoaders();
// Declare some types.
- final TypeDesc storageType = TypeDesc.forClass(Storage.class);
final TypeDesc jdbcRepoType = TypeDesc.forClass(JDBCRepository.class);
final TypeDesc jdbcSupportType = TypeDesc.forClass(JDBCSupport.class);
final TypeDesc resultSetType = TypeDesc.forClass(ResultSet.class);
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java index 08cdb46..b7a732e 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java @@ -39,7 +39,6 @@ import com.amazon.carbonado.Cursor; import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.IsolationLevel;
import com.amazon.carbonado.PersistException;
-import com.amazon.carbonado.Query;
import com.amazon.carbonado.Repository;
import com.amazon.carbonado.RepositoryException;
import com.amazon.carbonado.Storable;
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/MysqlSupportStrategy.java b/src/main/java/com/amazon/carbonado/repo/jdbc/MysqlSupportStrategy.java index e06f1f8..d9b5579 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/MysqlSupportStrategy.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/MysqlSupportStrategy.java @@ -18,17 +18,6 @@ package com.amazon.carbonado.repo.jdbc;
-import java.io.IOException;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.Statement;
-import java.sql.SQLException;
-
-import com.amazon.carbonado.FetchException;
-import com.amazon.carbonado.PersistException;
-import com.amazon.carbonado.Transaction;
-
/**
*
*
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/OracleBlob.java b/src/main/java/com/amazon/carbonado/repo/jdbc/OracleBlob.java index f60ade9..0235322 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/OracleBlob.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/OracleBlob.java @@ -25,8 +25,6 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method;
import java.sql.Blob;
-import java.sql.SQLException;
-
import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.PersistException;
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/OracleClob.java b/src/main/java/com/amazon/carbonado/repo/jdbc/OracleClob.java index 573a3ed..052ff5b 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/OracleClob.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/OracleClob.java @@ -25,8 +25,6 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method;
import java.sql.Clob;
-import java.sql.SQLException;
-
import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.PersistException;
diff --git a/src/main/java/com/amazon/carbonado/repo/logging/LoggingQuery.java b/src/main/java/com/amazon/carbonado/repo/logging/LoggingQuery.java index 2535c74..ecf54a0 100644 --- a/src/main/java/com/amazon/carbonado/repo/logging/LoggingQuery.java +++ b/src/main/java/com/amazon/carbonado/repo/logging/LoggingQuery.java @@ -23,8 +23,6 @@ import com.amazon.carbonado.FetchException; import com.amazon.carbonado.PersistException;
import com.amazon.carbonado.Query;
import com.amazon.carbonado.Storable;
-import com.amazon.carbonado.Storage;
-
import com.amazon.carbonado.spi.WrappedQuery;
/**
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 5003053..9a3711f 100644 --- a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java +++ b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java @@ -27,7 +27,6 @@ import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit;
-import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.cojen.util.BeanComparator;
diff --git a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedStorage.java b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedStorage.java index cf30e5d..f781279 100644 --- a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedStorage.java +++ b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedStorage.java @@ -21,24 +21,18 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory;
import com.amazon.carbonado.FetchException;
-import com.amazon.carbonado.OptimisticLockException;
-import com.amazon.carbonado.PersistException;
-import com.amazon.carbonado.PersistNoneException;
import com.amazon.carbonado.Query;
import com.amazon.carbonado.Storage;
import com.amazon.carbonado.Storable;
import com.amazon.carbonado.Repository;
import com.amazon.carbonado.SupportException;
import com.amazon.carbonado.RepositoryException;
-import com.amazon.carbonado.Transaction;
import com.amazon.carbonado.Trigger;
-import com.amazon.carbonado.UniqueConstraintException;
import com.amazon.carbonado.UnsupportedTypeException;
import com.amazon.carbonado.filter.Filter;
import com.amazon.carbonado.spi.BelatedStorageCreator;
-import com.amazon.carbonado.spi.RepairExecutor;
/**
* ReplicatedStorage
diff --git a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicationTrigger.java b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicationTrigger.java index 19915b7..7ac60a6 100644 --- a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicationTrigger.java +++ b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicationTrigger.java @@ -23,12 +23,9 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import com.amazon.carbonado.FetchDeadlockException;
import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.FetchNoneException;
-import com.amazon.carbonado.IsolationLevel;
import com.amazon.carbonado.OptimisticLockException;
-import com.amazon.carbonado.PersistDeadlockException;
import com.amazon.carbonado.PersistException;
import com.amazon.carbonado.PersistNoneException;
import com.amazon.carbonado.Repository;
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBCursor.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBCursor.java index 81a517b..5d21dad 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBCursor.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBCursor.java @@ -20,7 +20,6 @@ package com.amazon.carbonado.repo.sleepycat; import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.IsolationLevel;
-import com.amazon.carbonado.PersistException;
import com.amazon.carbonado.Storable;
import com.amazon.carbonado.raw.RawCursor;
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java index 4618c7d..5147361 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java @@ -43,7 +43,6 @@ import com.amazon.carbonado.PersistException; import com.amazon.carbonado.Repository;
import com.amazon.carbonado.RepositoryException;
import com.amazon.carbonado.Storable;
-import com.amazon.carbonado.Storage;
import com.amazon.carbonado.Transaction;
import com.amazon.carbonado.TriggerFactory;
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java index c63445a..3a6d476 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java @@ -32,8 +32,6 @@ import java.util.concurrent.atomic.AtomicReference; import com.amazon.carbonado.Repository;
import com.amazon.carbonado.RepositoryException;
import com.amazon.carbonado.Storable;
-import com.amazon.carbonado.TriggerFactory;
-
import com.amazon.carbonado.repo.indexed.IndexedRepositoryBuilder;
import com.amazon.carbonado.raw.GenericStorableCodecFactory;
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java index 588f010..6eba33a 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java @@ -22,12 +22,10 @@ import java.util.Collection; import java.util.Collections;
import java.util.Map;
-import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.amazon.carbonado.Cursor;
import com.amazon.carbonado.FetchException;
-import com.amazon.carbonado.MalformedFilterException;
import com.amazon.carbonado.PersistException;
import com.amazon.carbonado.Query;
import com.amazon.carbonado.Repository;
diff --git a/src/main/java/com/amazon/carbonado/spi/AbstractRepositoryBuilder.java b/src/main/java/com/amazon/carbonado/spi/AbstractRepositoryBuilder.java index ed4eaf3..6193e50 100644 --- a/src/main/java/com/amazon/carbonado/spi/AbstractRepositoryBuilder.java +++ b/src/main/java/com/amazon/carbonado/spi/AbstractRepositoryBuilder.java @@ -22,15 +22,12 @@ import java.util.ArrayList; import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashSet;
-import java.util.List;
-
import java.util.concurrent.atomic.AtomicReference;
import com.amazon.carbonado.ConfigurationException;
import com.amazon.carbonado.Repository;
import com.amazon.carbonado.RepositoryBuilder;
import com.amazon.carbonado.RepositoryException;
-import com.amazon.carbonado.Trigger;
import com.amazon.carbonado.TriggerFactory;
/**
diff --git a/src/main/java/com/amazon/carbonado/spi/BelatedStorageCreator.java b/src/main/java/com/amazon/carbonado/spi/BelatedStorageCreator.java index 88d0f61..a23ed97 100644 --- a/src/main/java/com/amazon/carbonado/spi/BelatedStorageCreator.java +++ b/src/main/java/com/amazon/carbonado/spi/BelatedStorageCreator.java @@ -29,8 +29,6 @@ import com.amazon.carbonado.SupportException; import com.amazon.carbonado.Trigger;
import com.amazon.carbonado.filter.Filter;
-import com.amazon.carbonado.filter.FilterValues;
-
import com.amazon.carbonado.util.BelatedCreator;
/**
diff --git a/src/main/java/com/amazon/carbonado/spi/MasterStorableGenerator.java b/src/main/java/com/amazon/carbonado/spi/MasterStorableGenerator.java index 317aac6..1d9b7c5 100644 --- a/src/main/java/com/amazon/carbonado/spi/MasterStorableGenerator.java +++ b/src/main/java/com/amazon/carbonado/spi/MasterStorableGenerator.java @@ -39,7 +39,6 @@ import com.amazon.carbonado.OptimisticLockException; import com.amazon.carbonado.PersistException;
import com.amazon.carbonado.Repository;
import com.amazon.carbonado.Storable;
-import com.amazon.carbonado.Storage;
import com.amazon.carbonado.SupportException;
import com.amazon.carbonado.Transaction;
@@ -211,7 +210,6 @@ public final class MasterStorableGenerator<S extends Storable> { private void generateClass() throws SupportException {
// Declare some types.
final TypeDesc storableType = TypeDesc.forClass(Storable.class);
- final TypeDesc storageType = TypeDesc.forClass(Storage.class);
final TypeDesc triggerSupportType = TypeDesc.forClass(TriggerSupport.class);
final TypeDesc masterSupportType = TypeDesc.forClass(MasterSupport.class);
final TypeDesc transactionType = TypeDesc.forClass(Transaction.class);
diff --git a/src/main/java/com/amazon/carbonado/spi/StorableGenerator.java b/src/main/java/com/amazon/carbonado/spi/StorableGenerator.java index dff5a0d..bbaa7ba 100644 --- a/src/main/java/com/amazon/carbonado/spi/StorableGenerator.java +++ b/src/main/java/com/amazon/carbonado/spi/StorableGenerator.java @@ -53,9 +53,6 @@ import com.amazon.carbonado.Transaction; import com.amazon.carbonado.Trigger;
import com.amazon.carbonado.UniqueConstraintException;
-import com.amazon.carbonado.capability.Capability;
-import com.amazon.carbonado.capability.StorableInfoCapability;
-
import com.amazon.carbonado.lob.Lob;
import com.amazon.carbonado.info.ChainedProperty;
@@ -2251,6 +2248,7 @@ public final class StorableGenerator<S extends Storable> { * For the given join property, marks all of its dependent internal join
* element properties as dirty.
*/
+ /*
private void markInternalJoinElementsDirty(CodeBuilder b, StorableProperty joinProperty) {
int count = mAllProperties.size();
@@ -2278,6 +2276,7 @@ public final class StorableGenerator<S extends Storable> { }
}
}
+ */
/**
* Generates code to set all state properties to zero.
diff --git a/src/main/java/com/amazon/carbonado/spi/TriggerManager.java b/src/main/java/com/amazon/carbonado/spi/TriggerManager.java index 60661d1..ea7ae4f 100644 --- a/src/main/java/com/amazon/carbonado/spi/TriggerManager.java +++ b/src/main/java/com/amazon/carbonado/spi/TriggerManager.java @@ -229,7 +229,7 @@ public class TriggerManager<S extends Storable> { }
if (overridesMethod(triggerClass, BEFORE_UPDATE_METHOD) ||
- overridesMethod(triggerClass, BEFORE_TRY_INSERT_METHOD) ||
+ overridesMethod(triggerClass, BEFORE_TRY_UPDATE_METHOD) ||
overridesMethod(triggerClass, AFTER_UPDATE_METHOD) ||
overridesMethod(triggerClass, AFTER_TRY_UPDATE_METHOD) ||
overridesMethod(triggerClass, FAILED_UPDATE_METHOD))
diff --git a/src/main/java/com/amazon/carbonado/spi/WrappedStorage.java b/src/main/java/com/amazon/carbonado/spi/WrappedStorage.java index 1cefc73..ebe0c19 100644 --- a/src/main/java/com/amazon/carbonado/spi/WrappedStorage.java +++ b/src/main/java/com/amazon/carbonado/spi/WrappedStorage.java @@ -28,8 +28,6 @@ import com.amazon.carbonado.Trigger; import com.amazon.carbonado.TriggerFactory;
import com.amazon.carbonado.filter.Filter;
-import com.amazon.carbonado.filter.FilterValues;
-
import com.amazon.carbonado.util.QuickConstructorGenerator;
/**
|