Formatting.

This commit is contained in:
Greg Burd 2017-10-13 10:41:21 -04:00
parent d369a5b862
commit 896748a2ec
9 changed files with 11 additions and 18 deletions

View file

@ -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(";");

View file

@ -1,6 +1,5 @@
package net.helenus.core;
@FunctionalInterface
public interface CommitThunk {
void apply();

View file

@ -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(

View file

@ -15,7 +15,6 @@
*/
package net.helenus.core;
import java.util.Map;
import java.util.Set;

View file

@ -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;

View file

@ -1,6 +1,5 @@
package net.helenus.core.reflect;
import java.util.Set;
public interface Drafted<T> extends MapExportable {

View file

@ -25,7 +25,6 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
public class EntityDraftBuilderTest extends AbstractEmbeddedCassandraTest {
static Supply supply;

View file

@ -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.*;

View file

@ -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();
}
}