File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
spring-data-cassandra/src/main/java/org/springframework/data/cassandra Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ package org .springframework .data .cassandra .exception ;
2
+
3
+ import org .springframework .dao .InvalidDataAccessApiUsageException ;
4
+
5
+ public class UnsupportedCassandraOperationException extends InvalidDataAccessApiUsageException {
6
+
7
+ private static final long serialVersionUID = 4921001859094231277L ;
8
+
9
+ public UnsupportedCassandraOperationException (String msg ) {
10
+ super (msg );
11
+ }
12
+
13
+ public UnsupportedCassandraOperationException (String msg , Throwable cause ) {
14
+ super (msg , cause );
15
+ }
16
+ }
Original file line number Diff line number Diff line change 20
20
import org .springframework .context .ApplicationContextAware ;
21
21
import org .springframework .context .expression .BeanFactoryAccessor ;
22
22
import org .springframework .context .expression .BeanFactoryResolver ;
23
+ import org .springframework .data .cassandra .exception .UnsupportedCassandraOperationException ;
23
24
import org .springframework .data .cassandra .util .CassandraNamingUtils ;
25
+ import org .springframework .data .mapping .Association ;
26
+ import org .springframework .data .mapping .AssociationHandler ;
24
27
import org .springframework .data .mapping .model .BasicPersistentEntity ;
25
28
import org .springframework .data .util .TypeInformation ;
26
29
import org .springframework .expression .Expression ;
@@ -69,6 +72,16 @@ protected void determineTableName() {
69
72
.getPreferredTableName (type );
70
73
}
71
74
75
+ @ Override
76
+ public void addAssociation (Association <CassandraPersistentProperty > association ) {
77
+ throw new UnsupportedCassandraOperationException ("Cassandra does not support associations" );
78
+ }
79
+
80
+ @ Override
81
+ public void doWithAssociations (AssociationHandler <CassandraPersistentProperty > handler ) {
82
+ throw new UnsupportedCassandraOperationException ("Cassandra does not support associations" );
83
+ }
84
+
72
85
@ Override
73
86
public void setApplicationContext (ApplicationContext applicationContext ) throws BeansException {
74
87
You can’t perform that action at this time.
0 commit comments