Skip to content

Commit

Permalink
Merge pull request #856 from support-project/issue853_initial_value
Browse files Browse the repository at this point in the history
Issue853 initial value
  • Loading branch information
koda-masaru authored Sep 15, 2017
2 parents 80af29f + 48dc8d7 commit 8deaae8
Show file tree
Hide file tree
Showing 22 changed files with 137 additions and 22 deletions.
Binary file modified document/database/A5M2_knowledge.pdf
Binary file not shown.
42 changes: 22 additions & 20 deletions document/database/knowledge.a5er
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ LName=認証トークン
Comment=
TableOption=
Page=MAIN
Left=1600
Top=50
Left=3050
Top=900
Field="TOKEN","TOKEN","@VARCHAR(128)","NOT NULL",0,"","",$FFFFFFFF,""
Field="ユーザID","USER_ID","@INT","NOT NULL",,"","",$FFFFFFFF,""
Field="有効期限","EXPIRES","@DATETIME","NOT NULL",,"","",$FFFFFFFF,""
Expand All @@ -370,7 +370,7 @@ EffectMode=None
Color=$000000
BkColor=$FFFFFF
ModifiedDateTime=20170620125822
Position="MAIN",1600,50
Position="MAIN",3050,900

[Relation]
Entity1=MAIL_HOOKS
Expand Down Expand Up @@ -823,15 +823,15 @@ Comment=
TableOption=
Page=MAIN
Left=1600
Top=400
Top=350
Field="サービス名","SERVICE_NAME","@VARCHAR(64)","NOT NULL",0,"","",$FFFFFFFF,""
Field="ロケールキー","LOCALE_KEY","@VARCHAR(12)","NOT NULL",1,"","",$FFFFFFFF,""
Field="トップページのHTML","PAGE_HTML","text",,,"","",$FFFFFFFF,""
EffectMode=None
Color=$000000
BkColor=$FFFFFF
ModifiedDateTime=20170130131057
Position="MAIN",1600,400
Position="MAIN",1600,350

[Entity]
PName=SERVICE_CONFIGS
Expand All @@ -840,7 +840,7 @@ Comment=
TableOption=
Page=MAIN
Left=1600
Top=200
Top=100
Field="サービス名","SERVICE_NAME","@VARCHAR(64)","NOT NULL",0,"","",$FFFFFFFF,""
Field="表示名","SERVICE_LABEL","@VARCHAR(24)","NOT NULL",,"","",$FFFFFFFF,""
Field="アイコン文字列","SERVICE_ICON","@VARCHAR(24)","NOT NULL",,"","",$FFFFFFFF,""
Expand All @@ -849,7 +849,7 @@ EffectMode=None
Color=$000000
BkColor=$FFFFFF
ModifiedDateTime=20170131001923
Position="MAIN",1600,200
Position="MAIN",1600,100

[Entity]
PName=PINS
Expand Down Expand Up @@ -1243,7 +1243,7 @@ Comment=
TableOption=
Page=MAIN
Left=950
Top=300
Top=200
Field="テンプレートの種類ID","TYPE_ID","@INT","NOT NULL",0,"","",$FFFFFFFF,""
Field="項目NO","ITEM_NO","@INT","NOT NULL",1,"","",$FFFFFFFF,""
Field="選択肢番号","CHOICE_NO","@INT","NOT NULL",2,"","",$FFFFFFFF,""
Expand All @@ -1253,7 +1253,7 @@ EffectMode=None
Color=$000000
BkColor=$FFFFFF
ModifiedDateTime=20150910041119
Position="MAIN",950,300,542,135
Position="MAIN",950,200,542,135

[Relation]
Entity1=TEMPLATE_MASTERS
Expand All @@ -1264,15 +1264,15 @@ Fields1=TYPE_ID
Fields2=TYPE_ID
Cardinarity1=
Cardinarity2=
Position="MAIN",0,4460,6903,3568,R,R
Position="MAIN",0,4460,6903,3717,R,R
Dependence=1
Caption=
PName=
ModifiedDateTime=20150910034230
LineMode=0
Bar1=446
Bar2=690
Bar3=357
Bar3=372
TermPos1=R
TermPos2=R

Expand All @@ -1285,14 +1285,14 @@ Fields1=TYPE_ID
Fields2=TYPE_ID
Cardinarity1=
Cardinarity2=
Position="MAIN",0,3334,5475,2219,R,R
Position="MAIN",0,3334,5475,2295,R,R
Dependence=0
Caption=
PName=
LineMode=0
Bar1=333
Bar2=548
Bar3=222
Bar3=230
TermPos1=R
TermPos2=R

Expand All @@ -1308,10 +1308,11 @@ Field="テンプレートの種類ID","TYPE_ID","serial","NOT NULL",0,"","",$FFF
Field="テンプレート名","TYPE_NAME","@VARCHAR(256)","NOT NULL",,"","",$FFFFFFFF,""
Field="アイコン","TYPE_ICON","@VARCHAR(64)",,,"","",$FFFFFFFF,""
Field="説明","DESCRIPTION","@VARCHAR(1024)",,,"","",$FFFFFFFF,""
Field="本文の初期値","INITIAL_VALUE","text",,,"","",$FFFFFFFF,""
EffectMode=None
Color=$000000
BkColor=$FFFFFF
ModifiedDateTime=20150912014311
ModifiedDateTime=20170915171119
Position="MAIN",650,550

[Entity]
Expand All @@ -1321,17 +1322,18 @@ Comment=
TableOption=
Page=MAIN
Left=1350
Top=550
Top=500
Field="テンプレートの種類ID","TYPE_ID","@INT","NOT NULL",0,"","",$FFFFFFFF,""
Field="項目NO","ITEM_NO","@INT","NOT NULL",1,"","",$FFFFFFFF,""
Field="項目名","ITEM_NAME","@VARCHAR(32)","NOT NULL",,"","",$FFFFFFFF,""
Field="項目の種類","ITEM_TYPE","@INT","NOT NULL",,"","",$FFFFFFFF,""
Field="説明","DESCRIPTION","@VARCHAR(1024)",,,"","",$FFFFFFFF,""
Field="初期値","INITIAL_VALUE","text",,,"","",$FFFFFFFF,""
EffectMode=None
Color=$000000
BkColor=$FFFFFF
ModifiedDateTime=20151027035632
Position="MAIN",1350,550
ModifiedDateTime=20170915171315
Position="MAIN",1350,500

[Relation]
Entity1=KNOWLEDGES
Expand Down Expand Up @@ -1519,8 +1521,8 @@ LName=アカウントの画像
Comment=
TableOption=
Page=MAIN
Left=900
Top=50
Left=3550
Top=1250
Field="IMAGE_ID","IMAGE_ID","BIGSERIAL","NOT NULL",0,"","",$FFFFFFFF,""
Field="ユーザID","USER_ID","@INT",,,"","",$FFFFFFFF,""
Field="ファイル名","FILE_NAME","@VARCHAR(256)",,,"","",$FFFFFFFF,""
Expand All @@ -1533,7 +1535,7 @@ EffectMode=None
Color=$000000
BkColor=$FFFFFF
ModifiedDateTime=20150416234339
Position="MAIN",900,50
Position="MAIN",3550,1250

[Relation]
Entity1=KNOWLEDGES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ public TemplateItemsEntity rawPhysicalInsert(TemplateItemsEntity entity) {
entity.getItemName(),
entity.getItemType(),
entity.getDescription(),
entity.getInitialValue(),
entity.getInsertUser(),
entity.getInsertDatetime(),
entity.getUpdateUser(),
Expand All @@ -241,6 +242,7 @@ public TemplateItemsEntity physicalInsert(TemplateItemsEntity entity) {
entity.getItemName(),
entity.getItemType(),
entity.getDescription(),
entity.getInitialValue(),
entity.getInsertUser(),
entity.getInsertDatetime(),
entity.getUpdateUser(),
Expand Down Expand Up @@ -288,6 +290,7 @@ public TemplateItemsEntity physicalUpdate(TemplateItemsEntity entity) {
entity.getItemName(),
entity.getItemType(),
entity.getDescription(),
entity.getInitialValue(),
entity.getInsertUser(),
entity.getInsertDatetime(),
entity.getUpdateUser(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ public TemplateMastersEntity rawPhysicalInsert(TemplateMastersEntity entity) {
entity.getTypeName(),
entity.getTypeIcon(),
entity.getDescription(),
entity.getInitialValue(),
entity.getInsertUser(),
entity.getInsertDatetime(),
entity.getUpdateUser(),
Expand Down Expand Up @@ -207,6 +208,7 @@ public TemplateMastersEntity physicalInsert(TemplateMastersEntity entity) {
entity.getTypeName(),
entity.getTypeIcon(),
entity.getDescription(),
entity.getInitialValue(),
entity.getInsertUser(),
entity.getInsertDatetime(),
entity.getUpdateUser(),
Expand Down Expand Up @@ -255,6 +257,7 @@ public TemplateMastersEntity physicalUpdate(TemplateMastersEntity entity) {
entity.getTypeName(),
entity.getTypeIcon(),
entity.getDescription(),
entity.getInitialValue(),
entity.getInsertUser(),
entity.getInsertDatetime(),
entity.getUpdateUser(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.support.project.knowledge.deploy.v1_11_0.Migrate_1_11_0;
import org.support.project.knowledge.deploy.v1_11_0.Migrate_1_11_1;
import org.support.project.knowledge.deploy.v1_11_0.Migrate_1_11_2;
import org.support.project.knowledge.deploy.v1_11_0.Migrate_1_11_3;
import org.support.project.knowledge.deploy.v1_1_0pre1.Migrate_1_1_0pre1;
import org.support.project.knowledge.deploy.v1_4_0.Migrate_1_4_0;
import org.support.project.knowledge.deploy.v1_5_0.Migrate_1_5_0;
Expand All @@ -50,7 +51,7 @@ public class InitDB {
private static final Map<String, Migrate> MAP = new LinkedHashMap<>();

private static final Migrate INIT = InitializeSystem.get();
public static final String CURRENT = "1.11.2";
public static final String CURRENT = "1.11.3";

public InitDB() {
super();
Expand Down Expand Up @@ -83,6 +84,7 @@ public InitDB() {
MAP.put("1.11.0", Migrate_1_11_0.get());
MAP.put("1.11.1", Migrate_1_11_1.get());
MAP.put("1.11.2", Migrate_1_11_2.get());
MAP.put("1.11.3", Migrate_1_11_3.get());
}

public static void main(String[] args) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package org.support.project.knowledge.deploy.v1_11_0;

import org.support.project.knowledge.deploy.Migrate;
import org.support.project.ormapping.tool.dao.InitializeDao;

public class Migrate_1_11_3 implements Migrate {

public static Migrate_1_11_3 get() {
return org.support.project.di.Container.getComp(Migrate_1_11_3.class);
}

@Override
public boolean doMigrate() throws Exception {
InitializeDao initializeDao = InitializeDao.get();
String[] sqlpaths = {
"/org/support/project/knowledge/deploy/v1_12/migrate_v1_12_0.sql",
};
initializeDao.initializeDatabase(sqlpaths);
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public GenTemplateItemsEntity(Integer itemNo, Integer typeId) {
private Integer itemType;
/** 説明 */
private String description;
/** 初期値 */
private String initialValue;
/** 登録ユーザ */
private Integer insertUser;
/** 登録日時 */
Expand Down Expand Up @@ -152,6 +154,22 @@ public GenTemplateItemsEntity setDescription(String description) {
return this;
}

/**
* Get 初期値.
* @return 初期値
*/
public String getInitialValue() {
return this.initialValue;
}
/**
* Set 初期値.
* @param initialValue 初期値
* @return this object */
public GenTemplateItemsEntity setInitialValue(String initialValue) {
this.initialValue = initialValue;
return this;
}

/**
* Get 登録ユーザ.
* @return 登録ユーザ
Expand Down Expand Up @@ -288,6 +306,7 @@ public String toString() {
builder.append("itemName = ").append(itemName).append("\n");
builder.append("itemType = ").append(itemType).append("\n");
builder.append("description = ").append(description).append("\n");
builder.append("initialValue = ").append(initialValue).append("\n");
builder.append("insertUser = ").append(insertUser).append("\n");
builder.append("insertDatetime = ").append(insertDatetime).append("\n");
builder.append("updateUser = ").append(updateUser).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public GenTemplateMastersEntity(Integer typeId) {
private String typeIcon;
/** 説明 */
private String description;
/** 本文の初期値 */
private String initialValue;
/** 登録ユーザ */
private Integer insertUser;
/** 登録日時 */
Expand Down Expand Up @@ -132,6 +134,22 @@ public GenTemplateMastersEntity setDescription(String description) {
return this;
}

/**
* Get 本文の初期値.
* @return 本文の初期値
*/
public String getInitialValue() {
return this.initialValue;
}
/**
* Set 本文の初期値.
* @param initialValue 本文の初期値
* @return this object */
public GenTemplateMastersEntity setInitialValue(String initialValue) {
this.initialValue = initialValue;
return this;
}

/**
* Get 登録ユーザ.
* @return 登録ユーザ
Expand Down Expand Up @@ -264,6 +282,7 @@ public String toString() {
builder.append("typeName = ").append(typeName).append("\n");
builder.append("typeIcon = ").append(typeIcon).append("\n");
builder.append("description = ").append(description).append("\n");
builder.append("initialValue = ").append(initialValue).append("\n");
builder.append("insertUser = ").append(insertUser).append("\n");
builder.append("insertDatetime = ").append(insertDatetime).append("\n");
builder.append("updateUser = ").append(updateUser).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ public TemplateMastersEntity updateTemplate(TemplateMastersEntity template, Logi
db.setTypeName(template.getTypeName());
db.setTypeIcon(template.getTypeIcon());
db.setDescription(template.getDescription());
db.setInitialValue(template.getInitialValue());
templateDao.update(db);

Integer typeId = template.getTypeId();
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/appresource.properties
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ knowledge.template.label.name=Name
knowledge.template.label.icon=Icon
knowledge.template.label.icon.msg=(Choice from 'Font Awesome'.[<a href="http://fontawesome.io/icons/" target="_blank">http://fontawesome.io/icons/</a>] e.g. fa-book)
knowledge.template.label.description=Description
knowledge.template.label.initial.value=Initial value
knowledge.template.label.not.editable=This template is the default template of the system. you can edit only description.
knowledge.template.msg.not.delete=The default template (knowledge, bookmark) can not be deleted.
knowledge.template.label.item=Item
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/appresource_ja.properties
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ knowledge.template.label.name=名称
knowledge.template.label.icon=アイコン
knowledge.template.label.icon.msg=(Font Awesome[<a href="http://fontawesome.io/icons/" target="_blank">http://fontawesome.io/icons/</a>]から選択してください。 e.g. fa-book)
knowledge.template.label.description=説明
knowledge.template.label.initial.value=初期値
knowledge.template.label.not.editable=このテンプレートはシステムのデフォルトのテンプレートです。項目の増減、テンプレートの削除は出来ません。
knowledge.template.msg.not.delete=デフォルトのテンプレート(knowledge,bookmark)は削除できません
knowledge.template.label.item=項目
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ITEM_NO
, ITEM_NAME
, ITEM_TYPE
, DESCRIPTION
, INITIAL_VALUE
, INSERT_USER
, INSERT_DATETIME
, UPDATE_USER
Expand All @@ -21,4 +22,5 @@ ITEM_NO
, ?
, ?
, ?
, ?
);
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ITEM_NO
, ITEM_NAME
, ITEM_TYPE
, DESCRIPTION
, INITIAL_VALUE
, INSERT_USER
, INSERT_DATETIME
, UPDATE_USER
Expand All @@ -21,4 +22,5 @@ ITEM_NO
, ?
, ?
, ?
, ?
);
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ SET
ITEM_NAME = ?
, ITEM_TYPE = ?
, DESCRIPTION = ?
, INITIAL_VALUE = ?
, INSERT_USER = ?
, INSERT_DATETIME = ?
, UPDATE_USER = ?
Expand Down
Loading

0 comments on commit 8deaae8

Please sign in to comment.