CCM NG: Some fixes for minor things
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@5171 8810af33-2d31-482b-a856-94f89814c4df
Former-commit-id: fd3730bb9d
pull/2/head
parent
86956d3164
commit
19ce26e481
|
|
@ -82,7 +82,11 @@ class ItemPhaseTableModel implements TableModel {
|
|||
case 1:
|
||||
return currentRow.getDescription();
|
||||
case 2:
|
||||
return format.format(currentRow.getStartDate());
|
||||
if (currentRow.getStartDate() == null) {
|
||||
return "";
|
||||
} else {
|
||||
return format.format(currentRow.getStartDate());
|
||||
}
|
||||
case 3:
|
||||
if (currentRow.getEndDate() == null) {
|
||||
return new GlobalizedMessage("cms.ui.lifecycle.forever",
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import java.util.Date;
|
|||
class ItemPhaseTableRow implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8947185134493863779L;
|
||||
|
||||
|
||||
private long phaseId;
|
||||
private String name;
|
||||
private String description;
|
||||
|
|
@ -60,21 +60,35 @@ class ItemPhaseTableRow implements Serializable {
|
|||
}
|
||||
|
||||
public Date getStartDate() {
|
||||
return new Date(startDate.getTime());
|
||||
if (startDate == null) {
|
||||
return null;
|
||||
} else {
|
||||
return new Date(startDate.getTime());
|
||||
}
|
||||
}
|
||||
|
||||
public void setStartDate(final Date startDate) {
|
||||
this.startDate = new Date(startDate.getTime());
|
||||
if (startDate == null) {
|
||||
this.startDate = startDate;
|
||||
} else {
|
||||
this.startDate = new Date(startDate.getTime());
|
||||
}
|
||||
}
|
||||
|
||||
public Date getEndDate() {
|
||||
return new Date(endDate.getTime());
|
||||
if (endDate == null) {
|
||||
return null;
|
||||
} else {
|
||||
return new Date(endDate.getTime());
|
||||
}
|
||||
}
|
||||
|
||||
public void setEndDate(final Date endDate) {
|
||||
this.endDate = new Date(endDate.getTime());
|
||||
if (endDate == null) {
|
||||
this.endDate = endDate;
|
||||
} else {
|
||||
this.endDate = new Date(endDate.getTime());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,19 +85,35 @@ public class Phase implements Serializable {
|
|||
}
|
||||
|
||||
public Date getStartDateTime() {
|
||||
return new Date(startDateTime.getTime());
|
||||
if (startDateTime == null) {
|
||||
return null;
|
||||
} else {
|
||||
return new Date(startDateTime.getTime());
|
||||
}
|
||||
}
|
||||
|
||||
public void setStartDateTime(final Date startDateTime) {
|
||||
this.startDateTime = new Date(startDateTime.getTime());
|
||||
if (startDateTime == null) {
|
||||
this.startDateTime = startDateTime;
|
||||
} else {
|
||||
this.startDateTime = new Date(startDateTime.getTime());
|
||||
}
|
||||
}
|
||||
|
||||
public Date getEndDateTime() {
|
||||
return new Date(endDateTime.getTime());
|
||||
if (endDateTime == null) {
|
||||
return null;
|
||||
} else {
|
||||
return new Date(endDateTime.getTime());
|
||||
}
|
||||
}
|
||||
|
||||
public void setEndDateTime(final Date endDateTime) {
|
||||
this.endDateTime = new Date(endDateTime.getTime());
|
||||
if (endDateTime == null) {
|
||||
this.endDateTime = endDateTime;
|
||||
} else {
|
||||
this.endDateTime = new Date(endDateTime.getTime());
|
||||
}
|
||||
}
|
||||
|
||||
public String getListener() {
|
||||
|
|
@ -202,7 +218,7 @@ public class Phase implements Serializable {
|
|||
public final String toString() {
|
||||
return toString("");
|
||||
}
|
||||
|
||||
|
||||
public String toString(final String data) {
|
||||
return String.format("%s{ "
|
||||
+ "phaseId = %d, "
|
||||
|
|
|
|||
|
|
@ -12,4 +12,4 @@ alter table CCM_CMS.CONTENT_TYPES
|
|||
alter table CCM_CMS.CONTENT_TYPES
|
||||
add constraint FKhnu9oikw8rpf22lt5fmk41t7k
|
||||
foreign key (DEFAULT_WORKFLOW)
|
||||
references CCM_CORE.WORKFLOW_TEMPLATES;
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ alter table CCM_CMS.CONTENT_SECTION_LIFECYCLE_DEFINITIONS
|
|||
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
|
||||
add constraint FKrx08cdjm9tutrp5lvfhgslw48
|
||||
foreign key (WORKFLOW_TEMPLATE_ID)
|
||||
references CCM_CORE.WORKFLOW_TEMPLATES;
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
|
||||
add constraint FK6kuejkcl9hcbkr8q6bdlatt8q
|
||||
|
|
|
|||
|
|
@ -12,5 +12,5 @@ alter table CCM_CMS.CONTENT_TYPES
|
|||
alter table CCM_CMS.CONTENT_TYPES
|
||||
add constraint FKhnu9oikw8rpf22lt5fmk41t7k
|
||||
foreign key (DEFAULT_WORKFLOW)
|
||||
references CCM_CORE.WORKFLOW_TEMPLATES;
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ alter table CCM_CMS.CONTENT_SECTION_LIFECYCLE_DEFINITIONS
|
|||
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
|
||||
add constraint FKrx08cdjm9tutrp5lvfhgslw48
|
||||
foreign key (WORKFLOW_TEMPLATE_ID)
|
||||
references CCM_CORE.WORKFLOW_TEMPLATES;
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
|
||||
add constraint FK6kuejkcl9hcbkr8q6bdlatt8q
|
||||
|
|
|
|||
Loading…
Reference in New Issue