Skip to content

Commit bc00a97

Browse files
authored
remove old attributes (#7) (#14)
1 parent 60c310a commit bc00a97

File tree

6 files changed

+19
-66
lines changed

6 files changed

+19
-66
lines changed

modules/core/db/init/hsql/10.create-db.sql

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@ create table DDCUI_MESSAGE (
1313
RECEIVER_ID varchar(36) not null,
1414
SUBJECT varchar(255),
1515
SHAREABLE varchar(255),
16-
ENTITY_REFERENCE_ID varchar(255),
17-
ENTITY_REFERENCE_CLASS varchar(255),
18-
ENTITY_CAPTION varchar(255),
1916
TEXT longvarchar,
2017
READ_ boolean not null,
2118
RECEIVED_AT timestamp not null,
2219
--
2320
primary key (ID)
2421
)^
25-
-- end DDCUI_MESSAGE
22+
-- end DDCUI_MESSAGE
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- begin DDCUI_MESSAGE
2-
alter table DDCUI_MESSAGE add constraint FK_DDCUI_MESSAGE_SENDER foreign key (SENDER_ID) references SEC_USER(ID)^
3-
alter table DDCUI_MESSAGE add constraint FK_DDCUI_MESSAGE_RECEIVER foreign key (RECEIVER_ID) references SEC_USER(ID)^
4-
create index IDX_DDCUI_MESSAGE_SENDER on DDCUI_MESSAGE (SENDER_ID)^
5-
create index IDX_DDCUI_MESSAGE_RECEIVER on DDCUI_MESSAGE (RECEIVER_ID)^
2+
alter table DDCUI_MESSAGE add constraint FK_DDCUI_MESSAGE_ON_SENDER foreign key (SENDER_ID) references SEC_USER(ID)^
3+
alter table DDCUI_MESSAGE add constraint FK_DDCUI_MESSAGE_ON_RECEIVER foreign key (RECEIVER_ID) references SEC_USER(ID)^
4+
create index IDX_DDCUI_MESSAGE_ON_SENDER on DDCUI_MESSAGE (SENDER_ID)^
5+
create index IDX_DDCUI_MESSAGE_ON_RECEIVER on DDCUI_MESSAGE (RECEIVER_ID)^
66
-- end DDCUI_MESSAGE
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
alter table DDCUI_MESSAGE alter column ENTITY_CAPTION rename to ENTITY_CAPTION__U98906 ^
2+
alter table DDCUI_MESSAGE alter column ENTITY_REFERENCE_CLASS rename to ENTITY_REFERENCE_CLASS__U42171 ^
3+
alter table DDCUI_MESSAGE alter column ENTITY_REFERENCE_ID rename to ENTITY_REFERENCE_ID__U52547 ^
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
alter table DDCUI_MESSAGE drop column ENTITY_REFERENCE_ID__U52547 cascade ;
2+
alter table DDCUI_MESSAGE drop column ENTITY_REFERENCE_CLASS__U42171 cascade ;
3+
alter table DDCUI_MESSAGE drop column ENTITY_CAPTION__U98906 cascade ;

modules/global/src/de/diedavids/cuba/userinbox/entity/Message.java

Lines changed: 8 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
import javax.persistence.*;
1313
import javax.validation.constraints.NotNull;
1414
import java.util.Date;
15-
import de.diedavids.cuba.entitysoftreference.EntitySoftReferenceDatatype;
15+
import com.haulmont.cuba.core.entity.Entity;
1616

1717
@Listeners("ddcui_MessageEntityListener")
1818
@Table(name = "DDCUI_MESSAGE")
19-
@Entity(name = "ddcui$Message")
19+
@javax.persistence.Entity(name = "ddcui$Message")
2020
public class Message extends StandardEntity {
2121
private static final long serialVersionUID = -631256156050655713L;
2222

@@ -38,31 +38,7 @@ public class Message extends StandardEntity {
3838
@Convert(converter = EntitySoftReferenceConverter.class)
3939
@MetaProperty(datatype = "EntitySoftReference")
4040
@Column(name = "SHAREABLE")
41-
protected com.haulmont.cuba.core.entity.Entity shareable;
42-
43-
/**
44-
* @deprecated use Message.shareable instead
45-
*/
46-
@Deprecated
47-
@SystemLevel
48-
@Column(name = "ENTITY_REFERENCE_ID")
49-
protected String entityReferenceId;
50-
51-
/**
52-
* @deprecated use Message.shareable instead
53-
*/
54-
@Deprecated
55-
@SystemLevel
56-
@Column(name = "ENTITY_REFERENCE_CLASS")
57-
protected String entityReferenceClass;
58-
59-
/**
60-
* @deprecated use Message.shareable instead
61-
*/
62-
@Deprecated
63-
@SystemLevel
64-
@Column(name = "ENTITY_CAPTION")
65-
protected String entityCaption;
41+
protected Entity shareable;
6642

6743

6844
@Lob
@@ -78,15 +54,16 @@ public class Message extends StandardEntity {
7854
@Column(name = "RECEIVED_AT", nullable = false)
7955
protected Date receivedAt;
8056

81-
public void setShareable(com.haulmont.cuba.core.entity.Entity shareable) {
82-
this.shareable = shareable;
57+
public Entity getShareable() {
58+
return shareable;
8359
}
8460

85-
public com.haulmont.cuba.core.entity.Entity getShareable() {
86-
return shareable;
61+
public void setShareable(Entity shareable) {
62+
this.shareable = shareable;
8763
}
8864

8965

66+
9067
public void setReceivedAt(Date receivedAt) {
9168
this.receivedAt = receivedAt;
9269
}
@@ -96,14 +73,6 @@ public Date getReceivedAt() {
9673
}
9774

9875

99-
public void setEntityCaption(String entityCaption) {
100-
this.entityCaption = entityCaption;
101-
}
102-
103-
public String getEntityCaption() {
104-
return entityCaption;
105-
}
106-
10776

10877
public void setRead(Boolean read) {
10978
this.read = read;
@@ -122,22 +91,6 @@ public String getSubject() {
12291
return subject;
12392
}
12493

125-
public void setEntityReferenceId(String entityReferenceId) {
126-
this.entityReferenceId = entityReferenceId;
127-
}
128-
129-
public String getEntityReferenceId() {
130-
return entityReferenceId;
131-
}
132-
133-
public void setEntityReferenceClass(String entityReferenceClass) {
134-
this.entityReferenceClass = entityReferenceClass;
135-
}
136-
137-
public String getEntityReferenceClass() {
138-
return entityReferenceClass;
139-
}
140-
14194
public void setText(String text) {
14295
this.text = text;
14396
}

modules/global/src/de/diedavids/cuba/userinbox/entity/messages.properties

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ Message.sender = Sender
33
Message = Message
44
Message.subject = Subject
55
Message.text = Text
6-
Message.entityReferenceId = Entity reference id
7-
Message.entityReferenceClass = Entity reference class
86
Message.read = Read
9-
Message.entityCaption = Record
107
Message.receivedAt = Received at
118
Message.shareable = Record

0 commit comments

Comments
 (0)