DATACASS-468 - Merge o.s.d.cql into o.s.d.cassandra.
Resolve o.s.d.cql package to expose only a single top-level package. Components of the dissolved org.springframework.data.cql package are located in other packages: * o.s.d.cql.config and subpackages -> o.s.d.cassandra.config * o.s.d.cql.core.session -> o.s.d.cassandra and o.s.d.cassandra.core.cql.session * o.s.d.cql.cql.support.exception -> o.s.d.cassandra and o.s.d.cassandra.cql * o.s.d.cql -> o.s.d.cassandra.core.cql * Move MapId from o.s.d.cassandra.repository.support to o.s.d.cassandra.mapping Merge test.integration package with repository test package.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import java.net.InetAddress;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Collections;
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import org.springframework.dao.TransientDataAccessException;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
/**
|
||||
* Spring data access exception for Cassandra when a keyspace being created already exists.
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import org.springframework.dao.QueryTimeoutException;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import org.springframework.dao.NonTransientDataAccessException;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
/**
|
||||
* Spring data access exception for when a Cassandra table being created already exists.
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import org.springframework.dao.TransientDataAccessException;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import org.springframework.dao.TransientDataAccessException;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import org.springframework.dao.TypeMismatchDataAccessException;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import org.springframework.dao.PermissionDeniedDataAccessException;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import org.springframework.dao.UncategorizedDataAccessException;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support.exception;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import org.springframework.dao.QueryTimeoutException;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core.session;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import reactor.core.publisher.Flux;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core.session;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core.session;
|
||||
|
||||
import org.springframework.data.cql.core.ReactiveCqlTemplate;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
/**
|
||||
* Strategy interface to produce {@link ReactiveSession} instances.
|
||||
@@ -27,8 +25,8 @@ import org.springframework.data.cql.core.ReactiveCqlTemplate;
|
||||
* @author Mark Paluch
|
||||
* @see 2.0
|
||||
* @see ReactiveSession
|
||||
* @see DefaultReactiveSessionFactory
|
||||
* @see ReactiveCqlTemplate
|
||||
* @see org.springframework.data.cassandra.core.cql.session.DefaultReactiveSessionFactory
|
||||
* @see org.springframework.data.cassandra.core.cql.ReactiveCqlTemplate
|
||||
*/
|
||||
public interface ReactiveSessionFactory {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core.session;
|
||||
package org.springframework.data.cassandra;
|
||||
|
||||
import com.datastax.driver.core.Session;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cassandra.config.java;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
@@ -22,21 +22,17 @@ import org.springframework.beans.factory.BeanClassLoaderAware;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.data.cassandra.config.CassandraEntityClassScanner;
|
||||
import org.springframework.data.cassandra.config.CassandraSessionFactoryBean;
|
||||
import org.springframework.data.cassandra.config.SchemaAction;
|
||||
import org.springframework.data.cassandra.SessionFactory;
|
||||
import org.springframework.data.cassandra.core.CassandraAdminOperations;
|
||||
import org.springframework.data.cassandra.core.CassandraAdminTemplate;
|
||||
import org.springframework.data.cassandra.core.convert.CassandraConverter;
|
||||
import org.springframework.data.cassandra.core.convert.CassandraCustomConversions;
|
||||
import org.springframework.data.cassandra.core.convert.MappingCassandraConverter;
|
||||
import org.springframework.data.cassandra.core.cql.session.DefaultSessionFactory;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraMappingContext;
|
||||
import org.springframework.data.cassandra.core.mapping.SimpleUserTypeResolver;
|
||||
import org.springframework.data.cassandra.core.mapping.Table;
|
||||
import org.springframework.data.convert.CustomConversions;
|
||||
import org.springframework.data.cql.config.java.AbstractClusterConfiguration;
|
||||
import org.springframework.data.cql.core.session.DefaultSessionFactory;
|
||||
import org.springframework.data.cql.core.session.SessionFactory;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
|
||||
/**
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,18 +13,15 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config.java;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.cql.config.CassandraCqlClusterFactoryBean;
|
||||
import org.springframework.data.cql.config.ClusterBuilderConfigurer;
|
||||
import org.springframework.data.cql.config.CompressionType;
|
||||
import org.springframework.data.cql.core.keyspace.CreateKeyspaceSpecification;
|
||||
import org.springframework.data.cql.core.keyspace.DropKeyspaceSpecification;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.CreateKeyspaceSpecification;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.DropKeyspaceSpecification;
|
||||
|
||||
import com.datastax.driver.core.AuthProvider;
|
||||
import com.datastax.driver.core.NettyOptions;
|
||||
@@ -52,19 +49,19 @@ import com.datastax.driver.core.policies.SpeculativeExecutionPolicy;
|
||||
public abstract class AbstractClusterConfiguration {
|
||||
|
||||
/**
|
||||
* Creates a {@link CassandraCqlClusterFactoryBean} that provides a Cassandra
|
||||
* {@link com.datastax.driver.core.Cluster}. The lifecycle of {@link CassandraCqlClusterFactoryBean} executes
|
||||
* {@link #getStartupScripts() startup} and {@link #getShutdownScripts() shutdown} scripts.
|
||||
* Creates a {@link CassandraClusterFactoryBean} that provides a Cassandra {@link com.datastax.driver.core.Cluster}.
|
||||
* The lifecycle of {@link CassandraClusterFactoryBean} executes {@link #getStartupScripts() startup} and
|
||||
* {@link #getShutdownScripts() shutdown} scripts.
|
||||
*
|
||||
* @return the {@link CassandraCqlClusterFactoryBean}.
|
||||
* @return the {@link CassandraClusterFactoryBean}.
|
||||
* @see #cluster()
|
||||
* @see #getStartupScripts()
|
||||
* @see #getShutdownScripts()
|
||||
*/
|
||||
@Bean
|
||||
public CassandraCqlClusterFactoryBean cluster() {
|
||||
public CassandraClusterFactoryBean cluster() {
|
||||
|
||||
CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean();
|
||||
CassandraClusterFactoryBean bean = new CassandraClusterFactoryBean();
|
||||
|
||||
bean.setAddressTranslator(getAddressTranslator());
|
||||
bean.setAuthProvider(getAuthProvider());
|
||||
@@ -146,10 +143,10 @@ public abstract class AbstractClusterConfiguration {
|
||||
* Returns the Cassandra contact points. Defaults to {@code localhost}
|
||||
*
|
||||
* @return the Cassandra contact points
|
||||
* @see CassandraCqlClusterFactoryBean#DEFAULT_CONTACT_POINTS
|
||||
* @see CassandraClusterFactoryBean#DEFAULT_CONTACT_POINTS
|
||||
*/
|
||||
protected String getContactPoints() {
|
||||
return CassandraCqlClusterFactoryBean.DEFAULT_CONTACT_POINTS;
|
||||
return CassandraClusterFactoryBean.DEFAULT_CONTACT_POINTS;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -167,17 +164,17 @@ public abstract class AbstractClusterConfiguration {
|
||||
* @return the maximum schema agreement wait in seconds; default to {@literal 10} seconds.
|
||||
*/
|
||||
protected int getMaxSchemaAgreementWaitSeconds() {
|
||||
return CassandraCqlClusterFactoryBean.DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS;
|
||||
return CassandraClusterFactoryBean.DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the whether to enable metrics. Defaults to {@literal true}
|
||||
*
|
||||
* @return {@literal true} to enable metrics.
|
||||
* @see CassandraCqlClusterFactoryBean#DEFAULT_METRICS_ENABLED
|
||||
* @see CassandraClusterFactoryBean#DEFAULT_METRICS_ENABLED
|
||||
*/
|
||||
protected boolean getMetricsEnabled() {
|
||||
return CassandraCqlClusterFactoryBean.DEFAULT_METRICS_ENABLED;
|
||||
return CassandraClusterFactoryBean.DEFAULT_METRICS_ENABLED;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -203,10 +200,10 @@ public abstract class AbstractClusterConfiguration {
|
||||
* Returns the Cassandra port. Defaults to {@code 9042}
|
||||
*
|
||||
* @return the Cassandra port
|
||||
* @see CassandraCqlClusterFactoryBean#DEFAULT_PORT
|
||||
* @see CassandraClusterFactoryBean#DEFAULT_PORT
|
||||
*/
|
||||
protected int getPort() {
|
||||
return CassandraCqlClusterFactoryBean.DEFAULT_PORT;
|
||||
return CassandraClusterFactoryBean.DEFAULT_PORT;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -13,10 +13,10 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config.java;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.data.cql.core.CqlTemplate;
|
||||
import org.springframework.data.cassandra.core.cql.CqlTemplate;
|
||||
|
||||
/**
|
||||
* Abstract configuration class to create a {@link CqlTemplate} and inheriting {@link com.datastax.driver.core.Session}
|
||||
@@ -24,8 +24,8 @@ import org.springframework.data.cql.core.CqlTemplate;
|
||||
*
|
||||
* @author Matthew T. Adams
|
||||
* @author Mark Paluch
|
||||
* @see org.springframework.data.cql.config.java.AbstractClusterConfiguration
|
||||
* @see org.springframework.data.cql.config.java.AbstractSessionConfiguration
|
||||
* @see AbstractClusterConfiguration
|
||||
* @see AbstractSessionConfiguration
|
||||
* @see com.datastax.driver.core.Session
|
||||
* @see com.datastax.driver.core.Cluster
|
||||
* @see CqlTemplate
|
||||
@@ -13,20 +13,20 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cassandra.config.java;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import reactor.core.scheduler.Schedulers;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.data.cassandra.ReactiveSession;
|
||||
import org.springframework.data.cassandra.ReactiveSessionFactory;
|
||||
import org.springframework.data.cassandra.core.CassandraAdminTemplate;
|
||||
import org.springframework.data.cassandra.core.ReactiveCassandraOperations;
|
||||
import org.springframework.data.cassandra.core.ReactiveCassandraTemplate;
|
||||
import org.springframework.data.cql.core.ReactiveCqlOperations;
|
||||
import org.springframework.data.cql.core.ReactiveCqlTemplate;
|
||||
import org.springframework.data.cql.core.session.DefaultBridgedReactiveSession;
|
||||
import org.springframework.data.cql.core.session.DefaultReactiveSessionFactory;
|
||||
import org.springframework.data.cql.core.session.ReactiveSession;
|
||||
import org.springframework.data.cql.core.session.ReactiveSessionFactory;
|
||||
import org.springframework.data.cassandra.core.cql.ReactiveCqlOperations;
|
||||
import org.springframework.data.cassandra.core.cql.ReactiveCqlTemplate;
|
||||
import org.springframework.data.cassandra.core.cql.session.DefaultBridgedReactiveSession;
|
||||
import org.springframework.data.cassandra.core.cql.session.DefaultReactiveSessionFactory;
|
||||
|
||||
/**
|
||||
* Extension to {@link AbstractCassandraConfiguration} providing Spring Data Cassandra configuration for Spring Data's
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,13 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config.java;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.cql.config.CassandraCqlSessionFactoryBean;
|
||||
import org.springframework.data.cql.core.session.DefaultSessionFactory;
|
||||
import org.springframework.data.cql.core.session.SessionFactory;
|
||||
import org.springframework.data.cassandra.SessionFactory;
|
||||
import org.springframework.data.cassandra.core.cql.CqlTemplate;
|
||||
import org.springframework.data.cassandra.core.cql.session.DefaultSessionFactory;
|
||||
|
||||
/**
|
||||
* Spring {@link @Configuration} class used to configure a Cassandra client application
|
||||
@@ -29,7 +29,7 @@ import org.springframework.data.cql.core.session.SessionFactory;
|
||||
* @author Matthew T. Adams
|
||||
* @author John Blum
|
||||
* @author Mark Paluch
|
||||
* @see org.springframework.data.cql.config.java.AbstractClusterConfiguration
|
||||
* @see AbstractClusterConfiguration
|
||||
* @see org.springframework.context.annotation.Configuration
|
||||
*/
|
||||
@Configuration
|
||||
@@ -56,7 +56,7 @@ public abstract class AbstractSessionConfiguration extends AbstractClusterConfig
|
||||
|
||||
/**
|
||||
* Creates a {@link DefaultSessionFactory} using the configured {@link #session()} to be used with
|
||||
* {@link org.springframework.data.cql.core.CqlTemplate}.
|
||||
* {@link CqlTemplate}.
|
||||
*
|
||||
* @return {@link SessionFactory} used to initialize the Template API.
|
||||
* @since 2.0
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright 2013-2017 the original author or authors
|
||||
* Copyright 2013-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,17 +13,645 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import org.springframework.data.cql.config.CassandraCqlClusterFactoryBean;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.dao.support.PersistenceExceptionTranslator;
|
||||
import org.springframework.data.cassandra.core.cql.CassandraExceptionTranslator;
|
||||
import org.springframework.data.cassandra.core.cql.CqlTemplate;
|
||||
import org.springframework.data.cassandra.core.cql.generator.CreateKeyspaceCqlGenerator;
|
||||
import org.springframework.data.cassandra.core.cql.generator.DropKeyspaceCqlGenerator;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.CreateKeyspaceSpecification;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.DropKeyspaceSpecification;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.KeyspaceActionSpecification;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.datastax.driver.core.*;
|
||||
import com.datastax.driver.core.Cluster.Builder;
|
||||
import com.datastax.driver.core.ProtocolOptions.Compression;
|
||||
import com.datastax.driver.core.policies.AddressTranslator;
|
||||
import com.datastax.driver.core.policies.LoadBalancingPolicy;
|
||||
import com.datastax.driver.core.policies.ReconnectionPolicy;
|
||||
import com.datastax.driver.core.policies.RetryPolicy;
|
||||
import com.datastax.driver.core.policies.SpeculativeExecutionPolicy;
|
||||
|
||||
/**
|
||||
* Spring Data Cassandra extension of CassandraCqlClusterFactoryBean. This class exists only in the name of symmetry,
|
||||
* based on the other CassandraData*FactoryBean classes.
|
||||
* {@link org.springframework.beans.factory.FactoryBean} for configuring a Cassandra {@link Cluster}.
|
||||
*
|
||||
* @author Alex Shvid
|
||||
* @author Matthew T. Adams
|
||||
* @author David Webb
|
||||
* @author Kirk Clemens
|
||||
* @author Jorge Davison
|
||||
* @author John Blum
|
||||
* @author Mark Paluch
|
||||
* @author Stefan Birkner
|
||||
* @see org.springframework.beans.factory.InitializingBean
|
||||
* @see org.springframework.beans.factory.DisposableBean
|
||||
* @see org.springframework.beans.factory.FactoryBean
|
||||
* @see com.datastax.driver.core.Cluster
|
||||
*/
|
||||
public class CassandraClusterFactoryBean extends CassandraCqlClusterFactoryBean {
|
||||
@SuppressWarnings("unused")
|
||||
public class CassandraClusterFactoryBean
|
||||
implements FactoryBean<Cluster>, InitializingBean, DisposableBean, BeanNameAware, PersistenceExceptionTranslator {
|
||||
|
||||
public static final boolean DEFAULT_JMX_REPORTING_ENABLED = true;
|
||||
public static final boolean DEFAULT_METRICS_ENABLED = true;
|
||||
public static final boolean DEFAULT_SSL_ENABLED = false;
|
||||
|
||||
public static final int DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS = 10;
|
||||
public static final int DEFAULT_PORT = 9042;
|
||||
|
||||
public static final String DEFAULT_CONTACT_POINTS = "localhost";
|
||||
|
||||
protected static final Logger log = LoggerFactory.getLogger(CassandraCqlClusterFactoryBean.class);
|
||||
|
||||
private boolean jmxReportingEnabled = DEFAULT_JMX_REPORTING_ENABLED;
|
||||
private boolean metricsEnabled = DEFAULT_METRICS_ENABLED;
|
||||
private boolean sslEnabled = DEFAULT_SSL_ENABLED;
|
||||
|
||||
private int maxSchemaAgreementWaitSeconds = DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS;
|
||||
private int port = DEFAULT_PORT;
|
||||
|
||||
private final PersistenceExceptionTranslator exceptionTranslator = new CassandraExceptionTranslator();
|
||||
|
||||
private Cluster cluster;
|
||||
private ClusterBuilderConfigurer clusterBuilderConfigurer;
|
||||
|
||||
private AddressTranslator addressTranslator;
|
||||
private AuthProvider authProvider;
|
||||
private CompressionType compressionType;
|
||||
private Host.StateListener hostStateListener;
|
||||
private LatencyTracker latencyTracker;
|
||||
|
||||
private List<CreateKeyspaceSpecification> keyspaceCreations = new ArrayList<>();
|
||||
private List<DropKeyspaceSpecification> keyspaceDrops = new ArrayList<>();
|
||||
private Set<KeyspaceActionSpecification<?>> keyspaceSpecifications = new HashSet<>();
|
||||
|
||||
private List<String> startupScripts = new ArrayList<>();
|
||||
private List<String> shutdownScripts = new ArrayList<>();
|
||||
|
||||
private LoadBalancingPolicy loadBalancingPolicy;
|
||||
private NettyOptions nettyOptions;
|
||||
private PoolingOptions poolingOptions;
|
||||
private ProtocolVersion protocolVersion;
|
||||
private QueryOptions queryOptions;
|
||||
private ReconnectionPolicy reconnectionPolicy;
|
||||
private RetryPolicy retryPolicy;
|
||||
private SpeculativeExecutionPolicy speculativeExecutionPolicy;
|
||||
private SocketOptions socketOptions;
|
||||
private SSLOptions sslOptions;
|
||||
private TimestampGenerator timestampGenerator;
|
||||
|
||||
private String beanName;
|
||||
private String clusterName;
|
||||
private String contactPoints = DEFAULT_CONTACT_POINTS;
|
||||
private String password;
|
||||
private String username;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
|
||||
Assert.hasText(contactPoints, "At least one server is required");
|
||||
|
||||
Cluster.Builder clusterBuilder = newClusterBuilder();
|
||||
|
||||
clusterBuilder.addContactPoints(StringUtils.commaDelimitedListToStringArray(contactPoints)).withPort(port);
|
||||
clusterBuilder.withMaxSchemaAgreementWaitSeconds(maxSchemaAgreementWaitSeconds);
|
||||
|
||||
Optional.ofNullable(compressionType).map(CassandraClusterFactoryBean::convertCompressionType)
|
||||
.ifPresent(clusterBuilder::withCompression);
|
||||
|
||||
Optional.ofNullable(addressTranslator).ifPresent(clusterBuilder::withAddressTranslator);
|
||||
Optional.ofNullable(loadBalancingPolicy).ifPresent(clusterBuilder::withLoadBalancingPolicy);
|
||||
Optional.ofNullable(nettyOptions).ifPresent(clusterBuilder::withNettyOptions);
|
||||
Optional.ofNullable(poolingOptions).ifPresent(clusterBuilder::withPoolingOptions);
|
||||
Optional.ofNullable(protocolVersion).ifPresent(clusterBuilder::withProtocolVersion);
|
||||
Optional.ofNullable(queryOptions).ifPresent(clusterBuilder::withQueryOptions);
|
||||
Optional.ofNullable(reconnectionPolicy).ifPresent(clusterBuilder::withReconnectionPolicy);
|
||||
Optional.ofNullable(retryPolicy).ifPresent(clusterBuilder::withRetryPolicy);
|
||||
Optional.ofNullable(socketOptions).ifPresent(clusterBuilder::withSocketOptions);
|
||||
Optional.ofNullable(speculativeExecutionPolicy).ifPresent(clusterBuilder::withSpeculativeExecutionPolicy);
|
||||
Optional.ofNullable(timestampGenerator).ifPresent(clusterBuilder::withTimestampGenerator);
|
||||
|
||||
if (authProvider != null) {
|
||||
clusterBuilder.withAuthProvider(authProvider);
|
||||
} else if (username != null) {
|
||||
clusterBuilder.withCredentials(username, password);
|
||||
}
|
||||
|
||||
if (!jmxReportingEnabled) {
|
||||
clusterBuilder.withoutJMXReporting();
|
||||
}
|
||||
|
||||
if (!metricsEnabled) {
|
||||
clusterBuilder.withoutMetrics();
|
||||
}
|
||||
|
||||
if (sslEnabled) {
|
||||
if (sslOptions != null) {
|
||||
clusterBuilder.withSSL(sslOptions);
|
||||
} else {
|
||||
clusterBuilder.withSSL();
|
||||
}
|
||||
}
|
||||
|
||||
Optional.ofNullable(resolveClusterName()).filter(StringUtils::hasText).ifPresent(clusterBuilder::withClusterName);
|
||||
|
||||
if (clusterBuilderConfigurer != null) {
|
||||
clusterBuilderConfigurer.configure(clusterBuilder);
|
||||
}
|
||||
|
||||
cluster = clusterBuilder.build();
|
||||
|
||||
Optional.ofNullable(hostStateListener).ifPresent(cluster::register);
|
||||
Optional.ofNullable(latencyTracker).ifPresent(cluster::register);
|
||||
|
||||
generateSpecificationsFromFactoryBeans();
|
||||
executeSpecsAndScripts(keyspaceCreations, startupScripts);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see com.datastax.driver.core.Cluster#builder()
|
||||
*/
|
||||
Cluster.Builder newClusterBuilder() {
|
||||
return Cluster.builder();
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
private String resolveClusterName() {
|
||||
return (StringUtils.hasText(clusterName) ? clusterName : beanName);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.DisposableBean#destroy()
|
||||
*/
|
||||
@Override
|
||||
public void destroy() throws Exception {
|
||||
executeSpecsAndScripts(keyspaceDrops, shutdownScripts);
|
||||
cluster.close();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.FactoryBean#getObject()
|
||||
*/
|
||||
@Override
|
||||
public Cluster getObject() {
|
||||
return cluster;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.FactoryBean#getObjectType()
|
||||
*/
|
||||
@Override
|
||||
public Class<? extends Cluster> getObjectType() {
|
||||
return (cluster != null ? cluster.getClass() : Cluster.class);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.FactoryBean#isSingleton()
|
||||
*/
|
||||
@Override
|
||||
public boolean isSingleton() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.dao.support.PersistenceExceptionTranslator#translateExceptionIfPossible(java.lang.RuntimeException)
|
||||
*/
|
||||
@Override
|
||||
public DataAccessException translateExceptionIfPossible(RuntimeException ex) {
|
||||
return exceptionTranslator.translateExceptionIfPossible(ex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Examines the contents of all the KeyspaceSpecificationFactoryBeans and generates the proper KeyspaceSpecification
|
||||
* from them.
|
||||
*/
|
||||
private void generateSpecificationsFromFactoryBeans() {
|
||||
|
||||
keyspaceSpecifications.forEach(keyspaceActionSpecification -> {
|
||||
|
||||
if (keyspaceActionSpecification instanceof CreateKeyspaceSpecification) {
|
||||
keyspaceCreations.add((CreateKeyspaceSpecification) keyspaceActionSpecification);
|
||||
}
|
||||
|
||||
if (keyspaceActionSpecification instanceof DropKeyspaceSpecification) {
|
||||
keyspaceDrops.add((DropKeyspaceSpecification) keyspaceActionSpecification);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void executeSpecsAndScripts(List<? extends KeyspaceActionSpecification<?>> kepspaceActionSpecifications,
|
||||
List<String> scripts) {
|
||||
|
||||
if (!CollectionUtils.isEmpty(kepspaceActionSpecifications) || !CollectionUtils.isEmpty(scripts)) {
|
||||
|
||||
Session session = cluster.connect();
|
||||
|
||||
try {
|
||||
CqlTemplate template = new CqlTemplate(session);
|
||||
|
||||
kepspaceActionSpecifications
|
||||
.forEach(keyspaceActionSpecification -> template.execute(toCql(keyspaceActionSpecification)));
|
||||
|
||||
scripts.forEach(template::execute);
|
||||
} finally {
|
||||
if (session != null) {
|
||||
session.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String toCql(KeyspaceActionSpecification<?> keyspaceActionSpecification) {
|
||||
|
||||
return (keyspaceActionSpecification instanceof CreateKeyspaceSpecification
|
||||
? new CreateKeyspaceCqlGenerator((CreateKeyspaceSpecification) keyspaceActionSpecification).toCql()
|
||||
: new DropKeyspaceCqlGenerator((DropKeyspaceSpecification) keyspaceActionSpecification).toCql());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.BeanNameAware#setBeanName(String)
|
||||
* @since 1.5
|
||||
*/
|
||||
@Override
|
||||
public void setBeanName(String beanName) {
|
||||
this.beanName = beanName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a comma-delimited string of the contact points (hosts) to connect to. Default is {@code localhost}; see
|
||||
* {@link #DEFAULT_CONTACT_POINTS}.
|
||||
*
|
||||
* @param contactPoints the contact points used by the new cluster.
|
||||
*/
|
||||
public void setContactPoints(String contactPoints) {
|
||||
this.contactPoints = contactPoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the port for the contact points. Default is {@code 9042}, see {@link #DEFAULT_PORT}.
|
||||
*
|
||||
* @param port the port used by the new cluster.
|
||||
*/
|
||||
public void setPort(int port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the {@link CompressionType}. Default is uncompressed.
|
||||
*
|
||||
* @param compressionType the {@link CompressionType} used by the new cluster.
|
||||
*/
|
||||
public void setCompressionType(CompressionType compressionType) {
|
||||
this.compressionType = compressionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the {@link PoolingOptions} to configure the connection pooling behavior.
|
||||
*
|
||||
* @param poolingOptions the {@link PoolingOptions} used by the new cluster.
|
||||
*/
|
||||
public void setPoolingOptions(PoolingOptions poolingOptions) {
|
||||
this.poolingOptions = poolingOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the {@link ProtocolVersion}.
|
||||
*
|
||||
* @param protocolVersion the {@link ProtocolVersion} used by the new cluster.
|
||||
* @since 1.4
|
||||
*/
|
||||
public void setProtocolVersion(ProtocolVersion protocolVersion) {
|
||||
this.protocolVersion = protocolVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the {@link SocketOptions} containing low-level socket options.
|
||||
*
|
||||
* @param socketOptions the {@link SocketOptions} used by the new cluster.
|
||||
*/
|
||||
public void setSocketOptions(SocketOptions socketOptions) {
|
||||
this.socketOptions = socketOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the {@link QueryOptions} to tune to defaults for individual queries.
|
||||
*
|
||||
* @param queryOptions the {@link QueryOptions} used by the new cluster.
|
||||
*/
|
||||
public void setQueryOptions(QueryOptions queryOptions) {
|
||||
this.queryOptions = queryOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the {@link AuthProvider}. Default is unauthenticated.
|
||||
*
|
||||
* @param authProvider the {@link AuthProvider} used by the new cluster.
|
||||
*/
|
||||
public void setAuthProvider(AuthProvider authProvider) {
|
||||
this.authProvider = authProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the {@link NettyOptions} used by a client to customize the driver's underlying Netty layer.
|
||||
*
|
||||
* @param nettyOptions the {@link NettyOptions} used by the new cluster.
|
||||
* @since 1.5
|
||||
*/
|
||||
public void setNettyOptions(NettyOptions nettyOptions) {
|
||||
this.nettyOptions = nettyOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the {@link LoadBalancingPolicy} that decides which Cassandra hosts to contact for each new query.
|
||||
*
|
||||
* @param loadBalancingPolicy the {@link LoadBalancingPolicy} used by the new cluster.
|
||||
*/
|
||||
public void setLoadBalancingPolicy(LoadBalancingPolicy loadBalancingPolicy) {
|
||||
this.loadBalancingPolicy = loadBalancingPolicy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the {@link ReconnectionPolicy} that decides how often the reconnection to a dead node is attempted.
|
||||
*
|
||||
* @param reconnectionPolicy the {@link ReconnectionPolicy} used by the new cluster.
|
||||
*/
|
||||
public void setReconnectionPolicy(ReconnectionPolicy reconnectionPolicy) {
|
||||
this.reconnectionPolicy = reconnectionPolicy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the {@link RetryPolicy} that defines a default behavior to adopt when a request fails.
|
||||
*
|
||||
* @param retryPolicy the {@link RetryPolicy} used by the new cluster.
|
||||
*/
|
||||
public void setRetryPolicy(RetryPolicy retryPolicy) {
|
||||
this.retryPolicy = retryPolicy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether metrics are enabled. Default is {@literal true}, see {@link #DEFAULT_METRICS_ENABLED}.
|
||||
*/
|
||||
public void setMetricsEnabled(boolean metricsEnabled) {
|
||||
this.metricsEnabled = metricsEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a {@link List} of {@link CreateKeyspaceSpecification create keyspace specifications} that are executed when
|
||||
* this factory is {@link #afterPropertiesSet() initialized}. {@link CreateKeyspaceSpecification Create keyspace
|
||||
* specifications} are executed on a system session with no keyspace set, before executing
|
||||
* {@link #setStartupScripts(List)}.
|
||||
*
|
||||
* @param specifications the {@link List} of {@link CreateKeyspaceSpecification create keyspace specifications}.
|
||||
*/
|
||||
public void setKeyspaceCreations(List<CreateKeyspaceSpecification> specifications) {
|
||||
this.keyspaceCreations = specifications;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@link List} of {@link CreateKeyspaceSpecification create keyspace specifications}.
|
||||
*/
|
||||
public List<CreateKeyspaceSpecification> getKeyspaceCreations() {
|
||||
return keyspaceCreations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a {@link List} of {@link DropKeyspaceSpecification drop keyspace specifications} that are executed when this
|
||||
* factory is {@link #destroy() destroyed}. {@link DropKeyspaceSpecification Drop keyspace specifications} are
|
||||
* executed on a system session with no keyspace set, before executing {@link #setShutdownScripts(List)}.
|
||||
*
|
||||
* @param specifications the {@link List} of {@link DropKeyspaceSpecification drop keyspace specifications}.
|
||||
*/
|
||||
public void setKeyspaceDrops(List<DropKeyspaceSpecification> specifications) {
|
||||
this.keyspaceDrops = specifications;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the {@link List} of {@link DropKeyspaceSpecification drop keyspace specifications}.
|
||||
*/
|
||||
public List<DropKeyspaceSpecification> getKeyspaceDrops() {
|
||||
return keyspaceDrops;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a {@link List} of raw {@link String CQL statements} that are executed when this factory is
|
||||
* {@link #afterPropertiesSet() initialized}. Scripts are executed on a system session with no keyspace set, after
|
||||
* executing {@link #setKeyspaceCreations(List)}.
|
||||
*
|
||||
* @param scripts the scripts to execute on startup
|
||||
*/
|
||||
public void setStartupScripts(List<String> scripts) {
|
||||
this.startupScripts = scripts;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the startup scripts
|
||||
*/
|
||||
public List<String> getStartupScripts() {
|
||||
return startupScripts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a {@link List} of raw {@link String CQL statements} that are executed when this factory is {@link #destroy()
|
||||
* destroyed}. {@link DropKeyspaceSpecification Drop keyspace specifications} are executed on a system session with no
|
||||
* keyspace set, after executing {@link #setKeyspaceDrops(List)}.
|
||||
*
|
||||
* @param scripts the scripts to execute on shutdown
|
||||
*/
|
||||
public void setShutdownScripts(List<String> scripts) {
|
||||
this.shutdownScripts = scripts;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the shutdown scripts
|
||||
*/
|
||||
public List<String> getShutdownScripts() {
|
||||
return shutdownScripts;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param keyspaceSpecifications The {@link KeyspaceActionSpecification} to set.
|
||||
*/
|
||||
public void setKeyspaceSpecifications(Set<KeyspaceActionSpecification<?>> keyspaceSpecifications) {
|
||||
this.keyspaceSpecifications = keyspaceSpecifications;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the {@link KeyspaceActionSpecification} associated with this factory.
|
||||
*/
|
||||
public Set<KeyspaceActionSpecification<?>> getKeyspaceSpecifications() {
|
||||
return keyspaceSpecifications;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the username to use with {@link com.datastax.driver.core.PlainTextAuthProvider}.
|
||||
*
|
||||
* @param username The username to set.
|
||||
*/
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the username to use with {@link com.datastax.driver.core.PlainTextAuthProvider}.
|
||||
*
|
||||
* @param password The password to set.
|
||||
*/
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether to use JMX reporting. Default is {@literal false}, see {@link #DEFAULT_JMX_REPORTING_ENABLED}.
|
||||
*
|
||||
* @param jmxReportingEnabled The jmxReportingEnabled to set.
|
||||
*/
|
||||
public void setJmxReportingEnabled(boolean jmxReportingEnabled) {
|
||||
this.jmxReportingEnabled = jmxReportingEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether to use SSL. Default is plain, see {@link #DEFAULT_SSL_ENABLED}.
|
||||
*
|
||||
* @param sslEnabled The sslEnabled to set.
|
||||
*/
|
||||
public void setSslEnabled(boolean sslEnabled) {
|
||||
this.sslEnabled = sslEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sslOptions The sslOptions to set.
|
||||
*/
|
||||
public void setSslOptions(SSLOptions sslOptions) {
|
||||
this.sslOptions = sslOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param hostStateListener The hostStateListener to set.
|
||||
*/
|
||||
public void setHostStateListener(Host.StateListener hostStateListener) {
|
||||
this.hostStateListener = hostStateListener;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param latencyTracker The latencyTracker to set.
|
||||
*/
|
||||
public void setLatencyTracker(LatencyTracker latencyTracker) {
|
||||
this.latencyTracker = latencyTracker;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures the address translator used by the new cluster to translate IP addresses received from Cassandra nodes
|
||||
* into locally query-able addresses.
|
||||
*
|
||||
* @param addressTranslator {@link AddressTranslator} used by the new cluster.
|
||||
* @see com.datastax.driver.core.Cluster.Builder#withAddressTranslator(AddressTranslator)
|
||||
* @see com.datastax.driver.core.policies.AddressTranslator
|
||||
* @since 1.5
|
||||
*/
|
||||
public void setAddressTranslator(AddressTranslator addressTranslator) {
|
||||
this.addressTranslator = addressTranslator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@link ClusterBuilderConfigurer} used to apply additional configuration logic to the
|
||||
* {@link com.datastax.driver.core.Cluster.Builder}. {@link ClusterBuilderConfigurer} is invoked after all provided
|
||||
* options are configured. The factory will {@link Builder#build()} the {@link Cluster} after applying
|
||||
* {@link ClusterBuilderConfigurer}.
|
||||
*
|
||||
* @param clusterBuilderConfigurer {@link ClusterBuilderConfigurer} used to configure the
|
||||
* {@link com.datastax.driver.core.Cluster.Builder}.
|
||||
* @see org.springframework.data.cql.config.ClusterBuilderConfigurer
|
||||
*/
|
||||
public void setClusterBuilderConfigurer(ClusterBuilderConfigurer clusterBuilderConfigurer) {
|
||||
this.clusterBuilderConfigurer = clusterBuilderConfigurer;
|
||||
}
|
||||
|
||||
/**
|
||||
* An optional name for the cluster instance. This name appears in JMX metrics. Defaults to the bean name.
|
||||
*
|
||||
* @param clusterName optional name for the cluster.
|
||||
* @see com.datastax.driver.core.Cluster.Builder#withClusterName(String)
|
||||
* @since 1.5
|
||||
*/
|
||||
public void setClusterName(String clusterName) {
|
||||
this.clusterName = clusterName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the maximum time to wait for schema agreement before returning from a DDL query. The timeout is used to wait
|
||||
* for all currently up hosts in the cluster to agree on the schema.
|
||||
*
|
||||
* @param seconds max schema agreement wait in seconds.
|
||||
* @see com.datastax.driver.core.Cluster.Builder#withMaxSchemaAgreementWaitSeconds(int)
|
||||
* @since 1.5
|
||||
*/
|
||||
public void setMaxSchemaAgreementWaitSeconds(int seconds) {
|
||||
this.maxSchemaAgreementWaitSeconds = seconds;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures the speculative execution policy to use for the new cluster.
|
||||
*
|
||||
* @param speculativeExecutionPolicy {@link SpeculativeExecutionPolicy} to use with the new cluster.
|
||||
* @see com.datastax.driver.core.Cluster.Builder#withSpeculativeExecutionPolicy(SpeculativeExecutionPolicy)
|
||||
* @see com.datastax.driver.core.policies.SpeculativeExecutionPolicy
|
||||
* @since 1.5
|
||||
*/
|
||||
public void setSpeculativeExecutionPolicy(SpeculativeExecutionPolicy speculativeExecutionPolicy) {
|
||||
this.speculativeExecutionPolicy = speculativeExecutionPolicy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures the generator that will produce the client-side timestamp sent with each query.
|
||||
*
|
||||
* @param timestampGenerator {@link TimestampGenerator} used to produce a client-side timestamp sent with each query.
|
||||
* @see com.datastax.driver.core.Cluster.Builder#withTimestampGenerator(TimestampGenerator)
|
||||
* @see com.datastax.driver.core.TimestampGenerator
|
||||
* @since 1.5
|
||||
*/
|
||||
public void setTimestampGenerator(TimestampGenerator timestampGenerator) {
|
||||
this.timestampGenerator = timestampGenerator;
|
||||
}
|
||||
|
||||
private static Compression convertCompressionType(CompressionType type) {
|
||||
|
||||
switch (type) {
|
||||
case NONE:
|
||||
return Compression.NONE;
|
||||
case SNAPPY:
|
||||
return Compression.SNAPPY;
|
||||
case LZ4:
|
||||
return Compression.LZ4;
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException(String.format("Unknown compression type [%s]", type));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,11 +13,10 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cassandra.config.xml;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.cql.config.xml.CassandraCqlClusterParser;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright 2013-2017 the original author or authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
/**
|
||||
* Spring CQL extension of CassandraCqlClusterFactoryBean. This class exists only in the name of symmetry, based on the
|
||||
* other CassandraData*FactoryBean classes.
|
||||
*
|
||||
* @author Matthew T. Adams
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
public class CassandraCqlClusterFactoryBean extends CassandraClusterFactoryBean {}
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,9 +13,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config.xml;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import static org.springframework.data.cql.config.xml.ParsingUtils.*;
|
||||
import static org.springframework.data.cassandra.config.ParsingUtils.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -28,13 +28,8 @@ import org.springframework.beans.factory.support.ManagedList;
|
||||
import org.springframework.beans.factory.support.ManagedSet;
|
||||
import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.cql.config.CassandraCqlClusterFactoryBean;
|
||||
import org.springframework.data.cql.config.KeyspaceActionSpecificationFactoryBean;
|
||||
import org.springframework.data.cql.config.MultiLevelSetFlattenerFactoryBean;
|
||||
import org.springframework.data.cql.config.PoolingOptionsFactoryBean;
|
||||
import org.springframework.data.cql.config.SocketOptionsFactoryBean;
|
||||
import org.springframework.data.cql.core.keyspace.KeyspaceActionSpecification;
|
||||
import org.springframework.data.cql.core.keyspace.KeyspaceAttributes;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.KeyspaceActionSpecification;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.KeyspaceAttributes;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
import org.w3c.dom.Element;
|
||||
@@ -70,7 +65,7 @@ public class CassandraCqlClusterParser extends AbstractBeanDefinitionParser {
|
||||
@Override
|
||||
protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
|
||||
|
||||
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(CassandraCqlClusterFactoryBean.class);
|
||||
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(CassandraClusterFactoryBean.class);
|
||||
|
||||
builder.setLazyInit(parserContext.isDefaultLazyInit());
|
||||
builder.getRawBeanDefinition().setDestroyMethodName("destroy");
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.data.cql.config;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -25,9 +25,9 @@ import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.dao.support.PersistenceExceptionTranslator;
|
||||
import org.springframework.data.cql.core.CqlOperations;
|
||||
import org.springframework.data.cql.core.CqlTemplate;
|
||||
import org.springframework.data.cql.support.CassandraExceptionTranslator;
|
||||
import org.springframework.data.cassandra.core.cql.CassandraExceptionTranslator;
|
||||
import org.springframework.data.cassandra.core.cql.CqlOperations;
|
||||
import org.springframework.data.cassandra.core.cql.CqlTemplate;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -49,8 +49,8 @@ import com.datastax.driver.core.Session;
|
||||
* @see org.springframework.beans.factory.FactoryBean
|
||||
* @see org.springframework.beans.factory.InitializingBean
|
||||
* @see org.springframework.dao.support.PersistenceExceptionTranslator
|
||||
* @see org.springframework.data.cql.core.CqlTemplate
|
||||
* @see org.springframework.data.cql.support.CassandraExceptionTranslator
|
||||
* @see CqlTemplate
|
||||
* @see CassandraExceptionTranslator
|
||||
* @see com.datastax.driver.core.Cluster
|
||||
* @see com.datastax.driver.core.Session
|
||||
*/
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,16 +13,15 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config.xml;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import static org.springframework.data.cql.config.xml.ParsingUtils.*;
|
||||
import static org.springframework.data.cassandra.config.ParsingUtils.*;
|
||||
|
||||
import org.springframework.beans.factory.BeanDefinitionStoreException;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.cql.config.CassandraCqlSessionFactoryBean;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
import org.w3c.dom.Attr;
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,11 +13,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.data.cql.core.CqlTemplate;
|
||||
import org.springframework.data.cassandra.core.cql.CqlTemplate;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import com.datastax.driver.core.Session;
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,16 +13,15 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config.xml;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import static org.springframework.data.cql.config.xml.ParsingUtils.*;
|
||||
import static org.springframework.data.cassandra.config.ParsingUtils.*;
|
||||
|
||||
import org.springframework.beans.factory.BeanDefinitionStoreException;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.cql.config.CassandraCqlTemplateFactoryBean;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cassandra.config.xml;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@@ -27,14 +27,11 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.cassandra.config.CassandraEntityClassScanner;
|
||||
import org.springframework.data.cassandra.config.DefaultBeanNames;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraMappingContext;
|
||||
import org.springframework.data.cassandra.core.mapping.EntityMapping;
|
||||
import org.springframework.data.cassandra.core.mapping.Mapping;
|
||||
import org.springframework.data.cassandra.core.mapping.PropertyMapping;
|
||||
import org.springframework.data.cassandra.core.mapping.SimpleUserTypeResolver;
|
||||
import org.springframework.data.cql.config.xml.DefaultCqlBeanNames;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,14 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cassandra.config.xml;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import org.springframework.beans.factory.BeanDefinitionStoreException;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.cassandra.config.DefaultBeanNames;
|
||||
import org.springframework.data.cassandra.core.convert.MappingCassandraConverter;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.w3c.dom.Element;
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cassandra.config.xml;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactoryUtils;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
@@ -21,7 +21,6 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
import org.springframework.data.cassandra.config.CassandraMappingBeanFactoryPostProcessor;
|
||||
import org.springframework.data.config.BeanComponentDefinitionBuilder;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
/*
|
||||
* Copyright 2013-2017 the original author or authors
|
||||
*
|
||||
* Copyright 2013-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cassandra.config.xml;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
import org.springframework.data.cassandra.repository.config.CassandraRepositoryConfigurationExtension;
|
||||
@@ -21,7 +21,6 @@ import org.springframework.data.cassandra.core.CassandraPersistentEntitySchemaCr
|
||||
import org.springframework.data.cassandra.core.CassandraPersistentEntitySchemaDropper;
|
||||
import org.springframework.data.cassandra.core.convert.CassandraConverter;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraMappingContext;
|
||||
import org.springframework.data.cql.config.CassandraCqlSessionFactoryBean;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright 2013-2017 the original author or authors
|
||||
* Copyright 2013-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,16 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cassandra.config.xml;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import static org.springframework.data.cql.config.xml.ParsingUtils.*;
|
||||
import static org.springframework.data.cassandra.config.ParsingUtils.*;
|
||||
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.cassandra.config.CassandraSessionFactoryBean;
|
||||
import org.springframework.data.cassandra.config.DefaultBeanNames;
|
||||
import org.springframework.data.cassandra.config.SchemaAction;
|
||||
import org.springframework.data.cql.config.xml.CassandraCqlSessionParser;
|
||||
import org.w3c.dom.Attr;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
@@ -17,11 +17,11 @@ package org.springframework.data.cassandra.config;
|
||||
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.data.cassandra.SessionFactory;
|
||||
import org.springframework.data.cassandra.core.CassandraTemplate;
|
||||
import org.springframework.data.cassandra.core.convert.CassandraConverter;
|
||||
import org.springframework.data.cql.core.CqlOperations;
|
||||
import org.springframework.data.cql.core.session.DefaultSessionFactory;
|
||||
import org.springframework.data.cql.core.session.SessionFactory;
|
||||
import org.springframework.data.cassandra.core.cql.CqlOperations;
|
||||
import org.springframework.data.cassandra.core.cql.session.DefaultSessionFactory;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import com.datastax.driver.core.Session;
|
||||
@@ -88,8 +88,7 @@ public class CassandraTemplateFactoryBean implements FactoryBean<CassandraTempla
|
||||
|
||||
/**
|
||||
* Sets the Cassandra {@link Session} to use. The {@link CassandraTemplate} will use the logged keyspace of the
|
||||
* underlying {@link Session}. Don't change the keyspace using CQL but use a
|
||||
* {@link org.springframework.data.cql.core.session.SessionFactory}.
|
||||
* underlying {@link Session}. Don't change the keyspace using CQL but use a {@link SessionFactory}.
|
||||
*
|
||||
* @param session must not be {@literal null}.
|
||||
*/
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright 2013-2017 the original author or authors
|
||||
* Copyright 2013-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,17 +13,15 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cassandra.config.xml;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import static org.springframework.data.cql.config.xml.ParsingUtils.*;
|
||||
import static org.springframework.data.cassandra.config.ParsingUtils.*;
|
||||
|
||||
import org.springframework.beans.factory.BeanDefinitionStoreException;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.cassandra.config.CassandraTemplateFactoryBean;
|
||||
import org.springframework.data.cassandra.config.DefaultBeanNames;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* Copyright 2013-2017 the original author or authors
|
||||
* Copyright 2013-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.data.cql.config;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import com.datastax.driver.core.Cluster;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
/**
|
||||
* Simple enumeration for the various compression types.
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright 2013-2017 the original author or authors.
|
||||
* Copyright 2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config.xml;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
* @author Alex Shvid
|
||||
* @author Matthew T. Adams
|
||||
*/
|
||||
public class CassandraNamespaceHandler extends NamespaceHandlerSupport {
|
||||
public class CqlNamespaceHandler extends NamespaceHandlerSupport {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.xml.NamespaceHandler#init()
|
||||
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import org.springframework.data.cql.config.xml.DefaultCqlBeanNames;
|
||||
|
||||
/**
|
||||
* @author Matthew T. Adams
|
||||
* @author Mark Paluch
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config.xml;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
/**
|
||||
* @author Alex Shvid
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
/**
|
||||
* Available actions for Keyspace Specifications
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@@ -25,13 +25,13 @@ import java.util.Set;
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.data.cql.core.keyspace.CreateKeyspaceSpecification;
|
||||
import org.springframework.data.cql.core.keyspace.DefaultOption;
|
||||
import org.springframework.data.cql.core.keyspace.DropKeyspaceSpecification;
|
||||
import org.springframework.data.cql.core.keyspace.KeyspaceActionSpecification;
|
||||
import org.springframework.data.cql.core.keyspace.KeyspaceOption;
|
||||
import org.springframework.data.cql.core.keyspace.KeyspaceOption.ReplicationStrategy;
|
||||
import org.springframework.data.cql.core.keyspace.Option;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.CreateKeyspaceSpecification;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.DefaultOption;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.DropKeyspaceSpecification;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.KeyspaceActionSpecification;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.KeyspaceOption;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.KeyspaceOption.ReplicationStrategy;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.Option;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config.xml;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import static org.springframework.util.ReflectionUtils.*;
|
||||
|
||||
@@ -133,8 +133,8 @@ public class PoolingOptionsFactoryBean implements FactoryBean<PoolingOptions>, I
|
||||
* {@link PoolingOptionsFactoryBean}'s {@link HostDistance#LOCAL}-based {@link PoolingOptions}.
|
||||
* @see com.datastax.driver.core.HostDistance#LOCAL
|
||||
* @see com.datastax.driver.core.PoolingOptions
|
||||
* @see org.springframework.data.cql.config.PoolingOptionsFactoryBean.HostDistancePoolingOptions
|
||||
* @see org.springframework.data.cql.config.PoolingOptionsFactoryBean.LocalHostDistancePoolingOptions
|
||||
* @see PoolingOptionsFactoryBean.HostDistancePoolingOptions
|
||||
* @see PoolingOptionsFactoryBean.LocalHostDistancePoolingOptions
|
||||
*/
|
||||
protected HostDistancePoolingOptions newLocalHostDistancePoolingOptions() {
|
||||
return LocalHostDistancePoolingOptions.create(getLocalCoreConnections(), getLocalMaxConnections(),
|
||||
@@ -149,8 +149,8 @@ public class PoolingOptionsFactoryBean implements FactoryBean<PoolingOptions>, I
|
||||
* {@link PoolingOptionsFactoryBean}'s {@link HostDistance#REMOTE}-based {@link PoolingOptions}.
|
||||
* @see com.datastax.driver.core.HostDistance#REMOTE
|
||||
* @see com.datastax.driver.core.PoolingOptions
|
||||
* @see org.springframework.data.cql.config.PoolingOptionsFactoryBean.HostDistancePoolingOptions
|
||||
* @see org.springframework.data.cql.config.PoolingOptionsFactoryBean.RemoteHostDistancePoolingOptions
|
||||
* @see PoolingOptionsFactoryBean.HostDistancePoolingOptions
|
||||
* @see PoolingOptionsFactoryBean.RemoteHostDistancePoolingOptions
|
||||
*/
|
||||
protected HostDistancePoolingOptions newRemoteHostDistancePoolingOptions() {
|
||||
return RemoteHostDistancePoolingOptions.create(getRemoteCoreConnections(), getRemoteMaxConnections(),
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.config;
|
||||
package org.springframework.data.cassandra.config;
|
||||
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* Spring Java configuration for Spring Data Cassandra.
|
||||
*/
|
||||
package org.springframework.data.cassandra.config.java;
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* Spring XML namespace configuration for Spring Data Cassandra.
|
||||
*/
|
||||
package org.springframework.data.cassandra.config.xml;
|
||||
@@ -20,11 +20,11 @@ import java.util.function.Consumer;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.data.cassandra.core.convert.CassandraConverter;
|
||||
import org.springframework.data.cassandra.core.cql.AsyncCqlOperations;
|
||||
import org.springframework.data.cassandra.core.cql.QueryOptions;
|
||||
import org.springframework.data.cassandra.core.cql.WriteOptions;
|
||||
import org.springframework.data.cassandra.core.query.Query;
|
||||
import org.springframework.data.cassandra.core.query.Update;
|
||||
import org.springframework.data.cql.core.AsyncCqlOperations;
|
||||
import org.springframework.data.cql.core.QueryOptions;
|
||||
import org.springframework.data.cql.core.WriteOptions;
|
||||
import org.springframework.util.concurrent.ListenableFuture;
|
||||
|
||||
import com.datastax.driver.core.Statement;
|
||||
|
||||
@@ -21,24 +21,24 @@ import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.data.cassandra.SessionFactory;
|
||||
import org.springframework.data.cassandra.core.convert.CassandraConverter;
|
||||
import org.springframework.data.cassandra.core.convert.MappingCassandraConverter;
|
||||
import org.springframework.data.cassandra.core.convert.QueryMapper;
|
||||
import org.springframework.data.cassandra.core.convert.UpdateMapper;
|
||||
import org.springframework.data.cassandra.core.cql.AsyncCqlOperations;
|
||||
import org.springframework.data.cassandra.core.cql.AsyncCqlTemplate;
|
||||
import org.springframework.data.cassandra.core.cql.AsyncSessionCallback;
|
||||
import org.springframework.data.cassandra.core.cql.CqlExceptionTranslator;
|
||||
import org.springframework.data.cassandra.core.cql.CqlIdentifier;
|
||||
import org.springframework.data.cassandra.core.cql.CqlProvider;
|
||||
import org.springframework.data.cassandra.core.cql.GuavaListenableFutureAdapter;
|
||||
import org.springframework.data.cassandra.core.cql.QueryOptions;
|
||||
import org.springframework.data.cassandra.core.cql.session.DefaultSessionFactory;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraMappingContext;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentEntity;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentProperty;
|
||||
import org.springframework.data.cassandra.core.query.Query;
|
||||
import org.springframework.data.cql.core.AsyncCqlOperations;
|
||||
import org.springframework.data.cql.core.AsyncCqlTemplate;
|
||||
import org.springframework.data.cql.core.AsyncSessionCallback;
|
||||
import org.springframework.data.cql.core.CqlIdentifier;
|
||||
import org.springframework.data.cql.core.CqlProvider;
|
||||
import org.springframework.data.cql.core.GuavaListenableFutureAdapter;
|
||||
import org.springframework.data.cql.core.QueryOptions;
|
||||
import org.springframework.data.cql.core.session.DefaultSessionFactory;
|
||||
import org.springframework.data.cql.core.session.SessionFactory;
|
||||
import org.springframework.data.cql.support.CqlExceptionTranslator;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
@@ -470,7 +470,7 @@ public class AsyncCassandraTemplate implements AsyncCassandraOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cassandra.core.AsyncCassandraOperations#delete(java.lang.Object, org.springframework.data.cql.core.QueryOptions)
|
||||
* @see org.springframework.data.cassandra.core.AsyncCassandraOperations#delete(java.lang.Object, org.springframework.data.cassandra.core.cql.QueryOptions)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<WriteResult> delete(Object entity, QueryOptions options) {
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.data.cassandra.core;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.springframework.data.cql.core.CqlIdentifier;
|
||||
import org.springframework.data.cassandra.core.cql.CqlIdentifier;
|
||||
|
||||
import com.datastax.driver.core.KeyspaceMetadata;
|
||||
import com.datastax.driver.core.TableMetadata;
|
||||
|
||||
@@ -18,17 +18,17 @@ package org.springframework.data.cassandra.core;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.springframework.data.cassandra.SessionFactory;
|
||||
import org.springframework.data.cassandra.core.convert.CassandraConverter;
|
||||
import org.springframework.data.cassandra.core.cql.CqlIdentifier;
|
||||
import org.springframework.data.cassandra.core.cql.SessionCallback;
|
||||
import org.springframework.data.cassandra.core.cql.generator.CreateTableCqlGenerator;
|
||||
import org.springframework.data.cassandra.core.cql.generator.DropTableCqlGenerator;
|
||||
import org.springframework.data.cassandra.core.cql.generator.DropUserTypeCqlGenerator;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.CreateTableSpecification;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.DropTableSpecification;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.DropUserTypeSpecification;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentEntity;
|
||||
import org.springframework.data.cql.core.CqlIdentifier;
|
||||
import org.springframework.data.cql.core.SessionCallback;
|
||||
import org.springframework.data.cql.core.generator.CreateTableCqlGenerator;
|
||||
import org.springframework.data.cql.core.generator.DropTableCqlGenerator;
|
||||
import org.springframework.data.cql.core.generator.DropUserTypeCqlGenerator;
|
||||
import org.springframework.data.cql.core.keyspace.CreateTableSpecification;
|
||||
import org.springframework.data.cql.core.keyspace.DropTableSpecification;
|
||||
import org.springframework.data.cql.core.keyspace.DropUserTypeSpecification;
|
||||
import org.springframework.data.cql.core.session.SessionFactory;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import com.datastax.driver.core.KeyspaceMetadata;
|
||||
@@ -66,7 +66,7 @@ public class CassandraAdminTemplate extends CassandraTemplate implements Cassand
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cassandra.core.CassandraAdminOperations#createTable(boolean, org.springframework.data.cql.core.cql.CqlIdentifier, java.lang.Class, java.util.Map)
|
||||
* @see org.springframework.data.cassandra.core.CassandraAdminOperations#createTable(boolean, org.springframework.data.cassandra.core.cql.CqlIdentifier, java.lang.Class, java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public void createTable(boolean ifNotExists, CqlIdentifier tableName, Class<?> entityClass,
|
||||
@@ -86,7 +86,7 @@ public class CassandraAdminTemplate extends CassandraTemplate implements Cassand
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cassandra.core.CassandraAdminOperations#dropTable(org.springframework.data.cql.core.cql.CqlIdentifier)
|
||||
* @see org.springframework.data.cassandra.core.CassandraAdminOperations#dropTable(org.springframework.data.cassandra.core.cql.CqlIdentifier)
|
||||
*/
|
||||
@Override
|
||||
public void dropTable(CqlIdentifier tableName) {
|
||||
@@ -95,7 +95,7 @@ public class CassandraAdminTemplate extends CassandraTemplate implements Cassand
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cassandra.core.CassandraAdminOperations#dropUserType(org.springframework.data.cql.core.cql.CqlIdentifier)
|
||||
* @see org.springframework.data.cassandra.core.CassandraAdminOperations#dropUserType(org.springframework.data.cassandra.core.cql.CqlIdentifier)
|
||||
*/
|
||||
@Override
|
||||
public void dropUserType(CqlIdentifier typeName) {
|
||||
@@ -107,7 +107,7 @@ public class CassandraAdminTemplate extends CassandraTemplate implements Cassand
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cassandra.core.CassandraAdminOperations#getTableMetadata(java.lang.String, org.springframework.data.cql.core.cql.CqlIdentifier)
|
||||
* @see org.springframework.data.cassandra.core.CassandraAdminOperations#getTableMetadata(java.lang.String, org.springframework.data.cassandra.core.cql.CqlIdentifier)
|
||||
*/
|
||||
@Override
|
||||
public Optional<TableMetadata> getTableMetadata(String keyspace, CqlIdentifier tableName) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core;
|
||||
|
||||
import org.springframework.data.cql.core.WriteOptions;
|
||||
import org.springframework.data.cassandra.core.cql.WriteOptions;
|
||||
|
||||
/**
|
||||
* Batch operations for insert/update/delete actions on a table. {@link CassandraBatchOperations} use logged Cassandra
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.data.cassandra.core;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import org.springframework.data.cql.core.WriteOptions;
|
||||
import org.springframework.data.cassandra.core.cql.WriteOptions;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import com.datastax.driver.core.querybuilder.Batch;
|
||||
@@ -103,7 +103,7 @@ class CassandraBatchTemplate implements CassandraBatchOperations {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.data.cassandra.core.CassandraBatchOperations#insert(java.lang.Iterable, org.springframework.data.cql.core.WriteOptions)
|
||||
* @see org.springframework.data.cassandra.core.CassandraBatchOperations#insert(java.lang.Iterable, org.springframework.data.cassandra.core.cql.WriteOptions)
|
||||
*/
|
||||
@Override
|
||||
public CassandraBatchOperations insert(Iterable<?> entities, WriteOptions options) {
|
||||
@@ -141,7 +141,7 @@ class CassandraBatchTemplate implements CassandraBatchOperations {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.data.cassandra.core.CassandraBatchOperations#update(java.lang.Iterable, org.springframework.data.cql.core.WriteOptions)
|
||||
* @see org.springframework.data.cassandra.core.CassandraBatchOperations#update(java.lang.Iterable, org.springframework.data.cassandra.core.cql.WriteOptions)
|
||||
*/
|
||||
@Override
|
||||
public CassandraBatchOperations update(Iterable<?> entities, WriteOptions options) {
|
||||
|
||||
@@ -21,12 +21,12 @@ import java.util.stream.Stream;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.data.cassandra.core.convert.CassandraConverter;
|
||||
import org.springframework.data.cassandra.core.cql.CqlIdentifier;
|
||||
import org.springframework.data.cassandra.core.cql.CqlOperations;
|
||||
import org.springframework.data.cassandra.core.cql.QueryOptions;
|
||||
import org.springframework.data.cassandra.core.cql.WriteOptions;
|
||||
import org.springframework.data.cassandra.core.query.Query;
|
||||
import org.springframework.data.cassandra.core.query.Update;
|
||||
import org.springframework.data.cql.core.CqlIdentifier;
|
||||
import org.springframework.data.cql.core.CqlOperations;
|
||||
import org.springframework.data.cql.core.QueryOptions;
|
||||
import org.springframework.data.cql.core.WriteOptions;
|
||||
|
||||
import com.datastax.driver.core.Statement;
|
||||
|
||||
|
||||
@@ -25,15 +25,15 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.data.cassandra.core.cql.CqlIdentifier;
|
||||
import org.springframework.data.cassandra.core.cql.generator.CreateTableCqlGenerator;
|
||||
import org.springframework.data.cassandra.core.cql.generator.CreateUserTypeCqlGenerator;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.CreateTableSpecification;
|
||||
import org.springframework.data.cassandra.core.cql.keyspace.CreateUserTypeSpecification;
|
||||
import org.springframework.data.cassandra.core.mapping.BasicCassandraPersistentEntity;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraMappingContext;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentEntity;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentProperty;
|
||||
import org.springframework.data.cql.core.CqlIdentifier;
|
||||
import org.springframework.data.cql.core.generator.CreateTableCqlGenerator;
|
||||
import org.springframework.data.cql.core.generator.CreateUserTypeCqlGenerator;
|
||||
import org.springframework.data.cql.core.keyspace.CreateTableSpecification;
|
||||
import org.springframework.data.cql.core.keyspace.CreateUserTypeSpecification;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,9 +18,9 @@ package org.springframework.data.cassandra.core;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.data.cassandra.core.cql.CqlIdentifier;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraMappingContext;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentEntity;
|
||||
import org.springframework.data.cql.core.CqlIdentifier;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import com.datastax.driver.core.AbstractTableMetadata;
|
||||
|
||||
@@ -26,22 +26,22 @@ import lombok.NonNull;
|
||||
import lombok.Value;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.data.cassandra.SessionFactory;
|
||||
import org.springframework.data.cassandra.core.convert.CassandraConverter;
|
||||
import org.springframework.data.cassandra.core.convert.MappingCassandraConverter;
|
||||
import org.springframework.data.cassandra.core.convert.QueryMapper;
|
||||
import org.springframework.data.cassandra.core.convert.UpdateMapper;
|
||||
import org.springframework.data.cassandra.core.cql.CqlIdentifier;
|
||||
import org.springframework.data.cassandra.core.cql.CqlOperations;
|
||||
import org.springframework.data.cassandra.core.cql.CqlProvider;
|
||||
import org.springframework.data.cassandra.core.cql.CqlTemplate;
|
||||
import org.springframework.data.cassandra.core.cql.QueryOptions;
|
||||
import org.springframework.data.cassandra.core.cql.SessionCallback;
|
||||
import org.springframework.data.cassandra.core.cql.session.DefaultSessionFactory;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraMappingContext;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentEntity;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentProperty;
|
||||
import org.springframework.data.cassandra.core.query.Query;
|
||||
import org.springframework.data.cql.core.CqlIdentifier;
|
||||
import org.springframework.data.cql.core.CqlOperations;
|
||||
import org.springframework.data.cql.core.CqlProvider;
|
||||
import org.springframework.data.cql.core.CqlTemplate;
|
||||
import org.springframework.data.cql.core.QueryOptions;
|
||||
import org.springframework.data.cql.core.SessionCallback;
|
||||
import org.springframework.data.cql.core.session.DefaultSessionFactory;
|
||||
import org.springframework.data.cql.core.session.SessionFactory;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
@@ -481,7 +481,7 @@ public class CassandraTemplate implements CassandraOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cassandra.core.CassandraOperations#delete(java.lang.Object, org.springframework.data.cql.core.QueryOptions)
|
||||
* @see org.springframework.data.cassandra.core.CassandraOperations#delete(java.lang.Object, org.springframework.data.cassandra.core.cql.QueryOptions)
|
||||
*/
|
||||
@Override
|
||||
public WriteResult delete(Object entity, QueryOptions options) {
|
||||
|
||||
@@ -17,7 +17,7 @@ package org.springframework.data.cassandra.core;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.springframework.data.cql.core.WriteOptions;
|
||||
import org.springframework.data.cassandra.core.cql.WriteOptions;
|
||||
|
||||
/**
|
||||
* Extension to {@link WriteOptions} for use with {@code INSERT} operations.
|
||||
@@ -64,7 +64,7 @@ public class InsertOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.QueryOptions.QueryOptionsBuilder#consistencyLevel(com.datastax.driver.core.ConsistencyLevel)
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder#consistencyLevel(com.datastax.driver.core.ConsistencyLevel)
|
||||
*/
|
||||
@Override
|
||||
public InsertOptionsBuilder consistencyLevel(com.datastax.driver.core.ConsistencyLevel consistencyLevel) {
|
||||
@@ -73,7 +73,7 @@ public class InsertOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.QueryOptions.QueryOptionsBuilder#retryPolicy(org.springframework.data.cql.core.RetryPolicy)
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder#retryPolicy(org.springframework.data.cassandra.core.cql.RetryPolicy)
|
||||
*/
|
||||
@Override
|
||||
public InsertOptionsBuilder retryPolicy(com.datastax.driver.core.policies.RetryPolicy driverRetryPolicy) {
|
||||
@@ -82,7 +82,7 @@ public class InsertOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.QueryOptions.QueryOptionsBuilder#fetchSize(int)
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder#fetchSize(int)
|
||||
*/
|
||||
@Override
|
||||
public InsertOptionsBuilder fetchSize(int fetchSize) {
|
||||
@@ -91,7 +91,7 @@ public class InsertOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.QueryOptions.QueryOptionsBuilder#readTimeout(long)
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder#readTimeout(long)
|
||||
*/
|
||||
@Override
|
||||
public InsertOptionsBuilder readTimeout(long readTimeout) {
|
||||
@@ -100,7 +100,7 @@ public class InsertOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.QueryOptions.QueryOptionsBuilder#readTimeout(long, java.util.concurrent.TimeUnit)
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder#readTimeout(long, java.util.concurrent.TimeUnit)
|
||||
*/
|
||||
@Override
|
||||
public InsertOptionsBuilder readTimeout(long readTimeout, TimeUnit timeUnit) {
|
||||
@@ -109,7 +109,7 @@ public class InsertOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.QueryOptions.QueryOptionsBuilder#tracing(boolean)
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder#tracing(boolean)
|
||||
*/
|
||||
@Override
|
||||
public InsertOptionsBuilder tracing(boolean tracing) {
|
||||
@@ -118,7 +118,7 @@ public class InsertOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.QueryOptions.QueryOptionsBuilder#withTracing()
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder#withTracing()
|
||||
*/
|
||||
@Override
|
||||
public InsertOptionsBuilder withTracing() {
|
||||
@@ -127,7 +127,7 @@ public class InsertOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.WriteOptions.WriteOptionsBuilder#ttl(int)
|
||||
* @see org.springframework.data.cassandra.core.cql.WriteOptions.WriteOptionsBuilder#ttl(int)
|
||||
*/
|
||||
public InsertOptionsBuilder ttl(int ttl) {
|
||||
return (InsertOptionsBuilder) super.ttl(ttl);
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core;
|
||||
|
||||
import org.springframework.data.cassandra.core.cql.QueryOptions;
|
||||
import org.springframework.data.cassandra.core.cql.QueryOptionsUtil;
|
||||
import org.springframework.data.cassandra.core.cql.WriteOptions;
|
||||
import org.springframework.data.convert.EntityWriter;
|
||||
import org.springframework.data.cql.core.QueryOptions;
|
||||
import org.springframework.data.cql.core.QueryOptionsUtil;
|
||||
import org.springframework.data.cql.core.WriteOptions;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import com.datastax.driver.core.querybuilder.Delete;
|
||||
|
||||
@@ -20,11 +20,11 @@ import reactor.core.publisher.Mono;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.data.cassandra.core.convert.CassandraConverter;
|
||||
import org.springframework.data.cassandra.core.cql.QueryOptions;
|
||||
import org.springframework.data.cassandra.core.cql.ReactiveCqlOperations;
|
||||
import org.springframework.data.cassandra.core.cql.WriteOptions;
|
||||
import org.springframework.data.cassandra.core.query.Query;
|
||||
import org.springframework.data.cassandra.core.query.Update;
|
||||
import org.springframework.data.cql.core.QueryOptions;
|
||||
import org.springframework.data.cql.core.ReactiveCqlOperations;
|
||||
import org.springframework.data.cql.core.WriteOptions;
|
||||
|
||||
import com.datastax.driver.core.Statement;
|
||||
|
||||
|
||||
@@ -22,24 +22,24 @@ import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.data.cassandra.ReactiveResultSet;
|
||||
import org.springframework.data.cassandra.ReactiveSession;
|
||||
import org.springframework.data.cassandra.ReactiveSessionFactory;
|
||||
import org.springframework.data.cassandra.core.convert.CassandraConverter;
|
||||
import org.springframework.data.cassandra.core.convert.MappingCassandraConverter;
|
||||
import org.springframework.data.cassandra.core.convert.QueryMapper;
|
||||
import org.springframework.data.cassandra.core.convert.UpdateMapper;
|
||||
import org.springframework.data.cassandra.core.cql.CqlIdentifier;
|
||||
import org.springframework.data.cassandra.core.cql.CqlProvider;
|
||||
import org.springframework.data.cassandra.core.cql.QueryOptions;
|
||||
import org.springframework.data.cassandra.core.cql.ReactiveCqlOperations;
|
||||
import org.springframework.data.cassandra.core.cql.ReactiveCqlTemplate;
|
||||
import org.springframework.data.cassandra.core.cql.ReactiveSessionCallback;
|
||||
import org.springframework.data.cassandra.core.cql.session.DefaultReactiveSessionFactory;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraMappingContext;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentEntity;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentProperty;
|
||||
import org.springframework.data.cassandra.core.query.Query;
|
||||
import org.springframework.data.cql.core.CqlIdentifier;
|
||||
import org.springframework.data.cql.core.CqlProvider;
|
||||
import org.springframework.data.cql.core.QueryOptions;
|
||||
import org.springframework.data.cql.core.ReactiveCqlOperations;
|
||||
import org.springframework.data.cql.core.ReactiveCqlTemplate;
|
||||
import org.springframework.data.cql.core.ReactiveSessionCallback;
|
||||
import org.springframework.data.cql.core.session.DefaultReactiveSessionFactory;
|
||||
import org.springframework.data.cql.core.session.ReactiveResultSet;
|
||||
import org.springframework.data.cql.core.session.ReactiveSession;
|
||||
import org.springframework.data.cql.core.session.ReactiveSessionFactory;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
@@ -22,6 +22,9 @@ import java.util.Set;
|
||||
|
||||
import org.springframework.data.cassandra.core.convert.QueryMapper;
|
||||
import org.springframework.data.cassandra.core.convert.UpdateMapper;
|
||||
import org.springframework.data.cassandra.core.cql.CqlIdentifier;
|
||||
import org.springframework.data.cassandra.core.cql.QueryOptionsUtil;
|
||||
import org.springframework.data.cassandra.core.cql.WriteOptions;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentEntity;
|
||||
import org.springframework.data.cassandra.core.query.Columns.ColumnSelector;
|
||||
import org.springframework.data.cassandra.core.query.Columns.FunctionCall;
|
||||
@@ -40,9 +43,6 @@ import org.springframework.data.cassandra.core.query.Update.RemoveOp;
|
||||
import org.springframework.data.cassandra.core.query.Update.SetAtIndexOp;
|
||||
import org.springframework.data.cassandra.core.query.Update.SetAtKeyOp;
|
||||
import org.springframework.data.cassandra.core.query.Update.SetOp;
|
||||
import org.springframework.data.cql.core.CqlIdentifier;
|
||||
import org.springframework.data.cql.core.QueryOptionsUtil;
|
||||
import org.springframework.data.cql.core.WriteOptions;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.domain.Sort.Order;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -17,7 +17,7 @@ package org.springframework.data.cassandra.core;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.springframework.data.cql.core.WriteOptions;
|
||||
import org.springframework.data.cassandra.core.cql.WriteOptions;
|
||||
|
||||
/**
|
||||
* Extension to {@link WriteOptions} for use with {@code UPDATE} operations.
|
||||
@@ -64,7 +64,7 @@ public class UpdateOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.QueryOptions.QueryOptionsBuilder#consistencyLevel(com.datastax.driver.core.ConsistencyLevel)
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder#consistencyLevel(com.datastax.driver.core.ConsistencyLevel)
|
||||
*/
|
||||
@Override
|
||||
public UpdateOptionsBuilder consistencyLevel(com.datastax.driver.core.ConsistencyLevel consistencyLevel) {
|
||||
@@ -73,7 +73,7 @@ public class UpdateOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.QueryOptions.QueryOptionsBuilder#retryPolicy(org.springframework.data.cql.core.RetryPolicy)
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder#retryPolicy(org.springframework.data.cassandra.core.cql.RetryPolicy)
|
||||
*/
|
||||
@Override
|
||||
public UpdateOptionsBuilder retryPolicy(com.datastax.driver.core.policies.RetryPolicy driverRetryPolicy) {
|
||||
@@ -82,7 +82,7 @@ public class UpdateOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.QueryOptions.QueryOptionsBuilder#fetchSize(int)
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder#fetchSize(int)
|
||||
*/
|
||||
@Override
|
||||
public UpdateOptionsBuilder fetchSize(int fetchSize) {
|
||||
@@ -91,7 +91,7 @@ public class UpdateOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.QueryOptions.QueryOptionsBuilder#readTimeout(long)
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder#readTimeout(long)
|
||||
*/
|
||||
@Override
|
||||
public UpdateOptionsBuilder readTimeout(long readTimeout) {
|
||||
@@ -100,7 +100,7 @@ public class UpdateOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.QueryOptions.QueryOptionsBuilder#readTimeout(long, java.util.concurrent.TimeUnit)
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder#readTimeout(long, java.util.concurrent.TimeUnit)
|
||||
*/
|
||||
@Override
|
||||
public UpdateOptionsBuilder readTimeout(long readTimeout, TimeUnit timeUnit) {
|
||||
@@ -109,7 +109,7 @@ public class UpdateOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.QueryOptions.QueryOptionsBuilder#tracing(boolean)
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder#tracing(boolean)
|
||||
*/
|
||||
@Override
|
||||
public UpdateOptionsBuilder tracing(boolean tracing) {
|
||||
@@ -118,7 +118,7 @@ public class UpdateOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.QueryOptions.QueryOptionsBuilder#withTracing()
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder#withTracing()
|
||||
*/
|
||||
@Override
|
||||
public UpdateOptionsBuilder withTracing() {
|
||||
@@ -127,7 +127,7 @@ public class UpdateOptions extends WriteOptions {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.WriteOptions.WriteOptionsBuilder#ttl(int)
|
||||
* @see org.springframework.data.cassandra.core.cql.WriteOptions.WriteOptionsBuilder#ttl(int)
|
||||
*/
|
||||
public UpdateOptionsBuilder ttl(int ttl) {
|
||||
return (UpdateOptionsBuilder) super.ttl(ttl);
|
||||
|
||||
@@ -18,6 +18,7 @@ package org.springframework.data.cassandra.core.convert;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraMappingContext;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentEntity;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentProperty;
|
||||
import org.springframework.data.cassandra.core.mapping.MapId;
|
||||
import org.springframework.data.convert.CustomConversions;
|
||||
import org.springframework.data.convert.EntityConverter;
|
||||
import org.springframework.data.util.TypeInformation;
|
||||
@@ -50,8 +51,8 @@ public interface CassandraConverter
|
||||
* <ul>
|
||||
* <li>A singular value if for a simple {@link org.springframework.data.annotation.Id} or
|
||||
* {@link org.springframework.data.cassandra.core.mapping.PrimaryKey} Id</li>
|
||||
* <li>A {@link org.springframework.data.cassandra.repository.MapId} for composite
|
||||
* {@link org.springframework.data.cassandra.core.mapping.PrimaryKeyColumn} Id's</li>
|
||||
* <li>A {@link MapId} for composite {@link org.springframework.data.cassandra.core.mapping.PrimaryKeyColumn}
|
||||
* Id's</li>
|
||||
* <li>A the composite primary key for {@link org.springframework.data.cassandra.core.mapping.PrimaryKey} using a
|
||||
* {@link org.springframework.data.cassandra.core.mapping.PrimaryKeyClass}</li>
|
||||
* </ul>
|
||||
|
||||
@@ -25,9 +25,9 @@ import java.util.UUID;
|
||||
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.core.convert.converter.ConverterFactory;
|
||||
import org.springframework.data.cassandra.core.cql.converter.RowToListConverter;
|
||||
import org.springframework.data.cassandra.core.cql.converter.RowToMapConverter;
|
||||
import org.springframework.data.convert.ReadingConverter;
|
||||
import org.springframework.data.cql.core.converter.RowToListConverter;
|
||||
import org.springframework.data.cql.core.converter.RowToMapConverter;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.NumberUtils;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ package org.springframework.data.cassandra.core.convert;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.cql.core.CqlIdentifier;
|
||||
import org.springframework.data.cassandra.core.cql.CqlIdentifier;
|
||||
|
||||
import com.datastax.driver.core.CodecRegistry;
|
||||
import com.datastax.driver.core.ColumnDefinitions;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core.convert;
|
||||
|
||||
import static org.springframework.data.cassandra.repository.support.BasicMapId.*;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
@@ -25,6 +24,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -36,12 +36,13 @@ import org.springframework.core.CollectionFactory;
|
||||
import org.springframework.core.convert.support.DefaultConversionService;
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.data.cassandra.core.mapping.BasicCassandraPersistentEntity;
|
||||
import org.springframework.data.cassandra.core.mapping.BasicMapId;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraMappingContext;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentEntity;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentProperty;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraType;
|
||||
import org.springframework.data.cassandra.repository.MapId;
|
||||
import org.springframework.data.cassandra.repository.MapIdentifiable;
|
||||
import org.springframework.data.cassandra.core.mapping.MapId;
|
||||
import org.springframework.data.cassandra.core.mapping.MapIdentifiable;
|
||||
import org.springframework.data.convert.EntityInstantiator;
|
||||
import org.springframework.data.mapping.MappingException;
|
||||
import org.springframework.data.mapping.PersistentPropertyAccessor;
|
||||
@@ -605,7 +606,7 @@ public class MappingCassandraConverter extends AbstractCassandraConverter
|
||||
}
|
||||
|
||||
// if the class doesn't have an id property, then it's using MapId
|
||||
final MapId id = id();
|
||||
final MapId id = BasicMapId.id();
|
||||
|
||||
for (CassandraPersistentProperty property : entity) {
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.data.cassandra.core.cql.CqlIdentifier;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraMappingContext;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentEntity;
|
||||
import org.springframework.data.cassandra.core.mapping.CassandraPersistentProperty;
|
||||
@@ -35,7 +36,6 @@ import org.springframework.data.cassandra.core.query.Criteria;
|
||||
import org.springframework.data.cassandra.core.query.CriteriaDefinition;
|
||||
import org.springframework.data.cassandra.core.query.CriteriaDefinition.Predicate;
|
||||
import org.springframework.data.cassandra.core.query.Filter;
|
||||
import org.springframework.data.cql.core.CqlIdentifier;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.domain.Sort.Order;
|
||||
import org.springframework.data.mapping.PersistentProperty;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import com.datastax.driver.core.BoundStatement;
|
||||
import com.datastax.driver.core.PreparedStatement;
|
||||
@@ -39,7 +39,7 @@ public class ArgumentPreparedStatementBinder implements PreparedStatementBinder
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.PreparedStatementBinder#bindValues(com.datastax.driver.core.PreparedStatement)
|
||||
* @see org.springframework.data.cassandra.core.cql.PreparedStatementBinder#bindValues(com.datastax.driver.core.PreparedStatement)
|
||||
*/
|
||||
@Override
|
||||
public BoundStatement bindValues(PreparedStatement ps) throws DriverException {
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -23,7 +23,7 @@ import java.util.function.Function;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.dao.support.DataAccessUtils;
|
||||
import org.springframework.dao.support.PersistenceExceptionTranslator;
|
||||
import org.springframework.data.cql.core.session.SessionFactory;
|
||||
import org.springframework.data.cassandra.SessionFactory;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.concurrent.ListenableFuture;
|
||||
import org.springframework.util.concurrent.SettableListenableFuture;
|
||||
@@ -61,7 +61,7 @@ import com.google.common.util.concurrent.Futures;
|
||||
* it.
|
||||
* <p>
|
||||
* All CQL operations performed by this class are logged at debug level, using
|
||||
* "org.springframework.data.cql.core.CqlTemplate" as log category.
|
||||
* "org.springframework.data.cassandra.core.cqlTemplate" as log category.
|
||||
* <p>
|
||||
* <b>NOTE: An instance of this class is thread-safe once configured.</b>
|
||||
*
|
||||
@@ -76,7 +76,7 @@ import com.google.common.util.concurrent.Futures;
|
||||
* @see RowMapper
|
||||
* @see org.springframework.dao.support.PersistenceExceptionTranslator
|
||||
*/
|
||||
public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOperations {
|
||||
public class AsyncCqlTemplate extends CassandraAccessor implements AsyncCqlOperations {
|
||||
|
||||
/**
|
||||
* Create a new, uninitialized {@link AsyncCqlTemplate}. Note: The {@link SessionFactory} has to be set before using
|
||||
@@ -120,7 +120,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#execute(org.springframework.data.cql.core.AsyncSessionCallback)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#execute(org.springframework.data.cassandra.core.cql.AsyncSessionCallback)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> execute(AsyncSessionCallback<T> action) throws DataAccessException {
|
||||
@@ -140,7 +140,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#execute(java.lang.String)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#execute(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<Boolean> execute(String cql) throws DataAccessException {
|
||||
@@ -152,7 +152,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cql.core.ResultSetExtractor)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.ResultSetExtractor)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> query(String cql, ResultSetExtractor<T> resultSetExtractor)
|
||||
@@ -180,7 +180,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cql.core.RowCallbackHandler)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.RowCallbackHandler)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<Void> query(String cql, RowCallbackHandler rowCallbackHandler) throws DataAccessException {
|
||||
@@ -193,7 +193,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cql.core.RowMapper)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.RowMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<List<T>> query(String cql, RowMapper<T> rowMapper) throws DataAccessException {
|
||||
@@ -202,7 +202,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForList(java.lang.String)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForList(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<List<Map<String, Object>>> queryForList(String cql) throws DataAccessException {
|
||||
@@ -211,7 +211,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForList(java.lang.String, java.lang.Class)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForList(java.lang.String, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<List<T>> queryForList(String cql, Class<T> elementType) throws DataAccessException {
|
||||
@@ -220,7 +220,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForMap(java.lang.String)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForMap(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<Map<String, Object>> queryForMap(String cql) throws DataAccessException {
|
||||
@@ -229,7 +229,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForObject(java.lang.String, java.lang.Class)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForObject(java.lang.String, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> queryForObject(String cql, Class<T> requiredType) throws DataAccessException {
|
||||
@@ -238,7 +238,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForObject(java.lang.String, org.springframework.data.cql.core.RowMapper)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForObject(java.lang.String, org.springframework.data.cassandra.core.cql.RowMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> queryForObject(String cql, RowMapper<T> rowMapper) throws DataAccessException {
|
||||
@@ -251,7 +251,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForResultSet(java.lang.String)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForResultSet(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<ResultSet> queryForResultSet(String cql) throws DataAccessException {
|
||||
@@ -264,7 +264,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#execute(com.datastax.driver.core.Statement)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#execute(com.datastax.driver.core.Statement)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<Boolean> execute(Statement statement) throws DataAccessException {
|
||||
@@ -276,7 +276,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(com.datastax.driver.core.Statement, org.springframework.data.cql.core.ResultSetExtractor)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(com.datastax.driver.core.Statement, org.springframework.data.cassandra.core.cql.ResultSetExtractor)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> query(Statement statement, ResultSetExtractor<T> resultSetExtractor)
|
||||
@@ -305,7 +305,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(com.datastax.driver.core.Statement, org.springframework.data.cql.core.RowCallbackHandler)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(com.datastax.driver.core.Statement, org.springframework.data.cassandra.core.cql.RowCallbackHandler)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<Void> query(Statement statement, RowCallbackHandler rowCallbackHandler)
|
||||
@@ -319,7 +319,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(com.datastax.driver.core.Statement, org.springframework.data.cql.core.RowMapper)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(com.datastax.driver.core.Statement, org.springframework.data.cassandra.core.cql.RowMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<List<T>> query(Statement statement, RowMapper<T> rowMapper) throws DataAccessException {
|
||||
@@ -328,7 +328,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForList(com.datastax.driver.core.Statement)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForList(com.datastax.driver.core.Statement)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<List<Map<String, Object>>> queryForList(Statement statement) throws DataAccessException {
|
||||
@@ -337,7 +337,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForList(com.datastax.driver.core.Statement, java.lang.Class)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForList(com.datastax.driver.core.Statement, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<List<T>> queryForList(Statement statement, Class<T> elementType)
|
||||
@@ -347,7 +347,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForMap(com.datastax.driver.core.Statement)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForMap(com.datastax.driver.core.Statement)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<Map<String, Object>> queryForMap(Statement statement) throws DataAccessException {
|
||||
@@ -356,7 +356,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForObject(com.datastax.driver.core.Statement, java.lang.Class)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForObject(com.datastax.driver.core.Statement, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> queryForObject(Statement statement, Class<T> requiredType) throws DataAccessException {
|
||||
@@ -365,7 +365,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForObject(com.datastax.driver.core.Statement, org.springframework.data.cql.core.RowMapper)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForObject(com.datastax.driver.core.Statement, org.springframework.data.cassandra.core.cql.RowMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> queryForObject(Statement statement, RowMapper<T> rowMapper)
|
||||
@@ -379,7 +379,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForResultSet(com.datastax.driver.core.Statement)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForResultSet(com.datastax.driver.core.Statement)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<ResultSet> queryForResultSet(Statement statement) throws DataAccessException {
|
||||
@@ -392,7 +392,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#execute(org.springframework.data.cql.core.AsyncPreparedStatementCreator)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#execute(org.springframework.data.cassandra.core.cql.AsyncPreparedStatementCreator)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<Boolean> execute(AsyncPreparedStatementCreator preparedStatementCreator)
|
||||
@@ -403,7 +403,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#execute(java.lang.String, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#execute(java.lang.String, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<Boolean> execute(String cql, Object... args) throws DataAccessException {
|
||||
@@ -412,7 +412,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#execute(java.lang.String, org.springframework.data.cql.core.PreparedStatementBinder)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#execute(java.lang.String, org.springframework.data.cassandra.core.cql.PreparedStatementBinder)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<Boolean> execute(String cql, PreparedStatementBinder preparedStatementBinder)
|
||||
@@ -423,7 +423,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#execute(java.lang.String, org.springframework.data.cql.core.PreparedStatementCallback)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#execute(java.lang.String, org.springframework.data.cassandra.core.cql.PreparedStatementCallback)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> execute(String cql, PreparedStatementCallback<T> action) throws DataAccessException {
|
||||
@@ -432,7 +432,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#execute(org.springframework.data.cql.core.AsyncPreparedStatementCreator, org.springframework.data.cql.core.PreparedStatementCallback)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#execute(org.springframework.data.cassandra.core.cql.AsyncPreparedStatementCreator, org.springframework.data.cassandra.core.cql.PreparedStatementCallback)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> execute(AsyncPreparedStatementCreator preparedStatementCreator,
|
||||
@@ -463,7 +463,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(org.springframework.data.cql.core.AsyncPreparedStatementCreator, org.springframework.data.cql.core.ResultSetExtractor)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(org.springframework.data.cassandra.core.cql.AsyncPreparedStatementCreator, org.springframework.data.cassandra.core.cql.ResultSetExtractor)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> query(AsyncPreparedStatementCreator preparedStatementCreator,
|
||||
@@ -474,7 +474,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(org.springframework.data.cql.core.AsyncPreparedStatementCreator, org.springframework.data.cql.core.RowCallbackHandler)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(org.springframework.data.cassandra.core.cql.AsyncPreparedStatementCreator, org.springframework.data.cassandra.core.cql.RowCallbackHandler)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<Void> query(AsyncPreparedStatementCreator preparedStatementCreator,
|
||||
@@ -488,7 +488,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(org.springframework.data.cql.core.AsyncPreparedStatementCreator, org.springframework.data.cql.core.RowMapper)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(org.springframework.data.cassandra.core.cql.AsyncPreparedStatementCreator, org.springframework.data.cassandra.core.cql.RowMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<List<T>> query(AsyncPreparedStatementCreator preparedStatementCreator,
|
||||
@@ -499,7 +499,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(org.springframework.data.cql.core.AsyncPreparedStatementCreator, org.springframework.data.cql.core.PreparedStatementBinder, org.springframework.data.cql.core.ResultSetExtractor)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(org.springframework.data.cassandra.core.cql.AsyncPreparedStatementCreator, org.springframework.data.cassandra.core.cql.PreparedStatementBinder, org.springframework.data.cassandra.core.cql.ResultSetExtractor)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> query(AsyncPreparedStatementCreator preparedStatementCreator,
|
||||
@@ -569,7 +569,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(org.springframework.data.cql.core.AsyncPreparedStatementCreator, org.springframework.data.cql.core.PreparedStatementBinder, org.springframework.data.cql.core.RowCallbackHandler)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(org.springframework.data.cassandra.core.cql.AsyncPreparedStatementCreator, org.springframework.data.cassandra.core.cql.PreparedStatementBinder, org.springframework.data.cassandra.core.cql.RowCallbackHandler)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<Void> query(AsyncPreparedStatementCreator preparedStatementCreator,
|
||||
@@ -585,7 +585,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(org.springframework.data.cql.core.AsyncPreparedStatementCreator, org.springframework.data.cql.core.PreparedStatementBinder, org.springframework.data.cql.core.RowMapper)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(org.springframework.data.cassandra.core.cql.AsyncPreparedStatementCreator, org.springframework.data.cassandra.core.cql.PreparedStatementBinder, org.springframework.data.cassandra.core.cql.RowMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<List<T>> query(AsyncPreparedStatementCreator preparedStatementCreator,
|
||||
@@ -596,7 +596,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cql.core.ResultSetExtractor, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.ResultSetExtractor, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> query(String cql, ResultSetExtractor<T> resultSetExtractor, Object... args)
|
||||
@@ -607,7 +607,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cql.core.RowCallbackHandler, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.RowCallbackHandler, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<Void> query(String cql, RowCallbackHandler rowCallbackHandler, Object... args)
|
||||
@@ -622,7 +622,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cql.core.RowMapper, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.RowMapper, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<List<T>> query(String cql, RowMapper<T> rowMapper, Object... args)
|
||||
@@ -634,7 +634,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cql.core.PreparedStatementBinder, org.springframework.data.cql.core.ResultSetExtractor)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.PreparedStatementBinder, org.springframework.data.cassandra.core.cql.ResultSetExtractor)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> query(String cql, PreparedStatementBinder preparedStatementBinder,
|
||||
@@ -645,7 +645,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cql.core.PreparedStatementBinder, org.springframework.data.cql.core.RowCallbackHandler)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.PreparedStatementBinder, org.springframework.data.cassandra.core.cql.RowCallbackHandler)
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<Void> query(String cql, PreparedStatementBinder preparedStatementBinder,
|
||||
@@ -660,7 +660,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cql.core.PreparedStatementBinder, org.springframework.data.cql.core.RowMapper)
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.PreparedStatementBinder, org.springframework.data.cassandra.core.cql.RowMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<List<T>> query(String cql, PreparedStatementBinder preparedStatementBinder,
|
||||
@@ -671,7 +671,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForList(java.lang.String, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForList(java.lang.String, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<List<Map<String, Object>>> queryForList(String cql, Object... args)
|
||||
@@ -683,7 +683,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForList(java.lang.String, java.lang.Class, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForList(java.lang.String, java.lang.Class, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<List<T>> queryForList(String cql, Class<T> elementType, Object... args)
|
||||
@@ -695,7 +695,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForMap(java.lang.String, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForMap(java.lang.String, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<Map<String, Object>> queryForMap(String cql, Object... args) throws DataAccessException {
|
||||
@@ -704,7 +704,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForObject(java.lang.String, java.lang.Class, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForObject(java.lang.String, java.lang.Class, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> queryForObject(String cql, Class<T> requiredType, Object... args)
|
||||
@@ -715,7 +715,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForObject(java.lang.String, org.springframework.data.cql.core.RowMapper, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForObject(java.lang.String, org.springframework.data.cassandra.core.cql.RowMapper, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> ListenableFuture<T> queryForObject(String cql, RowMapper<T> rowMapper, Object... args)
|
||||
@@ -730,7 +730,7 @@ public class AsyncCqlTemplate extends CqlTemplateSupport implements AsyncCqlOper
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.AsyncCqlOperations#queryForResultSet(java.lang.String, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cql.AsyncCqlOperations#queryForResultSet(java.lang.String, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public ListenableFuture<ResultSet> queryForResultSet(String cql, Object... args) throws DataAccessException {
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import org.springframework.util.concurrent.ListenableFuture;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.util.concurrent.ListenableFuture;
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import com.datastax.driver.core.ResultSetFuture;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -38,7 +38,7 @@ import com.datastax.driver.core.exceptions.DriverException;
|
||||
* @author Mark Paluch
|
||||
* @deprecated since 2.0. This class uses an unsafe, static held cache and is not able to prepare
|
||||
* {@link com.datastax.driver.core.querybuilder.BuiltStatement}. Use
|
||||
* {@link org.springframework.data.cql.core.support.CachedPreparedStatementCreator}.
|
||||
* {@link org.springframework.data.cassandra.core.cql.support.CachedPreparedStatementCreator}.
|
||||
*/
|
||||
@Deprecated
|
||||
public class CachedPreparedStatementCreator implements PreparedStatementCreator {
|
||||
@@ -71,7 +71,7 @@ public class CachedPreparedStatementCreator implements PreparedStatementCreator
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.PreparedStatementCreator#createPreparedStatement(com.datastax.driver.core.Session)
|
||||
* @see org.springframework.data.cassandra.core.cql.PreparedStatementCreator#createPreparedStatement(com.datastax.driver.core.Session)
|
||||
*/
|
||||
@Override
|
||||
public PreparedStatement createPreparedStatement(Session session) throws DriverException {
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,18 +13,23 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.data.cql.core.session.DefaultSessionFactory;
|
||||
import org.springframework.data.cql.core.session.SessionFactory;
|
||||
import org.springframework.data.cassandra.SessionFactory;
|
||||
import org.springframework.data.cassandra.core.cql.session.DefaultSessionFactory;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import com.datastax.driver.core.ConsistencyLevel;
|
||||
import com.datastax.driver.core.PreparedStatement;
|
||||
import com.datastax.driver.core.ResultSet;
|
||||
import com.datastax.driver.core.Session;
|
||||
import com.datastax.driver.core.Statement;
|
||||
import com.datastax.driver.core.exceptions.DriverException;
|
||||
@@ -325,4 +330,118 @@ public class CassandraAccessor implements InitializingBean {
|
||||
|
||||
return getExceptionTranslator().translate(task, cql, ex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new arg-based PreparedStatementSetter using the args passed in. By default, we'll create an
|
||||
* {@link ArgumentPreparedStatementBinder}. This method allows for the creation to be overridden by subclasses.
|
||||
*
|
||||
* @param args object array with arguments
|
||||
* @return the new {@link PreparedStatementBinder} to use
|
||||
*/
|
||||
protected PreparedStatementBinder newPreparedStatementBinder(Object[] args) {
|
||||
return new ArgumentPreparedStatementBinder(args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new instance of the {@link ResultSetExtractor} initialized with and adapting the given
|
||||
* {@link RowCallbackHandler}.
|
||||
*
|
||||
* @param rowCallbackHandler {@link RowCallbackHandler} to adapt as a {@link ResultSetExtractor}.
|
||||
* @return a {@link ResultSetExtractor} implementation adapting an instance of the {@link RowCallbackHandler}.
|
||||
* @see AsyncCqlTemplate.RowCallbackHandlerResultSetExtractor
|
||||
* @see ResultSetExtractor
|
||||
* @see RowCallbackHandler
|
||||
*/
|
||||
protected RowCallbackHandlerResultSetExtractor newResultSetExtractor(RowCallbackHandler rowCallbackHandler) {
|
||||
return new RowCallbackHandlerResultSetExtractor(rowCallbackHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new instance of the {@link ResultSetExtractor} initialized with and adapting the given
|
||||
* {@link RowMapper}.
|
||||
*
|
||||
* @param rowMapper {@link RowMapper} to adapt as a {@link ResultSetExtractor}.
|
||||
* @return a {@link ResultSetExtractor} implementation adapting an instance of the {@link RowMapper}.
|
||||
* @see ResultSetExtractor
|
||||
* @see RowMapper
|
||||
* @see RowMapperResultSetExtractor
|
||||
*/
|
||||
protected <T> RowMapperResultSetExtractor<T> newResultSetExtractor(RowMapper<T> rowMapper) {
|
||||
return new RowMapperResultSetExtractor<>(rowMapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new instance of the {@link ResultSetExtractor} initialized with and adapting the given
|
||||
* {@link RowMapper}.
|
||||
*
|
||||
* @param rowMapper {@link RowMapper} to adapt as a {@link ResultSetExtractor}.
|
||||
* @param rowsExpected number of expected rows in the {@link ResultSet}.
|
||||
* @return a {@link ResultSetExtractor} implementation adapting an instance of the {@link RowMapper}.
|
||||
* @see ResultSetExtractor
|
||||
* @see RowMapper
|
||||
* @see RowMapperResultSetExtractor
|
||||
*/
|
||||
protected <T> RowMapperResultSetExtractor<T> newResultSetExtractor(RowMapper<T> rowMapper, int rowsExpected) {
|
||||
return new RowMapperResultSetExtractor<>(rowMapper, rowsExpected);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new RowMapper for reading columns as key-value pairs.
|
||||
*
|
||||
* @return the RowMapper to use
|
||||
* @see ColumnMapRowMapper
|
||||
*/
|
||||
protected RowMapper<Map<String, Object>> newColumnMapRowMapper() {
|
||||
return new ColumnMapRowMapper();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new RowMapper for reading result objects from a single column.
|
||||
*
|
||||
* @param requiredType the type that each result object is expected to match
|
||||
* @return the RowMapper to use
|
||||
* @see SingleColumnRowMapper
|
||||
*/
|
||||
protected <T> RowMapper<T> newSingleColumnRowMapper(Class<T> requiredType) {
|
||||
return SingleColumnRowMapper.newInstance(requiredType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine CQL from potential provider object.
|
||||
*
|
||||
* @param cqlProvider object that's potentially a {@link CqlProvider}
|
||||
* @return the CQL string, or {@code null}
|
||||
* @see CqlProvider
|
||||
*/
|
||||
protected static String toCql(Object cqlProvider) {
|
||||
return Optional.ofNullable(cqlProvider) //
|
||||
.filter(o -> o instanceof CqlProvider) //
|
||||
.map(o -> (CqlProvider) o) //
|
||||
.map(CqlProvider::getCql) //
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adapter to enable use of a {@link RowCallbackHandler} inside a {@link ResultSetExtractor}.
|
||||
*/
|
||||
protected static class RowCallbackHandlerResultSetExtractor implements ResultSetExtractor<Object> {
|
||||
|
||||
private final RowCallbackHandler rowCallbackHandler;
|
||||
|
||||
protected RowCallbackHandlerResultSetExtractor(RowCallbackHandler rowCallbackHandler) {
|
||||
this.rowCallbackHandler = rowCallbackHandler;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
*
|
||||
@see org.springframework.data.cassandra.core.cql.ResultSetExtractor#extractData(com.datastax.driver.core.ResultSet)
|
||||
*/
|
||||
@Override
|
||||
public Object extractData(ResultSet resultSet) {
|
||||
|
||||
StreamSupport.stream(resultSet.spliterator(), false).forEach(rowCallbackHandler::processRow);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Arrays;
|
||||
@@ -26,7 +26,7 @@ import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.dao.DataAccessResourceFailureException;
|
||||
import org.springframework.dao.TransientDataAccessResourceException;
|
||||
import org.springframework.dao.support.PersistenceExceptionTranslator;
|
||||
import org.springframework.data.cql.support.exception.*;
|
||||
import org.springframework.data.cassandra.*;
|
||||
import org.springframework.util.ClassUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@@ -73,7 +73,7 @@ public class CassandraExceptionTranslator implements CqlExceptionTranslator {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.support.CQLExceptionTranslator#translate(java.lang.String, java.lang.String, com.datastax.driver.core.exceptions.DriverException)
|
||||
* @see org.springframework.data.cassandra.cql.CQLExceptionTranslator#translate(java.lang.String, java.lang.String, com.datastax.driver.core.exceptions.DriverException)
|
||||
*/
|
||||
@Override
|
||||
public DataAccessException translate(String task, String cql, DriverException exception) {
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -42,7 +42,7 @@ import com.datastax.driver.core.Row;
|
||||
public class ColumnMapRowMapper implements RowMapper<Map<String, Object>> {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.RowMapper#mapRow(com.datastax.driver.core.Row, int)
|
||||
* @see org.springframework.data.cassandra.core.cql.RowMapper#mapRow(com.datastax.driver.core.Row, int)
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> mapRow(Row rs, int rowNum) {
|
||||
@@ -13,9 +13,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import static org.springframework.data.cql.core.CqlConstantType.Regex.*;
|
||||
import static org.springframework.data.cassandra.core.cql.CqlConstantType.Regex.*;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.support;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.dao.support.PersistenceExceptionTranslator;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
/**
|
||||
* Interface to be implemented by objects that can provide CQL strings.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import com.datastax.driver.core.DataType;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -23,7 +23,7 @@ import java.util.function.Function;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.dao.support.DataAccessUtils;
|
||||
import org.springframework.data.cql.core.session.SessionFactory;
|
||||
import org.springframework.data.cassandra.SessionFactory;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import com.datastax.driver.core.BoundStatement;
|
||||
@@ -58,7 +58,7 @@ import com.datastax.driver.core.exceptions.DriverException;
|
||||
* it.
|
||||
* <p>
|
||||
* All CQL operations performed by this class are logged at debug level, using
|
||||
* "org.springframework.data.cql.core.CqlTemplate" as log category.
|
||||
* "org.springframework.data.cassandra.core.cqlTemplate" as log category.
|
||||
* <p>
|
||||
* <b>NOTE: An instance of this class is thread-safe once configured.</b>
|
||||
*
|
||||
@@ -76,7 +76,7 @@ import com.datastax.driver.core.exceptions.DriverException;
|
||||
* @see RowMapper
|
||||
* @see org.springframework.dao.support.PersistenceExceptionTranslator
|
||||
*/
|
||||
public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
public class CqlTemplate extends CassandraAccessor implements CqlOperations {
|
||||
|
||||
/**
|
||||
* Create a new, uninitialized {@link CqlTemplate}. Note: The {@link SessionFactory} has to be set before using the
|
||||
@@ -119,7 +119,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#execute(org.springframework.data.cql.core.SessionCallback)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#execute(org.springframework.data.cassandra.core.cql.SessionCallback)
|
||||
*/
|
||||
@Override
|
||||
public <T> T execute(SessionCallback<T> action) throws DataAccessException {
|
||||
@@ -139,7 +139,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#execute(java.lang.String)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#execute(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(String cql) throws DataAccessException {
|
||||
@@ -151,7 +151,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(java.lang.String, org.springframework.data.cql.core.ResultSetExtractor)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.ResultSetExtractor)
|
||||
*/
|
||||
@Override
|
||||
public <T> T query(String cql, ResultSetExtractor<T> resultSetExtractor) throws DataAccessException {
|
||||
@@ -176,7 +176,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(java.lang.String, org.springframework.data.cql.core.RowCallbackHandler)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.RowCallbackHandler)
|
||||
*/
|
||||
@Override
|
||||
public void query(String cql, RowCallbackHandler rowCallbackHandler) throws DataAccessException {
|
||||
@@ -185,7 +185,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(java.lang.String, org.springframework.data.cql.core.RowMapper)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.RowMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> List<T> query(String cql, RowMapper<T> rowMapper) throws DataAccessException {
|
||||
@@ -194,7 +194,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForList(java.lang.String)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForList(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryForList(String cql) throws DataAccessException {
|
||||
@@ -203,7 +203,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForList(java.lang.String, java.lang.Class)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForList(java.lang.String, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> List<T> queryForList(String cql, Class<T> elementType) throws DataAccessException {
|
||||
@@ -212,7 +212,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForMap(java.lang.String)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForMap(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> queryForMap(String cql) throws DataAccessException {
|
||||
@@ -221,7 +221,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForObject(java.lang.String, java.lang.Class)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForObject(java.lang.String, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> T queryForObject(String cql, Class<T> requiredType) throws DataAccessException {
|
||||
@@ -230,7 +230,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForObject(java.lang.String, org.springframework.data.cql.core.RowMapper)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForObject(java.lang.String, org.springframework.data.cassandra.core.cql.RowMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> T queryForObject(String cql, RowMapper<T> rowMapper) throws DataAccessException {
|
||||
@@ -239,7 +239,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForResultSet(java.lang.String)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForResultSet(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public ResultSet queryForResultSet(String cql) throws DataAccessException {
|
||||
@@ -248,7 +248,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForRows(java.lang.String)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForRows(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Iterable<Row> queryForRows(String cql) throws DataAccessException {
|
||||
@@ -261,7 +261,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#execute(com.datastax.driver.core.Statement)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#execute(com.datastax.driver.core.Statement)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(Statement statement) throws DataAccessException {
|
||||
@@ -273,7 +273,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(com.datastax.driver.core.Statement, org.springframework.data.cql.core.ResultSetExtractor)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(com.datastax.driver.core.Statement, org.springframework.data.cassandra.core.cql.ResultSetExtractor)
|
||||
*/
|
||||
@Override
|
||||
public <T> T query(Statement statement, ResultSetExtractor<T> resultSetExtractor) throws DataAccessException {
|
||||
@@ -294,7 +294,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(com.datastax.driver.core.Statement, org.springframework.data.cql.core.RowCallbackHandler)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(com.datastax.driver.core.Statement, org.springframework.data.cassandra.core.cql.RowCallbackHandler)
|
||||
*/
|
||||
@Override
|
||||
public void query(Statement statement, RowCallbackHandler rowCallbackHandler) throws DataAccessException {
|
||||
@@ -303,7 +303,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(com.datastax.driver.core.Statement, org.springframework.data.cql.core.RowMapper)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(com.datastax.driver.core.Statement, org.springframework.data.cassandra.core.cql.RowMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> List<T> query(Statement statement, RowMapper<T> rowMapper) throws DataAccessException {
|
||||
@@ -312,7 +312,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForList(com.datastax.driver.core.Statement)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForList(com.datastax.driver.core.Statement)
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryForList(Statement statement) throws DataAccessException {
|
||||
@@ -321,7 +321,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForList(com.datastax.driver.core.Statement, java.lang.Class)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForList(com.datastax.driver.core.Statement, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> List<T> queryForList(Statement statement, Class<T> elementType) throws DataAccessException {
|
||||
@@ -330,7 +330,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForMap(com.datastax.driver.core.Statement)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForMap(com.datastax.driver.core.Statement)
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> queryForMap(Statement statement) throws DataAccessException {
|
||||
@@ -339,7 +339,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForObject(com.datastax.driver.core.Statement, java.lang.Class)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForObject(com.datastax.driver.core.Statement, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> T queryForObject(Statement statement, Class<T> requiredType) throws DataAccessException {
|
||||
@@ -348,7 +348,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForObject(com.datastax.driver.core.Statement, org.springframework.data.cql.core.RowMapper)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForObject(com.datastax.driver.core.Statement, org.springframework.data.cassandra.core.cql.RowMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> T queryForObject(Statement statement, RowMapper<T> rowMapper) throws DataAccessException {
|
||||
@@ -357,7 +357,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForResultSet(com.datastax.driver.core.Statement)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForResultSet(com.datastax.driver.core.Statement)
|
||||
*/
|
||||
@Override
|
||||
public ResultSet queryForResultSet(Statement statement) throws DataAccessException {
|
||||
@@ -366,7 +366,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForRows(com.datastax.driver.core.Statement)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForRows(com.datastax.driver.core.Statement)
|
||||
*/
|
||||
@Override
|
||||
public Iterable<Row> queryForRows(Statement statement) throws DataAccessException {
|
||||
@@ -379,7 +379,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#execute(java.lang.String, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#execute(java.lang.String, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(String cql, Object... args) throws DataAccessException {
|
||||
@@ -388,7 +388,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#execute(java.lang.String, org.springframework.data.cql.core.PreparedStatementBinder)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#execute(java.lang.String, org.springframework.data.cassandra.core.cql.PreparedStatementBinder)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(String cql, PreparedStatementBinder preparedStatementBinder) throws DataAccessException {
|
||||
@@ -397,7 +397,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#execute(java.lang.String, org.springframework.data.cql.core.PreparedStatementCallback)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#execute(java.lang.String, org.springframework.data.cassandra.core.cql.PreparedStatementCallback)
|
||||
*/
|
||||
@Override
|
||||
public <T> T execute(String cql, PreparedStatementCallback<T> action) throws DataAccessException {
|
||||
@@ -406,7 +406,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#execute(org.springframework.data.cql.core.PreparedStatementCreator)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#execute(org.springframework.data.cassandra.core.cql.PreparedStatementCreator)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(PreparedStatementCreator preparedStatementCreator) throws DataAccessException {
|
||||
@@ -415,7 +415,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#execute(org.springframework.data.cql.core.PreparedStatementCreator, org.springframework.data.cql.core.PreparedStatementCallback)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#execute(org.springframework.data.cassandra.core.cql.PreparedStatementCreator, org.springframework.data.cassandra.core.cql.PreparedStatementCallback)
|
||||
*/
|
||||
@Override
|
||||
public <T> T execute(PreparedStatementCreator preparedStatementCreator, PreparedStatementCallback<T> action)
|
||||
@@ -441,7 +441,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(org.springframework.data.cql.core.PreparedStatementCreator, org.springframework.data.cql.core.ResultSetExtractor)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(org.springframework.data.cassandra.core.cql.PreparedStatementCreator, org.springframework.data.cassandra.core.cql.ResultSetExtractor)
|
||||
*/
|
||||
@Override
|
||||
public <T> T query(PreparedStatementCreator preparedStatementCreator, ResultSetExtractor<T> resultSetExtractor)
|
||||
@@ -452,7 +452,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(org.springframework.data.cql.core.PreparedStatementCreator, org.springframework.data.cql.core.RowCallbackHandler)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(org.springframework.data.cassandra.core.cql.PreparedStatementCreator, org.springframework.data.cassandra.core.cql.RowCallbackHandler)
|
||||
*/
|
||||
@Override
|
||||
public void query(PreparedStatementCreator preparedStatementCreator, RowCallbackHandler rowCallbackHandler)
|
||||
@@ -463,7 +463,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(org.springframework.data.cql.core.PreparedStatementCreator, org.springframework.data.cql.core.RowMapper)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(org.springframework.data.cassandra.core.cql.PreparedStatementCreator, org.springframework.data.cassandra.core.cql.RowMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> List<T> query(PreparedStatementCreator preparedStatementCreator, RowMapper<T> rowMapper)
|
||||
@@ -474,7 +474,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(org.springframework.data.cql.core.PreparedStatementCreator, org.springframework.data.cql.core.PreparedStatementBinder, org.springframework.data.cql.core.ResultSetExtractor)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(org.springframework.data.cassandra.core.cql.PreparedStatementCreator, org.springframework.data.cassandra.core.cql.PreparedStatementBinder, org.springframework.data.cassandra.core.cql.ResultSetExtractor)
|
||||
*/
|
||||
@Override
|
||||
public <T> T query(PreparedStatementCreator preparedStatementCreator, PreparedStatementBinder preparedStatementBinder,
|
||||
@@ -510,7 +510,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(org.springframework.data.cql.core.PreparedStatementCreator, org.springframework.data.cql.core.PreparedStatementBinder, org.springframework.data.cql.core.RowCallbackHandler)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(org.springframework.data.cassandra.core.cql.PreparedStatementCreator, org.springframework.data.cassandra.core.cql.PreparedStatementBinder, org.springframework.data.cassandra.core.cql.RowCallbackHandler)
|
||||
*/
|
||||
@Override
|
||||
public void query(PreparedStatementCreator preparedStatementCreator, PreparedStatementBinder preparedStatementBinder,
|
||||
@@ -521,7 +521,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(org.springframework.data.cql.core.PreparedStatementCreator, org.springframework.data.cql.core.PreparedStatementBinder, org.springframework.data.cql.core.RowMapper)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(org.springframework.data.cassandra.core.cql.PreparedStatementCreator, org.springframework.data.cassandra.core.cql.PreparedStatementBinder, org.springframework.data.cassandra.core.cql.RowMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> List<T> query(PreparedStatementCreator preparedStatementCreator,
|
||||
@@ -532,7 +532,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(java.lang.String, org.springframework.data.cql.core.ResultSetExtractor, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.ResultSetExtractor, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> T query(String cql, ResultSetExtractor<T> resultSetExtractor, Object... args) throws DataAccessException {
|
||||
@@ -542,7 +542,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(java.lang.String, org.springframework.data.cql.core.RowCallbackHandler, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.RowCallbackHandler, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public void query(String cql, RowCallbackHandler rowCallbackHandler, Object... args) throws DataAccessException {
|
||||
@@ -552,7 +552,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(java.lang.String, org.springframework.data.cql.core.RowMapper, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.RowMapper, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> List<T> query(String cql, RowMapper<T> rowMapper, Object... args) throws DataAccessException {
|
||||
@@ -561,7 +561,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(java.lang.String, org.springframework.data.cql.core.PreparedStatementBinder, org.springframework.data.cql.core.ResultSetExtractor)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.PreparedStatementBinder, org.springframework.data.cassandra.core.cql.ResultSetExtractor)
|
||||
*/
|
||||
@Override
|
||||
public <T> T query(String cql, PreparedStatementBinder preparedStatementBinder,
|
||||
@@ -572,7 +572,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(java.lang.String, org.springframework.data.cql.core.PreparedStatementBinder, org.springframework.data.cql.core.RowCallbackHandler)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.PreparedStatementBinder, org.springframework.data.cassandra.core.cql.RowCallbackHandler)
|
||||
*/
|
||||
@Override
|
||||
public void query(String cql, PreparedStatementBinder preparedStatementBinder, RowCallbackHandler rowCallbackHandler)
|
||||
@@ -583,7 +583,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#query(java.lang.String, org.springframework.data.cql.core.PreparedStatementBinder, org.springframework.data.cql.core.RowMapper)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.PreparedStatementBinder, org.springframework.data.cassandra.core.cql.RowMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> List<T> query(String cql, PreparedStatementBinder preparedStatementBinder, RowMapper<T> rowMapper)
|
||||
@@ -594,7 +594,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForList(java.lang.String, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForList(java.lang.String, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryForList(String cql, Object... args) throws DataAccessException {
|
||||
@@ -604,7 +604,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForList(java.lang.String, java.lang.Class, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForList(java.lang.String, java.lang.Class, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> List<T> queryForList(String cql, Class<T> elementType, Object... args) throws DataAccessException {
|
||||
@@ -614,7 +614,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForMap(java.lang.String, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForMap(java.lang.String, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> queryForMap(String cql, Object... args) throws DataAccessException {
|
||||
@@ -623,7 +623,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForObject(java.lang.String, java.lang.Class, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForObject(java.lang.String, java.lang.Class, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> T queryForObject(String cql, Class<T> requiredType, Object... args) throws DataAccessException {
|
||||
@@ -632,7 +632,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForObject(java.lang.String, org.springframework.data.cql.core.RowMapper, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForObject(java.lang.String, org.springframework.data.cassandra.core.cql.RowMapper, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> T queryForObject(String cql, RowMapper<T> rowMapper, Object... args) throws DataAccessException {
|
||||
@@ -642,7 +642,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForResultSet(java.lang.String, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForResultSet(java.lang.String, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public ResultSet queryForResultSet(String cql, Object... args) throws DataAccessException {
|
||||
@@ -651,7 +651,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#queryForRows(java.lang.String, java.lang.Object[])
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#queryForRows(java.lang.String, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public Iterable<Row> queryForRows(String cql, Object... args) throws DataAccessException {
|
||||
@@ -660,7 +660,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#describeRing()
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#describeRing()
|
||||
*/
|
||||
@Override
|
||||
public List<RingMember> describeRing() throws DataAccessException {
|
||||
@@ -669,7 +669,7 @@ public class CqlTemplate extends CqlTemplateSupport implements CqlOperations {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.cql.core.CqlOperations#describeRing(org.springframework.data.cql.core.HostMapper)
|
||||
* @see org.springframework.data.cassandra.core.cqlOperations#describeRing(org.springframework.data.cassandra.core.cql.HostMapper)
|
||||
*/
|
||||
@Override
|
||||
public <T> Collection<T> describeRing(HostMapper<T> hostMapper) throws DataAccessException {
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -1,4 +1,19 @@
|
||||
package org.springframework.data.cql.support.exception;
|
||||
/*
|
||||
* Copyright 2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import org.springframework.dao.DataRetrievalFailureException;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.cql.core;
|
||||
package org.springframework.data.cassandra.core.cql;
|
||||
|
||||
import com.datastax.driver.core.BoundStatement;
|
||||
import com.datastax.driver.core.PreparedStatement;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user