Adding eclipse formattings

This commit is contained in:
sameira
2015-11-30 23:24:07 +05:30
parent 51649533ee
commit d76fb0f66d
4 changed files with 112 additions and 144 deletions
@@ -32,8 +32,7 @@ public class CassandraConfig extends AbstractCassandraConfiguration {
CassandraClusterFactoryBean cluster = new CassandraClusterFactoryBean();
cluster.setContactPoints(environment.getProperty("cassandra.contactpoints"));
cluster.setPort(Integer.parseInt(environment.getProperty("cassandra.port")));
LOGGER.info("Cluster created with contact points ["+ environment.getProperty("cassandra.contactpoints") +"] " +
"& port [" + Integer.parseInt(environment.getProperty("cassandra.port")) + "].");
LOGGER.info("Cluster created with contact points [" + environment.getProperty("cassandra.contactpoints") + "] " + "& port [" + Integer.parseInt(environment.getProperty("cassandra.port")) + "].");
return cluster;
}
@@ -1,6 +1,5 @@
package org.baeldung.spring.data.cassandra.repository;
import org.baeldung.spring.data.cassandra.model.Book;
import org.springframework.data.cassandra.repository.CassandraRepository;
import org.springframework.data.cassandra.repository.Query;
@@ -11,4 +10,3 @@ public interface BookRepository extends CassandraRepository<Book> {
@Query("select * from book where title = ?0 and publisher=?1")
Iterable<Book> findByTitleAndPublisher(String title, String publisher);
}
@@ -31,20 +31,20 @@ public class BookRepositoryIntegrationTest {
private static final Log LOGGER = LogFactory.getLog(BookRepositoryIntegrationTest.class);
public static final String KEYSPACE_CREATION_QUERY =
"CREATE KEYSPACE IF NOT EXISTS testKeySpace WITH replication = { 'class': 'SimpleStrategy', 'replication_factor': '3' };";
public static final String KEYSPACE_CREATION_QUERY = "CREATE KEYSPACE IF NOT EXISTS testKeySpace WITH replication = { 'class': 'SimpleStrategy', 'replication_factor': '3' };";
public static final String KEYSPACE_ACTIVATE_QUERY = "USE testKeySpace;";
public static final String DATA_TABLE_NAME = "book";
@Autowired private BookRepository bookRepository;
@Autowired
private BookRepository bookRepository;
@Autowired private CassandraAdminOperations adminTemplate;
@Autowired
private CassandraAdminOperations adminTemplate;
@BeforeClass
public static void startCassandraEmbedded()
throws InterruptedException, TTransportException, ConfigurationException, IOException {
public static void startCassandraEmbedded() throws InterruptedException, TTransportException, ConfigurationException, IOException {
EmbeddedCassandraServerHelper.startEmbeddedCassandra();
Cluster cluster = Cluster.builder().addContactPoints("127.0.0.1").withPort(9142).build();
LOGGER.info("Server Started at 127.0.0.1:9142... ");
@@ -55,8 +55,7 @@ public class BookRepositoryIntegrationTest {
}
@Before
public void resetKeySpace()
throws InterruptedException, TTransportException, ConfigurationException, IOException {
public void resetKeySpace() throws InterruptedException, TTransportException, ConfigurationException, IOException {
adminTemplate.createTable(true, CqlIdentifier.cqlId(DATA_TABLE_NAME), Book.class, new HashMap<String, Object>());
}