org.babyfish.jimmer.sql.runtime.ExportedSavePath Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jimmer-sql Show documentation
Show all versions of jimmer-sql Show documentation
A revolutionary ORM framework for both java and kotlin
package org.babyfish.jimmer.sql.runtime;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.jetbrains.annotations.NotNull;
import java.util.List;
public class ExportedSavePath {
private final String rootTypeName;
private final List nodes;
public ExportedSavePath(String rootTypeName, List nodes) {
this.rootTypeName = rootTypeName;
this.nodes = nodes;
}
public String getRootTypeName() {
return rootTypeName;
}
public List getNodes() {
return nodes;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder("");
for (Node node : nodes) {
builder.append('.').append(node.prop);
}
return builder.toString();
}
public static class Node {
private final String prop;
private final String targetTypeName;
@JsonCreator
public Node(
@JsonProperty(value = "prop", required = true) @NotNull String prop,
@JsonProperty(value = "targetTypeName", required = true) @NotNull String targetTypeName) {
this.prop = prop;
this.targetTypeName = targetTypeName;
}
@NotNull
public String getProp() {
return prop;
}
@NotNull
public String getTargetTypeName() {
return targetTypeName;
}
@Override
public String toString() {
return "JsonPathNode{" +
"prop='" + prop + '\'' +
", targetTypeName='" + targetTypeName + '\'' +
'}';
}
}
}