Showing
8 changed files
with
18 additions
and
18 deletions
@@ -68,7 +68,7 @@ CREATE TABLE IF NOT EXISTS thingsboard.rule_chain ( | @@ -68,7 +68,7 @@ CREATE TABLE IF NOT EXISTS thingsboard.rule_chain ( | ||
68 | name text, | 68 | name text, |
69 | search_text text, | 69 | search_text text, |
70 | first_rule_node_id uuid, | 70 | first_rule_node_id uuid, |
71 | - is_root boolean, | 71 | + root boolean, |
72 | configuration text, | 72 | configuration text, |
73 | additional_info text, | 73 | additional_info text, |
74 | PRIMARY KEY (id, tenant_id) | 74 | PRIMARY KEY (id, tenant_id) |
@@ -20,7 +20,7 @@ CREATE TABLE IF NOT EXISTS rule_chain ( | @@ -20,7 +20,7 @@ CREATE TABLE IF NOT EXISTS rule_chain ( | ||
20 | configuration varchar(10000000), | 20 | configuration varchar(10000000), |
21 | name varchar(255), | 21 | name varchar(255), |
22 | first_rule_node_id varchar(31), | 22 | first_rule_node_id varchar(31), |
23 | - is_root boolean, | 23 | + root boolean, |
24 | search_text varchar(255), | 24 | search_text varchar(255), |
25 | tenant_id varchar(31) | 25 | tenant_id varchar(31) |
26 | ); | 26 | ); |
@@ -36,7 +36,7 @@ public class RuleChain extends SearchTextBasedWithAdditionalInfo<RuleChainId> im | @@ -36,7 +36,7 @@ public class RuleChain extends SearchTextBasedWithAdditionalInfo<RuleChainId> im | ||
36 | private TenantId tenantId; | 36 | private TenantId tenantId; |
37 | private String name; | 37 | private String name; |
38 | private RuleNodeId firstRuleNodeId; | 38 | private RuleNodeId firstRuleNodeId; |
39 | - private boolean isRoot; | 39 | + private boolean root; |
40 | private transient JsonNode configuration; | 40 | private transient JsonNode configuration; |
41 | @JsonIgnore | 41 | @JsonIgnore |
42 | private byte[] configurationBytes; | 42 | private byte[] configurationBytes; |
@@ -54,7 +54,7 @@ public class RuleChain extends SearchTextBasedWithAdditionalInfo<RuleChainId> im | @@ -54,7 +54,7 @@ public class RuleChain extends SearchTextBasedWithAdditionalInfo<RuleChainId> im | ||
54 | this.tenantId = ruleChain.getTenantId(); | 54 | this.tenantId = ruleChain.getTenantId(); |
55 | this.name = ruleChain.getName(); | 55 | this.name = ruleChain.getName(); |
56 | this.firstRuleNodeId = ruleChain.getFirstRuleNodeId(); | 56 | this.firstRuleNodeId = ruleChain.getFirstRuleNodeId(); |
57 | - this.isRoot = ruleChain.isRoot(); | 57 | + this.root = ruleChain.isRoot(); |
58 | this.setConfiguration(ruleChain.getConfiguration()); | 58 | this.setConfiguration(ruleChain.getConfiguration()); |
59 | } | 59 | } |
60 | 60 |
@@ -339,7 +339,7 @@ public class ModelConstants { | @@ -339,7 +339,7 @@ public class ModelConstants { | ||
339 | public static final String RULE_CHAIN_TENANT_ID_PROPERTY = TENANT_ID_PROPERTY; | 339 | public static final String RULE_CHAIN_TENANT_ID_PROPERTY = TENANT_ID_PROPERTY; |
340 | public static final String RULE_CHAIN_NAME_PROPERTY = "name"; | 340 | public static final String RULE_CHAIN_NAME_PROPERTY = "name"; |
341 | public static final String RULE_CHAIN_FIRST_RULE_NODE_ID_PROPERTY = "first_rule_node_id"; | 341 | public static final String RULE_CHAIN_FIRST_RULE_NODE_ID_PROPERTY = "first_rule_node_id"; |
342 | - public static final String RULE_CHAIN_IS_ROOT_PROPERTY = "is_root"; | 342 | + public static final String RULE_CHAIN_ROOT_PROPERTY = "root"; |
343 | public static final String RULE_CHAIN_CONFIGURATION_PROPERTY = "configuration"; | 343 | public static final String RULE_CHAIN_CONFIGURATION_PROPERTY = "configuration"; |
344 | 344 | ||
345 | public static final String RULE_CHAIN_BY_TENANT_AND_SEARCH_TEXT_COLUMN_FAMILY_NAME = "rule_chain_by_tenant_and_search_text"; | 345 | public static final String RULE_CHAIN_BY_TENANT_AND_SEARCH_TEXT_COLUMN_FAMILY_NAME = "rule_chain_by_tenant_and_search_text"; |
@@ -52,8 +52,8 @@ public class RuleChainEntity implements SearchTextEntity<RuleChain> { | @@ -52,8 +52,8 @@ public class RuleChainEntity implements SearchTextEntity<RuleChain> { | ||
52 | private String searchText; | 52 | private String searchText; |
53 | @Column(name = RULE_CHAIN_FIRST_RULE_NODE_ID_PROPERTY) | 53 | @Column(name = RULE_CHAIN_FIRST_RULE_NODE_ID_PROPERTY) |
54 | private UUID firstRuleNodeId; | 54 | private UUID firstRuleNodeId; |
55 | - @Column(name = RULE_CHAIN_IS_ROOT_PROPERTY) | ||
56 | - private boolean isRoot; | 55 | + @Column(name = RULE_CHAIN_ROOT_PROPERTY) |
56 | + private boolean root; | ||
57 | @Column(name = RULE_CHAIN_CONFIGURATION_PROPERTY, codec = JsonCodec.class) | 57 | @Column(name = RULE_CHAIN_CONFIGURATION_PROPERTY, codec = JsonCodec.class) |
58 | private JsonNode configuration; | 58 | private JsonNode configuration; |
59 | @Column(name = ADDITIONAL_INFO_PROPERTY, codec = JsonCodec.class) | 59 | @Column(name = ADDITIONAL_INFO_PROPERTY, codec = JsonCodec.class) |
@@ -70,7 +70,7 @@ public class RuleChainEntity implements SearchTextEntity<RuleChain> { | @@ -70,7 +70,7 @@ public class RuleChainEntity implements SearchTextEntity<RuleChain> { | ||
70 | this.name = ruleChain.getName(); | 70 | this.name = ruleChain.getName(); |
71 | this.searchText = ruleChain.getName(); | 71 | this.searchText = ruleChain.getName(); |
72 | this.firstRuleNodeId = DaoUtil.getId(ruleChain.getFirstRuleNodeId()); | 72 | this.firstRuleNodeId = DaoUtil.getId(ruleChain.getFirstRuleNodeId()); |
73 | - this.isRoot = ruleChain.isRoot(); | 73 | + this.root = ruleChain.isRoot(); |
74 | this.configuration = ruleChain.getConfiguration(); | 74 | this.configuration = ruleChain.getConfiguration(); |
75 | this.additionalInfo = ruleChain.getAdditionalInfo(); | 75 | this.additionalInfo = ruleChain.getAdditionalInfo(); |
76 | } | 76 | } |
@@ -120,11 +120,11 @@ public class RuleChainEntity implements SearchTextEntity<RuleChain> { | @@ -120,11 +120,11 @@ public class RuleChainEntity implements SearchTextEntity<RuleChain> { | ||
120 | } | 120 | } |
121 | 121 | ||
122 | public boolean isRoot() { | 122 | public boolean isRoot() { |
123 | - return isRoot; | 123 | + return root; |
124 | } | 124 | } |
125 | 125 | ||
126 | - public void setRoot(boolean isRoot) { | ||
127 | - this.isRoot = isRoot; | 126 | + public void setRoot(boolean root) { |
127 | + this.root = root; | ||
128 | } | 128 | } |
129 | 129 | ||
130 | public String getSearchText() { | 130 | public String getSearchText() { |
@@ -156,7 +156,7 @@ public class RuleChainEntity implements SearchTextEntity<RuleChain> { | @@ -156,7 +156,7 @@ public class RuleChainEntity implements SearchTextEntity<RuleChain> { | ||
156 | if (this.firstRuleNodeId != null) { | 156 | if (this.firstRuleNodeId != null) { |
157 | ruleChain.setFirstRuleNodeId(new RuleNodeId(this.firstRuleNodeId)); | 157 | ruleChain.setFirstRuleNodeId(new RuleNodeId(this.firstRuleNodeId)); |
158 | } | 158 | } |
159 | - ruleChain.setRoot(this.isRoot); | 159 | + ruleChain.setRoot(this.root); |
160 | ruleChain.setConfiguration(this.configuration); | 160 | ruleChain.setConfiguration(this.configuration); |
161 | ruleChain.setAdditionalInfo(this.additionalInfo); | 161 | ruleChain.setAdditionalInfo(this.additionalInfo); |
162 | return ruleChain; | 162 | return ruleChain; |
@@ -55,8 +55,8 @@ public class RuleChainEntity extends BaseSqlEntity<RuleChain> implements SearchT | @@ -55,8 +55,8 @@ public class RuleChainEntity extends BaseSqlEntity<RuleChain> implements SearchT | ||
55 | @Column(name = ModelConstants.RULE_CHAIN_FIRST_RULE_NODE_ID_PROPERTY) | 55 | @Column(name = ModelConstants.RULE_CHAIN_FIRST_RULE_NODE_ID_PROPERTY) |
56 | private String firstRuleNodeId; | 56 | private String firstRuleNodeId; |
57 | 57 | ||
58 | - @Column(name = ModelConstants.RULE_CHAIN_IS_ROOT_PROPERTY) | ||
59 | - private boolean isRoot; | 58 | + @Column(name = ModelConstants.RULE_CHAIN_ROOT_PROPERTY) |
59 | + private boolean root; | ||
60 | 60 | ||
61 | @Type(type = "json") | 61 | @Type(type = "json") |
62 | @Column(name = ModelConstants.RULE_CHAIN_CONFIGURATION_PROPERTY) | 62 | @Column(name = ModelConstants.RULE_CHAIN_CONFIGURATION_PROPERTY) |
@@ -79,7 +79,7 @@ public class RuleChainEntity extends BaseSqlEntity<RuleChain> implements SearchT | @@ -79,7 +79,7 @@ public class RuleChainEntity extends BaseSqlEntity<RuleChain> implements SearchT | ||
79 | if (ruleChain.getFirstRuleNodeId() != null) { | 79 | if (ruleChain.getFirstRuleNodeId() != null) { |
80 | this.firstRuleNodeId = UUIDConverter.fromTimeUUID(ruleChain.getFirstRuleNodeId().getId()); | 80 | this.firstRuleNodeId = UUIDConverter.fromTimeUUID(ruleChain.getFirstRuleNodeId().getId()); |
81 | } | 81 | } |
82 | - this.isRoot = ruleChain.isRoot(); | 82 | + this.root = ruleChain.isRoot(); |
83 | this.configuration = ruleChain.getConfiguration(); | 83 | this.configuration = ruleChain.getConfiguration(); |
84 | this.additionalInfo = ruleChain.getAdditionalInfo(); | 84 | this.additionalInfo = ruleChain.getAdditionalInfo(); |
85 | } | 85 | } |
@@ -103,7 +103,7 @@ public class RuleChainEntity extends BaseSqlEntity<RuleChain> implements SearchT | @@ -103,7 +103,7 @@ public class RuleChainEntity extends BaseSqlEntity<RuleChain> implements SearchT | ||
103 | if (firstRuleNodeId != null) { | 103 | if (firstRuleNodeId != null) { |
104 | ruleChain.setFirstRuleNodeId(new RuleNodeId(UUIDConverter.fromString(firstRuleNodeId))); | 104 | ruleChain.setFirstRuleNodeId(new RuleNodeId(UUIDConverter.fromString(firstRuleNodeId))); |
105 | } | 105 | } |
106 | - ruleChain.setRoot(isRoot); | 106 | + ruleChain.setRoot(root); |
107 | ruleChain.setConfiguration(configuration); | 107 | ruleChain.setConfiguration(configuration); |
108 | ruleChain.setAdditionalInfo(additionalInfo); | 108 | ruleChain.setAdditionalInfo(additionalInfo); |
109 | return ruleChain; | 109 | return ruleChain; |
@@ -668,7 +668,7 @@ CREATE TABLE IF NOT EXISTS thingsboard.rule_chain ( | @@ -668,7 +668,7 @@ CREATE TABLE IF NOT EXISTS thingsboard.rule_chain ( | ||
668 | name text, | 668 | name text, |
669 | search_text text, | 669 | search_text text, |
670 | first_rule_node_id uuid, | 670 | first_rule_node_id uuid, |
671 | - is_root boolean, | 671 | + root boolean, |
672 | configuration text, | 672 | configuration text, |
673 | additional_info text, | 673 | additional_info text, |
674 | PRIMARY KEY (id, tenant_id) | 674 | PRIMARY KEY (id, tenant_id) |
@@ -262,7 +262,7 @@ CREATE TABLE IF NOT EXISTS rule_chain ( | @@ -262,7 +262,7 @@ CREATE TABLE IF NOT EXISTS rule_chain ( | ||
262 | configuration varchar(10000000), | 262 | configuration varchar(10000000), |
263 | name varchar(255), | 263 | name varchar(255), |
264 | first_rule_node_id varchar(31), | 264 | first_rule_node_id varchar(31), |
265 | - is_root boolean, | 265 | + root boolean, |
266 | search_text varchar(255), | 266 | search_text varchar(255), |
267 | tenant_id varchar(31) | 267 | tenant_id varchar(31) |
268 | ); | 268 | ); |