diff --git a/src/main/java/com/datastax/driver/core/schemabuilder/CreateMaterializedView.java b/src/main/java/com/datastax/driver/core/schemabuilder/CreateMaterializedView.java index 919becc..d6ba093 100644 --- a/src/main/java/com/datastax/driver/core/schemabuilder/CreateMaterializedView.java +++ b/src/main/java/com/datastax/driver/core/schemabuilder/CreateMaterializedView.java @@ -11,7 +11,11 @@ public class CreateMaterializedView extends Create { private String clustering; public CreateMaterializedView( - String keyspaceName, String viewName, Select.Where selection, String primaryKey, String clustering) { + String keyspaceName, + String viewName, + Select.Where selection, + String primaryKey, + String clustering) { super(keyspaceName, viewName); this.viewName = viewName; this.selection = selection; @@ -40,7 +44,7 @@ public class CreateMaterializedView extends Create { createStatement.append(" "); createStatement.append(primaryKey); if (clustering != null) { - createStatement.append(" ").append(clustering); + createStatement.append(" ").append(clustering); } createStatement.append(";"); diff --git a/src/main/java/net/helenus/core/CommitThunk.java b/src/main/java/net/helenus/core/CommitThunk.java index ff50f4a..1ad9e05 100644 --- a/src/main/java/net/helenus/core/CommitThunk.java +++ b/src/main/java/net/helenus/core/CommitThunk.java @@ -1,6 +1,5 @@ package net.helenus.core; - @FunctionalInterface public interface CommitThunk { void apply(); diff --git a/src/main/java/net/helenus/core/SchemaUtil.java b/src/main/java/net/helenus/core/SchemaUtil.java index 5e33b3d..02fb929 100644 --- a/src/main/java/net/helenus/core/SchemaUtil.java +++ b/src/main/java/net/helenus/core/SchemaUtil.java @@ -32,7 +32,6 @@ import net.helenus.mapping.type.OptionalColumnMetadata; import net.helenus.support.CqlUtil; import net.helenus.support.HelenusMappingException; - public final class SchemaUtil { private SchemaUtil() {} @@ -191,7 +190,8 @@ public final class SchemaUtil { c.add(columnName); where = where.and(new IsNotNullClause(columnName)); - ClusteringColumn clusteringColumn = prop.getProperty().getGetterMethod().getAnnotation(ClusteringColumn.class); + ClusteringColumn clusteringColumn = + prop.getProperty().getGetterMethod().getAnnotation(ClusteringColumn.class); if (clusteringColumn != null && clusteringColumn.ordering() != null) { o.add(columnName + " " + clusteringColumn.ordering().cql()); } @@ -211,10 +211,10 @@ public final class SchemaUtil { String clustering = ""; if (o.size() > 0) { - clustering = "WITH CLUSTERING ORDER BY (" + String.join(", ", o) + ")"; + clustering = "WITH CLUSTERING ORDER BY (" + String.join(", ", o) + ")"; } return new CreateMaterializedView(keyspace, viewName, where, primaryKey, clustering) - .ifNotExists(); + .ifNotExists(); } public static SchemaStatement dropMaterializedView( diff --git a/src/main/java/net/helenus/core/UnitOfWork.java b/src/main/java/net/helenus/core/UnitOfWork.java index f27b76c..6bc630a 100644 --- a/src/main/java/net/helenus/core/UnitOfWork.java +++ b/src/main/java/net/helenus/core/UnitOfWork.java @@ -15,7 +15,6 @@ */ package net.helenus.core; - import java.util.Map; import java.util.Set; diff --git a/src/main/java/net/helenus/core/operation/SelectOperation.java b/src/main/java/net/helenus/core/operation/SelectOperation.java index cfc54f2..ea23ca5 100644 --- a/src/main/java/net/helenus/core/operation/SelectOperation.java +++ b/src/main/java/net/helenus/core/operation/SelectOperation.java @@ -22,8 +22,6 @@ import com.datastax.driver.core.querybuilder.QueryBuilder; import com.datastax.driver.core.querybuilder.Select; import com.datastax.driver.core.querybuilder.Select.Selection; import com.datastax.driver.core.querybuilder.Select.Where; -import com.google.common.base.Joiner; -import com.google.common.collect.Iterables; import java.util.*; import java.util.function.Function; import java.util.stream.Stream; diff --git a/src/main/java/net/helenus/core/reflect/Drafted.java b/src/main/java/net/helenus/core/reflect/Drafted.java index ac134d2..b0a187d 100644 --- a/src/main/java/net/helenus/core/reflect/Drafted.java +++ b/src/main/java/net/helenus/core/reflect/Drafted.java @@ -1,6 +1,5 @@ package net.helenus.core.reflect; - import java.util.Set; public interface Drafted extends MapExportable { diff --git a/src/test/java/net/helenus/test/integration/core/draft/EntityDraftBuilderTest.java b/src/test/java/net/helenus/test/integration/core/draft/EntityDraftBuilderTest.java index 3296488..64f9c7b 100644 --- a/src/test/java/net/helenus/test/integration/core/draft/EntityDraftBuilderTest.java +++ b/src/test/java/net/helenus/test/integration/core/draft/EntityDraftBuilderTest.java @@ -25,7 +25,6 @@ import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; - public class EntityDraftBuilderTest extends AbstractEmbeddedCassandraTest { static Supply supply; diff --git a/src/test/java/net/helenus/test/integration/core/views/CyclistsByAge.java b/src/test/java/net/helenus/test/integration/core/views/CyclistsByAge.java index 02b414c..555155f 100644 --- a/src/test/java/net/helenus/test/integration/core/views/CyclistsByAge.java +++ b/src/test/java/net/helenus/test/integration/core/views/CyclistsByAge.java @@ -2,7 +2,6 @@ package net.helenus.test.integration.core.views; import java.util.Date; import java.util.UUID; - import net.helenus.mapping.OrderingDirection; import net.helenus.mapping.annotation.*; diff --git a/src/test/java/net/helenus/test/integration/core/views/MaterializedViewTest.java b/src/test/java/net/helenus/test/integration/core/views/MaterializedViewTest.java index 41c8eff..a580062 100644 --- a/src/test/java/net/helenus/test/integration/core/views/MaterializedViewTest.java +++ b/src/test/java/net/helenus/test/integration/core/views/MaterializedViewTest.java @@ -68,10 +68,6 @@ public class MaterializedViewTest extends AbstractEmbeddedCassandraTest { @Test public void testMv() throws Exception { - session - .select(Cyclist.class) - .from(CyclistsByAge.class) - .where(cyclist::age, eq(18)) - .sync(); + session.select(Cyclist.class).from(CyclistsByAge.class).where(cyclist::age, eq(18)).sync(); } }