rename @RowId to @PrimaryKey same as in CQL3

This commit is contained in:
Alex Shvid
2013-12-02 16:15:43 -08:00
parent a40f717459
commit b0b1a6e926
4 changed files with 6 additions and 6 deletions

View File

@@ -61,7 +61,7 @@ public class BasicCassandraPersistentProperty extends AnnotationBasedPersistentP
return true;
}
return getField().isAnnotationPresent(RowId.class);
return getField().isAnnotationPresent(PrimaryKey.class);
}
/**

View File

@@ -30,5 +30,5 @@ import org.springframework.data.annotation.Id;
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = { ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE })
@Id
public @interface RowId {
public @interface PrimaryKey {
}

View File

@@ -15,7 +15,7 @@
*/
package org.springframework.data.cassandra.test.integration.table;
import org.springframework.data.cassandra.mapping.RowId;
import org.springframework.data.cassandra.mapping.PrimaryKey;
import org.springframework.data.cassandra.mapping.Table;
/**
@@ -27,7 +27,7 @@ import org.springframework.data.cassandra.mapping.Table;
@Table(name = "book")
public class Book {
@RowId
@PrimaryKey
private String isbn;
private String title;

View File

@@ -19,7 +19,7 @@ import java.util.Date;
import org.springframework.data.annotation.Id;
import org.springframework.data.cassandra.mapping.Column;
import org.springframework.data.cassandra.mapping.RowId;
import org.springframework.data.cassandra.mapping.PrimaryKey;
import org.springframework.data.cassandra.mapping.Table;
/**
@@ -37,7 +37,7 @@ public class LogEntry {
/*
* Primary Row ID
*/
@RowId
@PrimaryKey
private Date logDate;
private String hostname;