SHA256
19 12 25
Ещё поправил мелкие детали в библиотеке работы с БД
This commit is contained in:
@@ -7,7 +7,9 @@ package shine.db.entities;
|
||||
* - login TEXT NOT NULL
|
||||
* - bchName TEXT NOT NULL (идёт сразу после login)
|
||||
* - to_login TEXT nullable
|
||||
* - toBchName TEXT NOT NULL (идёт сразу после to_login)
|
||||
* - toBchName TEXT nullable
|
||||
* - toBlockGlobalNumber INTEGER nullable
|
||||
* - toBlockHashe TEXT nullable
|
||||
*
|
||||
* PRIMARY KEY пока убран вообще.
|
||||
*/
|
||||
@@ -28,9 +30,9 @@ public class BlockEntry {
|
||||
private byte[] blockByte; // BLOB
|
||||
|
||||
private String toLogin; // TEXT nullable
|
||||
private String toBchName; // TEXT
|
||||
private int toBlockGlobalNumber; // int32
|
||||
private String toBlockHashe; // TEXT
|
||||
private String toBchName; // TEXT nullable
|
||||
private Integer toBlockGlobalNumber; // INTEGER nullable
|
||||
private String toBlockHashe; // TEXT nullable
|
||||
|
||||
public BlockEntry() {}
|
||||
|
||||
@@ -45,7 +47,7 @@ public class BlockEntry {
|
||||
byte[] blockByte,
|
||||
String toLogin,
|
||||
String toBchName,
|
||||
int toBlockGlobalNumber,
|
||||
Integer toBlockGlobalNumber,
|
||||
String toBlockHashe) {
|
||||
this.login = login;
|
||||
this.bchName = bchName;
|
||||
@@ -95,8 +97,8 @@ public class BlockEntry {
|
||||
public String getToBchName() { return toBchName; }
|
||||
public void setToBchName(String toBchName) { this.toBchName = toBchName; }
|
||||
|
||||
public int getToBlockGlobalNumber() { return toBlockGlobalNumber; }
|
||||
public void setToBlockGlobalNumber(int toBlockGlobalNumber) { this.toBlockGlobalNumber = toBlockGlobalNumber; }
|
||||
public Integer getToBlockGlobalNumber() { return toBlockGlobalNumber; }
|
||||
public void setToBlockGlobalNumber(Integer toBlockGlobalNumber) { this.toBlockGlobalNumber = toBlockGlobalNumber; }
|
||||
|
||||
public String getToBlockHashe() { return toBlockHashe; }
|
||||
public void setToBlockHashe(String toBlockHashe) { this.toBlockHashe = toBlockHashe; }
|
||||
|
||||
@@ -4,13 +4,13 @@ import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Агрегатная сущность текущего состояния блокчейна.
|
||||
* 1 строка = 1 blockchainId, плюс состояние линий 0..7.
|
||||
* 1 строка = 1 blockchainName, плюс состояние линий 0..7.
|
||||
*/
|
||||
public final class BlockchainStateEntry {
|
||||
|
||||
private long blockchainId;
|
||||
private String blockchainName;
|
||||
|
||||
private String userLogin;
|
||||
private String login;
|
||||
private String publicKeyBase64;
|
||||
|
||||
private int sizeLimit;
|
||||
@@ -35,8 +35,8 @@ public final class BlockchainStateEntry {
|
||||
this.lastGlobalHash = "";
|
||||
}
|
||||
|
||||
public BlockchainStateEntry(long blockchainId,
|
||||
String userLogin,
|
||||
public BlockchainStateEntry(String blockchainName,
|
||||
String login,
|
||||
String publicKeyBase64,
|
||||
int sizeLimit,
|
||||
int sizeBytes,
|
||||
@@ -46,8 +46,8 @@ public final class BlockchainStateEntry {
|
||||
int[] lastLineNumbers,
|
||||
String[] lastLineHashes,
|
||||
long updatedAtMs) {
|
||||
this.blockchainId = blockchainId;
|
||||
this.userLogin = userLogin;
|
||||
this.blockchainName = blockchainName;
|
||||
this.login = login;
|
||||
this.publicKeyBase64 = publicKeyBase64;
|
||||
this.sizeLimit = sizeLimit;
|
||||
this.sizeBytes = sizeBytes;
|
||||
@@ -69,11 +69,11 @@ public final class BlockchainStateEntry {
|
||||
this.updatedAtMs = updatedAtMs;
|
||||
}
|
||||
|
||||
public long getBlockchainId() { return blockchainId; }
|
||||
public void setBlockchainId(long blockchainId) { this.blockchainId = blockchainId; }
|
||||
public String getBlockchainName() { return blockchainName; }
|
||||
public void setBlockchainName(String blockchainName) { this.blockchainName = blockchainName; }
|
||||
|
||||
public String getUserLogin() { return userLogin; }
|
||||
public void setUserLogin(String userLogin) { this.userLogin = userLogin; }
|
||||
public String getLogin() { return login; }
|
||||
public void setLogin(String login) { this.login = login; }
|
||||
|
||||
public String getPublicKeyBase64() { return publicKeyBase64; }
|
||||
public void setPublicKeyBase64(String publicKeyBase64) { this.publicKeyBase64 = publicKeyBase64; }
|
||||
|
||||
Reference in New Issue
Block a user