Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wanchaozhang committed Feb 11, 2025
1 parent f4bd51f commit 022dfd3
Show file tree
Hide file tree
Showing 15 changed files with 1,407 additions and 59 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-session</artifactId>
<version>1.3.2</version>
<version>1.3.3</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ public ArticleEntityExample() {
}

public String getOrderByClause() {
if (orderByClause != null && orderByClause.size() > 0) {
if (orderByClause != null && !orderByClause.isEmpty()) {
StringBuffer sb = new StringBuffer();
orderByClause.forEach((k, v) -> {
sb.append(',' + k + ' ' + v);
sb.append(',').append(k).append(' ').append(v);
});
return sb.toString().replaceFirst(",", "");
} else {
Expand Down Expand Up @@ -1041,8 +1041,22 @@ protected void addCriterion(int additionalCondition, String functionName, Object
criteria.add(new Criterion(additionalCondition, functionName, value, secondValue));
}

protected void addCriterion(int additionalCondition, String functionName, Object value, Object secondValue, Object thirdValue) {
criteria.add(new Criterion(additionalCondition, functionName, value, secondValue, thirdValue));
}

public Criteria andConditionValue(String searchCondition, Object searchValue) {
addCriterion(3, "conditionValue", searchCondition, searchValue);
addCriterion(searchCondition, searchValue, "");
return (Criteria) this;
}

public Criteria andConditionJsonFieldValue(String jsonColumn, String jsonField, String condition, Object searchValue) {
addCriterion(4, condition, jsonColumn, jsonField, searchValue);
return (Criteria) this;
}

public Criteria andConditionJsonFieldContains(String jsonColumn, String jsonField, Object searchValue) {
addCriterion(7, "JSON_CONTAINS", jsonColumn, jsonField, searchValue);
return (Criteria) this;
}

Expand Down Expand Up @@ -1142,6 +1156,8 @@ public static class Criterion {

private int additionalCondition = 0;

private Object thirdValue;

public String getCondition() {
return condition;
}
Expand Down Expand Up @@ -1214,12 +1230,25 @@ public int getAdditionalCondition() {
return additionalCondition;
}

Criterion(int additionalCondition, String functionName, Object value, Object secondValue) {
public Object getThirdValue() {
return thirdValue;
}

protected Criterion(int additionalCondition, String condition, Object value, Object secondValue) {
super();
this.additionalCondition = additionalCondition;
this.condition = functionName;
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
}

protected Criterion(int additionalCondition, String condition, Object value, Object secondValue, Object thirdValue) {
super();
this.additionalCondition = additionalCondition;
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.thirdValue = thirdValue;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public InformationEntityExample() {
}

public String getOrderByClause() {
if (orderByClause != null && orderByClause.size() > 0) {
if (orderByClause != null && !orderByClause.isEmpty()) {
StringBuffer sb = new StringBuffer();
orderByClause.forEach((k, v) -> {
sb.append(',' + k + ' ' + v);
sb.append(',').append(k).append(' ').append(v);
});
return sb.toString().replaceFirst(",", "");
} else {
Expand Down Expand Up @@ -960,8 +960,22 @@ protected void addCriterion(int additionalCondition, String functionName, Object
criteria.add(new Criterion(additionalCondition, functionName, value, secondValue));
}

protected void addCriterion(int additionalCondition, String functionName, Object value, Object secondValue, Object thirdValue) {
criteria.add(new Criterion(additionalCondition, functionName, value, secondValue, thirdValue));
}

public Criteria andConditionValue(String searchCondition, Object searchValue) {
addCriterion(3, "conditionValue", searchCondition, searchValue);
addCriterion(searchCondition, searchValue, "");
return (Criteria) this;
}

public Criteria andConditionJsonFieldValue(String jsonColumn, String jsonField, String condition, Object searchValue) {
addCriterion(4, condition, jsonColumn, jsonField, searchValue);
return (Criteria) this;
}

public Criteria andConditionJsonFieldContains(String jsonColumn, String jsonField, Object searchValue) {
addCriterion(7, "JSON_CONTAINS", jsonColumn, jsonField, searchValue);
return (Criteria) this;
}

Expand Down Expand Up @@ -1056,6 +1070,8 @@ public static class Criterion {

private int additionalCondition = 0;

private Object thirdValue;

public String getCondition() {
return condition;
}
Expand Down Expand Up @@ -1128,12 +1144,25 @@ public int getAdditionalCondition() {
return additionalCondition;
}

Criterion(int additionalCondition, String functionName, Object value, Object secondValue) {
public Object getThirdValue() {
return thirdValue;
}

protected Criterion(int additionalCondition, String condition, Object value, Object secondValue) {
super();
this.additionalCondition = additionalCondition;
this.condition = functionName;
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
}

protected Criterion(int additionalCondition, String condition, Object value, Object secondValue, Object thirdValue) {
super();
this.additionalCondition = additionalCondition;
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.thirdValue = thirdValue;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ public PersonEntityExample() {
}

public String getOrderByClause() {
if (orderByClause != null && orderByClause.size() > 0) {
if (orderByClause != null && !orderByClause.isEmpty()) {
StringBuffer sb = new StringBuffer();
orderByClause.forEach((k, v) -> {
sb.append(',' + k + ' ' + v);
sb.append(',').append(k).append(' ').append(v);
});
return sb.toString().replaceFirst(",", "");
} else {
Expand Down Expand Up @@ -1164,8 +1164,22 @@ protected void addCriterion(int additionalCondition, String functionName, Object
criteria.add(new Criterion(additionalCondition, functionName, value, secondValue));
}

protected void addCriterion(int additionalCondition, String functionName, Object value, Object secondValue, Object thirdValue) {
criteria.add(new Criterion(additionalCondition, functionName, value, secondValue, thirdValue));
}

public Criteria andConditionValue(String searchCondition, Object searchValue) {
addCriterion(3, "conditionValue", searchCondition, searchValue);
addCriterion(searchCondition, searchValue, "");
return (Criteria) this;
}

public Criteria andConditionJsonFieldValue(String jsonColumn, String jsonField, String condition, Object searchValue) {
addCriterion(4, condition, jsonColumn, jsonField, searchValue);
return (Criteria) this;
}

public Criteria andConditionJsonFieldContains(String jsonColumn, String jsonField, Object searchValue) {
addCriterion(7, "JSON_CONTAINS", jsonColumn, jsonField, searchValue);
return (Criteria) this;
}

Expand Down Expand Up @@ -1275,6 +1289,8 @@ public static class Criterion {

private int additionalCondition = 0;

private Object thirdValue;

public String getCondition() {
return condition;
}
Expand Down Expand Up @@ -1347,12 +1363,25 @@ public int getAdditionalCondition() {
return additionalCondition;
}

Criterion(int additionalCondition, String functionName, Object value, Object secondValue) {
public Object getThirdValue() {
return thirdValue;
}

protected Criterion(int additionalCondition, String condition, Object value, Object secondValue) {
super();
this.additionalCondition = additionalCondition;
this.condition = functionName;
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
}

protected Criterion(int additionalCondition, String condition, Object value, Object secondValue, Object thirdValue) {
super();
this.additionalCondition = additionalCondition;
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.thirdValue = thirdValue;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ public SequenceEntityExample() {
}

public String getOrderByClause() {
if (orderByClause != null && orderByClause.size() > 0) {
if (orderByClause != null && !orderByClause.isEmpty()) {
StringBuffer sb = new StringBuffer();
orderByClause.forEach((k, v) -> {
sb.append(',' + k + ' ' + v);
sb.append(',').append(k).append(' ').append(v);
});
return sb.toString().replaceFirst(",", "");
} else {
Expand Down Expand Up @@ -818,8 +818,22 @@ protected void addCriterion(int additionalCondition, String functionName, Object
criteria.add(new Criterion(additionalCondition, functionName, value, secondValue));
}

protected void addCriterion(int additionalCondition, String functionName, Object value, Object secondValue, Object thirdValue) {
criteria.add(new Criterion(additionalCondition, functionName, value, secondValue, thirdValue));
}

public Criteria andConditionValue(String searchCondition, Object searchValue) {
addCriterion(3, "conditionValue", searchCondition, searchValue);
addCriterion(searchCondition, searchValue, "");
return (Criteria) this;
}

public Criteria andConditionJsonFieldValue(String jsonColumn, String jsonField, String condition, Object searchValue) {
addCriterion(4, condition, jsonColumn, jsonField, searchValue);
return (Criteria) this;
}

public Criteria andConditionJsonFieldContains(String jsonColumn, String jsonField, Object searchValue) {
addCriterion(7, "JSON_CONTAINS", jsonColumn, jsonField, searchValue);
return (Criteria) this;
}

Expand Down Expand Up @@ -904,6 +918,8 @@ public static class Criterion {

private int additionalCondition = 0;

private Object thirdValue;

public String getCondition() {
return condition;
}
Expand Down Expand Up @@ -976,12 +992,25 @@ public int getAdditionalCondition() {
return additionalCondition;
}

Criterion(int additionalCondition, String functionName, Object value, Object secondValue) {
public Object getThirdValue() {
return thirdValue;
}

protected Criterion(int additionalCondition, String condition, Object value, Object secondValue) {
super();
this.additionalCondition = additionalCondition;
this.condition = functionName;
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
}

protected Criterion(int additionalCondition, String condition, Object value, Object secondValue, Object thirdValue) {
super();
this.additionalCondition = additionalCondition;
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.thirdValue = thirdValue;
}
}
}
65 changes: 65 additions & 0 deletions src/main/java/com/example/demo/persistence/entity/UserEntity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package com.example.demo.persistence.entity;

import java.io.Serializable;

public class UserEntity implements Serializable {
private Integer id;

private String username;

private static final long serialVersionUID = 1L;

public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
}

public String getUsername() {
return username;
}

public void setUsername(String username) {
this.username = username == null ? null : username.trim();
}

@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
UserEntity other = (UserEntity) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()));
}

@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
return result;
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", username=").append(username);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
Loading

0 comments on commit 022dfd3

Please sign in to comment.