From 8696e1253e84dcc914d5ddbd32160c447a9701bf Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Wed, 11 Oct 2006 16:16:15 +0000 Subject: Resolved some warnings. --- src/main/java/com/amazon/carbonado/Trigger.java | 2 ++ src/main/java/com/amazon/carbonado/cursor/GroupedCursor.java | 2 -- src/main/java/com/amazon/carbonado/qe/AbstractQuery.java | 2 -- src/main/java/com/amazon/carbonado/qe/CompositeScore.java | 3 --- .../java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java | 4 ---- src/main/java/com/amazon/carbonado/qe/EmptyQuery.java | 3 --- .../java/com/amazon/carbonado/qe/FilteredQueryExecutor.java | 4 ---- src/main/java/com/amazon/carbonado/qe/FilteringScore.java | 1 - .../java/com/amazon/carbonado/qe/FullScanQueryExecutor.java | 5 ----- .../java/com/amazon/carbonado/qe/IndexedQueryExecutor.java | 3 --- .../java/com/amazon/carbonado/qe/JoinedQueryExecutor.java | 10 +--------- src/main/java/com/amazon/carbonado/qe/KeyQueryExecutor.java | 4 ---- src/main/java/com/amazon/carbonado/qe/OrderingScore.java | 3 +-- src/main/java/com/amazon/carbonado/qe/QueryExecutor.java | 4 ---- src/main/java/com/amazon/carbonado/qe/QueryExecutorCache.java | 2 -- src/main/java/com/amazon/carbonado/qe/QueryFactory.java | 2 -- .../java/com/amazon/carbonado/qe/SortedQueryExecutor.java | 2 -- src/main/java/com/amazon/carbonado/qe/StandardQuery.java | 5 ----- .../java/com/amazon/carbonado/qe/StandardQueryFactory.java | 3 --- src/main/java/com/amazon/carbonado/qe/StorageAccess.java | 4 ---- src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java | 1 - src/main/java/com/amazon/carbonado/qe/UnionQueryExecutor.java | 2 -- .../java/com/amazon/carbonado/raw/CustomStorableCodec.java | 1 - .../java/com/amazon/carbonado/raw/GenericInstanceFactory.java | 1 - .../java/com/amazon/carbonado/raw/GenericStorableCodec.java | 2 -- .../java/com/amazon/carbonado/raw/RawStorableGenerator.java | 2 -- src/main/java/com/amazon/carbonado/raw/StorableCodec.java | 2 -- .../java/com/amazon/carbonado/repo/indexed/IndexedCursor.java | 1 - .../com/amazon/carbonado/repo/indexed/IndexedStorage.java | 8 -------- .../com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java | 3 --- src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java | 1 - .../com/amazon/carbonado/repo/jdbc/MysqlSupportStrategy.java | 11 ----------- src/main/java/com/amazon/carbonado/repo/jdbc/OracleBlob.java | 2 -- src/main/java/com/amazon/carbonado/repo/jdbc/OracleClob.java | 2 -- .../java/com/amazon/carbonado/repo/logging/LoggingQuery.java | 2 -- .../carbonado/repo/replicated/ReplicatedRepository.java | 1 - .../amazon/carbonado/repo/replicated/ReplicatedStorage.java | 6 ------ .../amazon/carbonado/repo/replicated/ReplicationTrigger.java | 3 --- .../java/com/amazon/carbonado/repo/sleepycat/BDBCursor.java | 1 - .../com/amazon/carbonado/repo/sleepycat/BDBRepository.java | 1 - .../amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java | 2 -- .../java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java | 2 -- .../com/amazon/carbonado/spi/AbstractRepositoryBuilder.java | 3 --- .../java/com/amazon/carbonado/spi/BelatedStorageCreator.java | 2 -- .../com/amazon/carbonado/spi/MasterStorableGenerator.java | 2 -- src/main/java/com/amazon/carbonado/spi/StorableGenerator.java | 5 ++--- src/main/java/com/amazon/carbonado/spi/TriggerManager.java | 2 +- src/main/java/com/amazon/carbonado/spi/WrappedStorage.java | 2 -- 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 { } 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 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 { 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 query plan. 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 extends AbstractQuery return newInstance(values, mOrdering); } - private Query createQuery(FilterValues values) throws FetchException { - return queryFactory().query(values, mOrdering); - } - private Query createQuery(FilterValues values, OrderingList 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 implements StorableCodec { final Map, 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 { 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 { * 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 { } } } + */ /** * 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 { } 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; /** -- cgit v1.2.3