forked from xuhuisheng/lemon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d28267d
commit 4053e22
Showing
47 changed files
with
2,448 additions
and
30 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
src/main/java/com/mossle/feedback/FeedbackModuleSpecification.java
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.mossle.feedback; | ||
|
||
import com.mossle.core.dbmigrate.ModuleSpecification; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
|
||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class FeedbackModuleSpecification implements ModuleSpecification { | ||
private static final String MODULE_NAME = "feedback"; | ||
private static final String MODULE_NAME_UPPER = MODULE_NAME.toUpperCase(); | ||
private String type; | ||
private boolean enabled; | ||
private boolean initData; | ||
|
||
public boolean isEnabled() { | ||
return enabled; | ||
} | ||
|
||
public String getSchemaTable() { | ||
return "SCHEMA_VERSION_" + MODULE_NAME_UPPER; | ||
} | ||
|
||
public String getSchemaLocation() { | ||
return "dbmigrate." + type + "." + MODULE_NAME; | ||
} | ||
|
||
public boolean isInitData() { | ||
return initData; | ||
} | ||
|
||
public String getDataTable() { | ||
return "SCHEMA_VERSION_DATA_" + MODULE_NAME_UPPER; | ||
} | ||
|
||
public String getDataLocation() { | ||
return "dbmigrate." + type + ".data_" + MODULE_NAME; | ||
} | ||
|
||
@Value("${application.database.type}") | ||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
|
||
@Value("${" + MODULE_NAME + ".dbmigrate.enabled}") | ||
public void setEnabled(boolean enabled) { | ||
this.enabled = enabled; | ||
} | ||
|
||
@Value("${" + MODULE_NAME + ".dbmigrate.initData}") | ||
public void setInitData(boolean initData) { | ||
this.initData = initData; | ||
} | ||
} |
125 changes: 125 additions & 0 deletions
125
src/main/java/com/mossle/feedback/persistence/domain/FeedbackCatalog.java
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 |
---|---|---|
@@ -0,0 +1,125 @@ | ||
package com.mossle.feedback.persistence.domain; | ||
|
||
// Generated by Hibernate Tools | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.FetchType; | ||
import javax.persistence.Id; | ||
import javax.persistence.OneToMany; | ||
import javax.persistence.Table; | ||
|
||
/** | ||
* FeedbackCatalog . | ||
* | ||
* @author Lingo | ||
*/ | ||
@Entity | ||
@Table(name = "FEEDBACK_CATALOG") | ||
public class FeedbackCatalog implements java.io.Serializable { | ||
private static final long serialVersionUID = 0L; | ||
|
||
/** null. */ | ||
private Long id; | ||
|
||
/** null. */ | ||
private String name; | ||
|
||
/** null. */ | ||
private String description; | ||
|
||
/** null. */ | ||
private Integer priority; | ||
|
||
/** . */ | ||
private Set<FeedbackInfo> feedbackInfos = new HashSet<FeedbackInfo>(0); | ||
|
||
public FeedbackCatalog() { | ||
} | ||
|
||
public FeedbackCatalog(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public FeedbackCatalog(Long id, String name, String description, | ||
Integer priority, Set<FeedbackInfo> feedbackInfos) { | ||
this.id = id; | ||
this.name = name; | ||
this.description = description; | ||
this.priority = priority; | ||
this.feedbackInfos = feedbackInfos; | ||
} | ||
|
||
/** @return null. */ | ||
@Id | ||
@Column(name = "ID", unique = true, nullable = false) | ||
public Long getId() { | ||
return this.id; | ||
} | ||
|
||
/** | ||
* @param id | ||
* null. | ||
*/ | ||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
/** @return null. */ | ||
@Column(name = "NAME", length = 100) | ||
public String getName() { | ||
return this.name; | ||
} | ||
|
||
/** | ||
* @param name | ||
* null. | ||
*/ | ||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
/** @return null. */ | ||
@Column(name = "DESCRIPTION", length = 200) | ||
public String getDescription() { | ||
return this.description; | ||
} | ||
|
||
/** | ||
* @param description | ||
* null. | ||
*/ | ||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
|
||
/** @return null. */ | ||
@Column(name = "PRIORITY") | ||
public Integer getPriority() { | ||
return this.priority; | ||
} | ||
|
||
/** | ||
* @param priority | ||
* null. | ||
*/ | ||
public void setPriority(Integer priority) { | ||
this.priority = priority; | ||
} | ||
|
||
/** @return . */ | ||
@OneToMany(fetch = FetchType.LAZY, mappedBy = "feedbackCatalog") | ||
public Set<FeedbackInfo> getFeedbackInfos() { | ||
return this.feedbackInfos; | ||
} | ||
|
||
/** | ||
* @param feedbackInfos | ||
* . | ||
*/ | ||
public void setFeedbackInfos(Set<FeedbackInfo> feedbackInfos) { | ||
this.feedbackInfos = feedbackInfos; | ||
} | ||
} |
166 changes: 166 additions & 0 deletions
166
src/main/java/com/mossle/feedback/persistence/domain/FeedbackInfo.java
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 |
---|---|---|
@@ -0,0 +1,166 @@ | ||
package com.mossle.feedback.persistence.domain; | ||
|
||
// Generated by Hibernate Tools | ||
import java.util.Date; | ||
|
||
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 javax.persistence.Table; | ||
import javax.persistence.Temporal; | ||
import javax.persistence.TemporalType; | ||
|
||
/** | ||
* FeedbackInfo . | ||
* | ||
* @author Lingo | ||
*/ | ||
@Entity | ||
@Table(name = "FEEDBACK_INFO") | ||
public class FeedbackInfo implements java.io.Serializable { | ||
private static final long serialVersionUID = 0L; | ||
|
||
/** null. */ | ||
private Long id; | ||
|
||
/** null. */ | ||
private FeedbackCatalog feedbackCatalog; | ||
|
||
/** null. */ | ||
private String content; | ||
|
||
/** null. */ | ||
private String contact; | ||
|
||
/** null. */ | ||
private String status; | ||
|
||
/** null. */ | ||
private Date createTime; | ||
|
||
/** null. */ | ||
private String userId; | ||
|
||
public FeedbackInfo() { | ||
} | ||
|
||
public FeedbackInfo(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public FeedbackInfo(Long id, FeedbackCatalog feedbackCatalog, | ||
String content, String contact, String status, Date createTime, | ||
String userId) { | ||
this.id = id; | ||
this.feedbackCatalog = feedbackCatalog; | ||
this.content = content; | ||
this.contact = contact; | ||
this.status = status; | ||
this.createTime = createTime; | ||
this.userId = userId; | ||
} | ||
|
||
/** @return null. */ | ||
@Id | ||
@Column(name = "ID", unique = true, nullable = false) | ||
public Long getId() { | ||
return this.id; | ||
} | ||
|
||
/** | ||
* @param id | ||
* null. | ||
*/ | ||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
/** @return null. */ | ||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "CATALOG_ID") | ||
public FeedbackCatalog getFeedbackCatalog() { | ||
return this.feedbackCatalog; | ||
} | ||
|
||
/** | ||
* @param feedbackCatalog | ||
* null. | ||
*/ | ||
public void setFeedbackCatalog(FeedbackCatalog feedbackCatalog) { | ||
this.feedbackCatalog = feedbackCatalog; | ||
} | ||
|
||
/** @return null. */ | ||
@Column(name = "CONTENT", length = 200) | ||
public String getContent() { | ||
return this.content; | ||
} | ||
|
||
/** | ||
* @param content | ||
* null. | ||
*/ | ||
public void setContent(String content) { | ||
this.content = content; | ||
} | ||
|
||
/** @return null. */ | ||
@Column(name = "CONTACT", length = 200) | ||
public String getContact() { | ||
return this.contact; | ||
} | ||
|
||
/** | ||
* @param contact | ||
* null. | ||
*/ | ||
public void setContact(String contact) { | ||
this.contact = contact; | ||
} | ||
|
||
/** @return null. */ | ||
@Column(name = "STATUS", length = 50) | ||
public String getStatus() { | ||
return this.status; | ||
} | ||
|
||
/** | ||
* @param status | ||
* null. | ||
*/ | ||
public void setStatus(String status) { | ||
this.status = status; | ||
} | ||
|
||
/** @return null. */ | ||
@Temporal(TemporalType.TIMESTAMP) | ||
@Column(name = "CREATE_TIME", length = 26) | ||
public Date getCreateTime() { | ||
return this.createTime; | ||
} | ||
|
||
/** | ||
* @param createTime | ||
* null. | ||
*/ | ||
public void setCreateTime(Date createTime) { | ||
this.createTime = createTime; | ||
} | ||
|
||
/** @return null. */ | ||
@Column(name = "USER_ID", length = 64) | ||
public String getUserId() { | ||
return this.userId; | ||
} | ||
|
||
/** | ||
* @param userId | ||
* null. | ||
*/ | ||
public void setUserId(String userId) { | ||
this.userId = userId; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/mossle/feedback/persistence/manager/FeedbackCatalogManager.java
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.mossle.feedback.persistence.manager; | ||
|
||
import com.mossle.core.hibernate.HibernateEntityDao; | ||
|
||
import com.mossle.feedback.persistence.domain.FeedbackCatalog; | ||
|
||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
public class FeedbackCatalogManager extends HibernateEntityDao<FeedbackCatalog> { | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/mossle/feedback/persistence/manager/FeedbackInfoManager.java
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.mossle.feedback.persistence.manager; | ||
|
||
import com.mossle.core.hibernate.HibernateEntityDao; | ||
|
||
import com.mossle.feedback.persistence.domain.FeedbackInfo; | ||
|
||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
public class FeedbackInfoManager extends HibernateEntityDao<FeedbackInfo> { | ||
} |
Oops, something went wrong.