You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

116 lines
2.6 KiB

6 years ago
package xyz.wbsite.dbtool.javafx.po;
import javafx.beans.property.SimpleStringProperty;
import xyz.wbsite.dbtool.javafx.annotation.Property;
6 years ago
import java.util.ArrayList;
import java.util.List;
public class Module {
6 years ago
public Module() {
6 years ago
}
public Module(String moduleName) {
setModuleName(moduleName);
6 years ago
}
@Property("name")
private SimpleStringProperty moduleName = new SimpleStringProperty();
@Property("note")
6 years ago
private String moduleComment;
@Property("prefix")
6 years ago
private String modulePrefix;
@Property("needGenerate")
private boolean needGenerate;
6 years ago
private String projectName;
private String projectBasePackage;
private String projectAuthor;
private List<Table> tables = new ArrayList();
6 years ago
public String getModuleName() {
return moduleName.get();
}
public SimpleStringProperty moduleNameProperty() {
6 years ago
return moduleName;
}
public void setModuleName(String moduleName) {
this.moduleName.set(moduleName);
6 years ago
}
public boolean putTable(Table table) {
if (tables == null) {
tables = new ArrayList<Table>();
}
tables.add(table);
return true;
}
public boolean hasHtml() {
for (Table table : tables) {
if (table.getHtml()) return true;
}
return false;
}
6 years ago
public List<Table> getTables() {
return tables;
}
public void setTables(List<Table> tables) {
this.tables = tables;
}
public String getModuleComment() {
return moduleComment;
}
public void setModuleComment(String moduleComment) {
this.moduleComment = moduleComment;
}
public String getModulePrefix() {
return modulePrefix;
}
public void setModulePrefix(String modulePrefix) {
this.modulePrefix = modulePrefix != null ? modulePrefix : "";
6 years ago
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public String getProjectBasePackage() {
return projectBasePackage;
}
public void setProjectBasePackage(String projectBasePackage) {
this.projectBasePackage = projectBasePackage;
}
public String getProjectAuthor() {
return projectAuthor;
}
public void setProjectAuthor(String projectAuthor) {
this.projectAuthor = projectAuthor;
}
public boolean getNeedGenerate() {
return needGenerate;
}
public void setNeedGenerate(boolean needGenerate) {
this.needGenerate = needGenerate;
}
6 years ago
}

Powered by TurnKey Linux.