-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #483 from gokulprathin8/lob-annotations
Lombok annotations for JPA entity models
- Loading branch information
Showing
9 changed files
with
173 additions
and
598 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,32 @@ | ||
package com.gw.jpa; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.FetchType; | ||
import javax.persistence.Id; | ||
import javax.persistence.JoinColumn; | ||
import javax.persistence.ManyToOne; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Entity | ||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class Environment { | ||
@Id String id; | ||
|
||
String name, type, bin, pyenv, basedir; | ||
|
||
// String host; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "hostid") | ||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY) | ||
private Host hostobj; | ||
|
||
@Column(columnDefinition = "LONGTEXT") | ||
String settings; | ||
|
||
public Host getHostobj() { | ||
return this.hostobj; | ||
} | ||
|
||
public void setHostobj(Host hostobj) { | ||
this.hostobj = hostobj; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
|
||
public String getBin() { | ||
return bin; | ||
} | ||
|
||
public void setBin(String bin) { | ||
this.bin = bin; | ||
} | ||
|
||
public String getPyenv() { | ||
return pyenv; | ||
} | ||
|
||
public void setPyenv(String pyenv) { | ||
this.pyenv = pyenv; | ||
} | ||
|
||
public String getBasedir() { | ||
return basedir; | ||
} | ||
@Id | ||
private String id; | ||
|
||
public void setBasedir(String basedir) { | ||
this.basedir = basedir; | ||
} | ||
private String name, type, bin, pyenv, basedir; | ||
|
||
public String getSettings() { | ||
return settings; | ||
} | ||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "hostid") | ||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY) | ||
private Host hostobj; | ||
|
||
public void setSettings(String settings) { | ||
this.settings = settings; | ||
} | ||
@Column(columnDefinition = "LONGTEXT") | ||
private String settings; | ||
} |
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,90 +1,43 @@ | ||
package com.gw.jpa; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Lob; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Id; | ||
import javax.persistence.Lob; | ||
|
||
/** | ||
* Process POJO | ||
* | ||
* @author jensensun | ||
* | ||
*/ | ||
@Entity | ||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class GWProcess { | ||
|
||
@Id String id; | ||
|
||
String name; | ||
|
||
@Lob | ||
@Column(columnDefinition = "LONGTEXT") | ||
String description; | ||
|
||
@Lob | ||
@Column(columnDefinition = "LONGTEXT") | ||
String code; | ||
|
||
String lang; | ||
|
||
String owner; | ||
@Id | ||
private String id; | ||
|
||
// true: private; false: public | ||
String confidential; | ||
private String name; | ||
|
||
public String getOwner() { | ||
return this.owner; | ||
} | ||
@Lob | ||
@Column(columnDefinition = "LONGTEXT") | ||
private String description; | ||
|
||
public void setOwner(String owner) { | ||
this.owner = owner; | ||
} | ||
@Lob | ||
@Column(columnDefinition = "LONGTEXT") | ||
private String code; | ||
|
||
public String getConfidential() { | ||
return this.confidential; | ||
} | ||
private String lang; | ||
|
||
public void setConfidential(String confidential) { | ||
this.confidential = confidential; | ||
} | ||
private String owner; | ||
|
||
public String getLang() { | ||
return this.lang; | ||
} | ||
|
||
public void setLang(String lang) { | ||
this.lang = lang; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
|
||
public String getCode() { | ||
return code; | ||
} | ||
|
||
public void setCode(String code) { | ||
this.code = code; | ||
} | ||
//true: private; false: public | ||
private String confidential; | ||
} | ||
|
Oops, something went wrong.