mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-11 09:38:28 +08:00
PL-8275 Remove Creatable.LOGIN_FIELD_LEN constant
This commit is contained in:
parent
a469240885
commit
1beed3f95c
@ -41,13 +41,13 @@ public class Config extends BaseUuidEntity implements Versioned, Creatable, Upda
|
||||
@Column(name = "CREATE_TS")
|
||||
protected Date createTs;
|
||||
|
||||
@Column(name = "CREATED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "CREATED_BY", length = 50)
|
||||
protected String createdBy;
|
||||
|
||||
@Column(name = "UPDATE_TS")
|
||||
private Date updateTs;
|
||||
|
||||
@Column(name = "UPDATED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "UPDATED_BY", length = 50)
|
||||
private String updatedBy;
|
||||
|
||||
@Column(name = "NAME")
|
||||
|
@ -22,9 +22,6 @@ import java.util.Date;
|
||||
* Interface to be implemented by entities that contain information about who created them and when.
|
||||
*/
|
||||
public interface Creatable {
|
||||
|
||||
int LOGIN_FIELD_LEN = 50;
|
||||
|
||||
Date getCreateTs();
|
||||
|
||||
void setCreateTs(Date date);
|
||||
|
@ -34,7 +34,6 @@ import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Snapshot for entity.
|
||||
*
|
||||
*/
|
||||
@Entity(name = "sys$EntitySnapshot")
|
||||
@Table(name = "SYS_ENTITY_SNAPSHOT")
|
||||
@ -46,7 +45,7 @@ public class EntitySnapshot extends BaseUuidEntity implements Creatable {
|
||||
@Column(name = "CREATE_TS")
|
||||
protected Date createTs;
|
||||
|
||||
@Column(name = "CREATED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "CREATED_BY", length = 50)
|
||||
protected String createdBy;
|
||||
|
||||
@Column(name = "VIEW_XML")
|
||||
|
@ -34,13 +34,13 @@ public class EntityStatistics extends BaseUuidEntity implements Creatable, Updat
|
||||
@Column(name = "CREATE_TS")
|
||||
protected Date createTs;
|
||||
|
||||
@Column(name = "CREATED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "CREATED_BY", length = 50)
|
||||
protected String createdBy;
|
||||
|
||||
@Column(name = "UPDATE_TS")
|
||||
private Date updateTs;
|
||||
|
||||
@Column(name = "UPDATED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "UPDATED_BY", length = 50)
|
||||
private String updatedBy;
|
||||
|
||||
@Column(name = "NAME", length = 50)
|
||||
|
@ -34,7 +34,7 @@ public class FtsQueue extends BaseUuidEntity implements Creatable {
|
||||
@Column(name = "CREATE_TS")
|
||||
protected Date createTs;
|
||||
|
||||
@Column(name = "CREATED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "CREATED_BY", length = 50)
|
||||
protected String createdBy;
|
||||
|
||||
@Column(name = "ENTITY_ID")
|
||||
|
@ -37,7 +37,7 @@ public class JmxInstance extends StandardEntity {
|
||||
@Column(name = "ADDRESS", length = 500, nullable = false)
|
||||
protected String address;
|
||||
|
||||
@Column(name = "LOGIN", length = LOGIN_FIELD_LEN, nullable = false)
|
||||
@Column(name = "LOGIN", length = 50, nullable = false)
|
||||
protected String login;
|
||||
|
||||
@Column(name = "PASSWORD", length = 255)
|
||||
|
@ -57,7 +57,7 @@ public class ScheduledTask extends BaseUuidEntity implements Creatable, Updatabl
|
||||
@Column(name = "CREATE_TS")
|
||||
protected Date createTs;
|
||||
|
||||
@Column(name = "CREATED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "CREATED_BY", length = 50)
|
||||
protected String createdBy;
|
||||
|
||||
@Column(name = "UPDATE_TS")
|
||||
|
@ -35,13 +35,13 @@ public class Server extends BaseUuidEntity implements Creatable, Updatable {
|
||||
@Column(name = "CREATE_TS")
|
||||
protected Date createTs;
|
||||
|
||||
@Column(name = "CREATED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "CREATED_BY", length = 50)
|
||||
protected String createdBy;
|
||||
|
||||
@Column(name = "UPDATE_TS")
|
||||
protected Date updateTs;
|
||||
|
||||
@Column(name = "UPDATED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "UPDATED_BY", length = 50)
|
||||
protected String updatedBy;
|
||||
|
||||
@Column(name = "NAME")
|
||||
|
@ -36,19 +36,19 @@ public class StandardEntity extends BaseUuidEntity implements Versioned, Creatab
|
||||
@Column(name = "CREATE_TS")
|
||||
protected Date createTs;
|
||||
|
||||
@Column(name = "CREATED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "CREATED_BY", length = 50)
|
||||
protected String createdBy;
|
||||
|
||||
@Column(name = "UPDATE_TS")
|
||||
protected Date updateTs;
|
||||
|
||||
@Column(name = "UPDATED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "UPDATED_BY", length = 50)
|
||||
protected String updatedBy;
|
||||
|
||||
@Column(name = "DELETE_TS")
|
||||
protected Date deleteTs;
|
||||
|
||||
@Column(name = "DELETED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "DELETED_BY", length = 50)
|
||||
protected String deletedBy;
|
||||
|
||||
@Override
|
||||
|
@ -37,7 +37,7 @@ public class Presentation extends BaseUuidEntity implements Creatable, Updatable
|
||||
@Column(name = "CREATE_TS")
|
||||
protected Date createTs;
|
||||
|
||||
@Column(name = "CREATED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "CREATED_BY", length = 50)
|
||||
protected String createdBy;
|
||||
|
||||
@Column(name = "COMPONENT")
|
||||
@ -59,7 +59,7 @@ public class Presentation extends BaseUuidEntity implements Creatable, Updatable
|
||||
@Column(name = "UPDATE_TS")
|
||||
protected Date updateTs;
|
||||
|
||||
@Column(name = "UPDATED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "UPDATED_BY", length = 50)
|
||||
protected String updatedBy;
|
||||
|
||||
@Transient
|
||||
|
@ -32,7 +32,6 @@ import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Screen history item.
|
||||
*
|
||||
*/
|
||||
@Entity(name = "sec$ScreenHistory")
|
||||
@Table(name = "SEC_SCREEN_HISTORY")
|
||||
@ -41,17 +40,10 @@ public class ScreenHistoryEntity extends BaseUuidEntity implements Creatable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
UserSession userSession = AppBeans.get(UserSessionSource.class).getUserSession();
|
||||
setUser(userSession.getUser());
|
||||
setSubstitutedUser(userSession.getSubstitutedUser());
|
||||
}
|
||||
|
||||
@Column(name = "CREATE_TS")
|
||||
protected Date createTs;
|
||||
|
||||
@Column(name = "CREATED_BY", length = LOGIN_FIELD_LEN)
|
||||
@Column(name = "CREATED_BY", length = 50)
|
||||
protected String createdBy;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@ -136,4 +128,11 @@ public class ScreenHistoryEntity extends BaseUuidEntity implements Creatable {
|
||||
UserFormatTools formatTools = AppBeans.get(UserFormatTools.NAME);
|
||||
return formatTools.formatUser(user, substitutedUser);
|
||||
}
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
UserSession userSession = AppBeans.get(UserSessionSource.class).getUserSession();
|
||||
setUser(userSession.getUser());
|
||||
setSubstitutedUser(userSession.getSubstitutedUser());
|
||||
}
|
||||
}
|
@ -41,11 +41,11 @@ public class User extends StandardEntity {
|
||||
|
||||
private static final long serialVersionUID = 5007187642916030394L;
|
||||
|
||||
@Column(name = "LOGIN", length = LOGIN_FIELD_LEN, nullable = false)
|
||||
@Column(name = "LOGIN", length = 50, nullable = false)
|
||||
protected String login;
|
||||
|
||||
@SystemLevel
|
||||
@Column(name = "LOGIN_LC", length = LOGIN_FIELD_LEN, nullable = false)
|
||||
@Column(name = "LOGIN_LC", length = 50, nullable = false)
|
||||
protected String loginLowerCase;
|
||||
|
||||
@SystemLevel
|
||||
|
Loading…
Reference in New Issue
Block a user