-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#29 сделал возможность составного ключа с генерацией long integer внутри
- Loading branch information
1 parent
b825829
commit 5f95515
Showing
8 changed files
with
104 additions
and
24 deletions.
There are no files selected for viewing
16 changes: 13 additions & 3 deletions
16
src/main/java/apps/amaralus/qa/platform/dataset/model/AliasModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
package apps.amaralus.qa.platform.dataset.model; | ||
|
||
import apps.amaralus.qa.platform.rocksdb.key.CompoundKey; | ||
import apps.amaralus.qa.platform.rocksdb.sequence.GeneratedSequence; | ||
import lombok.Data; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.springframework.data.annotation.Id; | ||
import org.springframework.data.keyvalue.annotation.KeySpace; | ||
|
||
@Data | ||
@KeySpace("alias") | ||
//todo сделать составной ключ name+project | ||
public class AliasModel { | ||
|
||
@Id | ||
@GeneratedSequence("alias-sequence") | ||
private long id; | ||
private Key key; | ||
private String name; | ||
private long dataset; | ||
private String propertyName; | ||
private String project; | ||
|
||
@Getter | ||
@Setter | ||
@CompoundKey | ||
public static final class Key { | ||
long id; | ||
String project; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/main/java/apps/amaralus/qa/platform/rocksdb/key/CompoundKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package apps.amaralus.qa.platform.rocksdb.key; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
import static java.lang.annotation.ElementType.TYPE; | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(value = TYPE) | ||
public @interface CompoundKey { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters