Merge branch 'master' into replace-ccmsh-with-wildfly-maven-plugin

ccm-docs
Jens Pelzetter 2020-06-14 18:50:06 +02:00
commit cff4f5b6d7
34 changed files with 596 additions and 59 deletions

View File

@ -0,0 +1,150 @@
package db.migrations.org.librecms.ccm_cms;
import org.flywaydb.core.api.migration.BaseJavaMigration;
import org.flywaydb.core.api.migration.Context;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_24__add_lifecycle_uuid extends BaseJavaMigration {
@Override
public void migrate(final Context context) throws Exception {
final Connection connection = context.getConnection();
final List<Long> lifecycleIds = retrieveLifecycleIds(connection);
final List<Long> definitionIds = retrieveDefinitionIds(
connection
);
addLifecycleUuidCol(connection);
addDefinitionLifecycleCol(connection);
setLifecycleUuid(connection, lifecycleIds);
setDefinitionUuid(connection, definitionIds);
addLifecycleUniqueConstraint(connection);
addDefinitionUniqueConstraint(connection);
}
private List<Long> retrieveLifecycleIds(final Connection connection)
throws Exception {
final List<Long> result = new ArrayList<>();
try (PreparedStatement stmt = connection
.prepareStatement("select LIFECYCLE_ID from LIFECYCLES");
ResultSet resultSet = stmt.executeQuery()) {
while (resultSet.next()) {
result.add(resultSet.getLong("LIFECYCLE_ID"));
}
}
return result;
}
private List<Long> retrieveDefinitionIds(final Connection connection)
throws Exception {
final List<Long> result = new ArrayList<>();
try (PreparedStatement stmt = connection
.prepareStatement(
"select LIFECYCLE_DEFINITION_ID "
+ "from LIFECYLE_DEFINITIONS"
);
ResultSet resultSet = stmt.executeQuery()) {
while (resultSet.next()) {
result.add(resultSet.getLong("LIFECYCLE_ID"));
}
}
return result;
}
private void addLifecycleUuidCol(final Connection connection)
throws Exception {
try (PreparedStatement stmt = connection.prepareStatement(
"alter table LIFECYCLES add column UUID varchar(255)"
)) {
stmt.execute();
}
}
private void addDefinitionLifecycleCol(final Connection connection)
throws Exception {
try (PreparedStatement stmt = connection.prepareStatement(
"alter table lifecyle_definitions "
+ "add column UUID varchar(255)"
)) {
stmt.execute();
}
}
private void setLifecycleUuid(
final Connection connection, final List<Long> lifecycleIds
) throws Exception {
try (PreparedStatement stmt = connection.prepareStatement(
"update LIFECYCLES set UUID = ? where LIFECYCLE_ID = ?"
)) {
for (final Long lifecycleId : lifecycleIds) {
stmt.setString(1, UUID.randomUUID().toString());
stmt.setLong(2, lifecycleId);
stmt.executeUpdate();
stmt.clearParameters();
}
}
}
private void setDefinitionUuid(
final Connection connection, final List<Long> definitionIds
) throws Exception {
try (PreparedStatement stmt = connection.prepareStatement(
"update LIFECYLE_DEFINITIONS set UUID = ? "
+ "where LIFECYCLE_DEFINITION_ID = ?"
)) {
for (final Long lifecycleId : definitionIds) {
stmt.setString(1, UUID.randomUUID().toString());
stmt.setLong(2, lifecycleId);
stmt.executeUpdate();
stmt.clearParameters();
}
}
}
private void addLifecycleUniqueConstraint(
final Connection connection
) throws Exception {
try (PreparedStatement stmt = connection.prepareStatement(
"alter table LIFECYCLES "
+ "add constraint UK_40o4njo54m8c4xlwq6ctnsimd "
+ "unique (UUID)"
)) {
stmt.execute();
}
}
private void addDefinitionUniqueConstraint(
final Connection connection
) throws Exception {
try (PreparedStatement stmt = connection.prepareStatement(
"alter table LIFECYLE_DEFINITIONS "
+ "add constraint UK_n6ki3s5im2k2nccpocuctqqe3 "
+ "unique (UUID)"
)) {
stmt.execute();
}
}
}

View File

@ -0,0 +1,22 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package db.migrations.org.librecms.ccm_cms.h2;
import org.flywaydb.core.api.migration.Context;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_24__add_lifecycle_uuid
extends db.migrations.org.librecms.ccm_cms.V7_0_0_24__add_lifecycle_uuid {
@Override
public void migrate(final Context context) throws Exception {
super.migrate(context);
}
}

View File

@ -0,0 +1,22 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package db.migrations.org.librecms.ccm_cms.pgsql;
import org.flywaydb.core.api.migration.Context;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_24__add_lifecycle_uuid
extends db.migrations.org.librecms.ccm_cms.V7_0_0_24__add_lifecycle_uuid {
@Override
public void migrate(final Context context) throws Exception {
super.migrate(context);
}
}

View File

@ -268,9 +268,11 @@ public class ContentSectionSetup extends AbstractCcmApplicationSetup {
section.addRole(contentReader); section.addRole(contentReader);
final LifecycleDefinition lifecycleDefinition = new LifecycleDefinition(); final LifecycleDefinition lifecycleDefinition = new LifecycleDefinition();
lifecycleDefinition.setUuid(UUID.randomUUID().toString());
lifecycleDefinition.getLabel().addValue(Locale.ENGLISH, "Standard"); lifecycleDefinition.getLabel().addValue(Locale.ENGLISH, "Standard");
final Workflow workflow = new Workflow(); final Workflow workflow = new Workflow();
workflow.setUuid(UUID.randomUUID().toString());
workflow.setAbstractWorkflow(true); workflow.setAbstractWorkflow(true);
workflow.getName().addValue(Locale.ENGLISH, "Standard"); workflow.getName().addValue(Locale.ENGLISH, "Standard");

View File

@ -18,6 +18,9 @@
*/ */
package org.librecms.lifecycle; package org.librecms.lifecycle;
import org.hibernate.search.annotations.Field;
import org.libreccm.core.Identifiable;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
@ -36,6 +39,8 @@ import javax.persistence.OneToOne;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Temporal; import javax.persistence.Temporal;
import javax.persistence.TemporalType; import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlElement;
import static org.librecms.CmsConstants.*; import static org.librecms.CmsConstants.*;
@ -45,7 +50,7 @@ import static org.librecms.CmsConstants.*;
*/ */
@Entity @Entity
@Table(name = "LIFECYCLES", schema = DB_SCHEMA) @Table(name = "LIFECYCLES", schema = DB_SCHEMA)
public class Lifecycle implements Serializable { public class Lifecycle implements Identifiable, Serializable {
private static final long serialVersionUID = 184357562249530038L; private static final long serialVersionUID = 184357562249530038L;
@ -54,6 +59,15 @@ public class Lifecycle implements Serializable {
@Column(name = "LIFECYCLE_ID") @Column(name = "LIFECYCLE_ID")
private long lifecycleId; private long lifecycleId;
/**
*
*/
@Column(name = "UUID", unique = true)
@NotNull
@Field
@XmlElement(name = "uuid")
private String uuid;
@Column(name = "START_DATE_TIME") @Column(name = "START_DATE_TIME")
@Temporal(TemporalType.DATE) @Temporal(TemporalType.DATE)
private Date startDateTime; private Date startDateTime;
@ -90,6 +104,15 @@ public class Lifecycle implements Serializable {
this.lifecycleId = lifecycleId; this.lifecycleId = lifecycleId;
} }
@Override
public String getUuid() {
return uuid;
}
public void setUuid(final String uuid) {
this.uuid = uuid;
}
public Date getStartDateTime() { public Date getStartDateTime() {
return new Date(startDateTime.getTime()); return new Date(startDateTime.getTime());
} }
@ -232,4 +255,5 @@ public class Lifecycle implements Serializable {
Objects.toString(definition), Objects.toString(definition),
data); data);
} }
} }

View File

@ -18,6 +18,8 @@
*/ */
package org.librecms.lifecycle; package org.librecms.lifecycle;
import org.hibernate.search.annotations.Field;
import org.libreccm.core.Identifiable;
import org.libreccm.l10n.LocalizedString; import org.libreccm.l10n.LocalizedString;
import java.io.Serializable; import java.io.Serializable;
@ -37,6 +39,8 @@ import javax.persistence.JoinColumn;
import javax.persistence.JoinTable; import javax.persistence.JoinTable;
import javax.persistence.OneToMany; import javax.persistence.OneToMany;
import javax.persistence.Table; import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlElement;
import static org.librecms.CmsConstants.*; import static org.librecms.CmsConstants.*;
@ -46,7 +50,7 @@ import static org.librecms.CmsConstants.*;
*/ */
@Entity @Entity
@Table(name = "LIFECYLE_DEFINITIONS", schema = DB_SCHEMA) @Table(name = "LIFECYLE_DEFINITIONS", schema = DB_SCHEMA)
public class LifecycleDefinition implements Serializable { public class LifecycleDefinition implements Identifiable, Serializable {
private static final long serialVersionUID = 1291162870555527717L; private static final long serialVersionUID = 1291162870555527717L;
@ -55,6 +59,12 @@ public class LifecycleDefinition implements Serializable {
@Column(name = "LIFECYCLE_DEFINITION_ID") @Column(name = "LIFECYCLE_DEFINITION_ID")
private long definitionId; private long definitionId;
@Column(name = "UUID", unique = true)
@NotNull
@Field
@XmlElement(name = "uuid")
private String uuid;
@Embedded @Embedded
@AssociationOverride( @AssociationOverride(
name = "values", name = "values",
@ -96,6 +106,15 @@ public class LifecycleDefinition implements Serializable {
this.definitionId = definitionId; this.definitionId = definitionId;
} }
@Override
public String getUuid() {
return uuid;
}
public void setUuid(final String uuid) {
this.uuid = uuid;
}
public LocalizedString getLabel() { public LocalizedString getLabel() {
return label; return label;
} }

View File

@ -20,6 +20,8 @@ package org.librecms.lifecycle;
import org.libreccm.core.AbstractEntityRepository; import org.libreccm.core.AbstractEntityRepository;
import java.util.UUID;
import javax.enterprise.context.RequestScoped; import javax.enterprise.context.RequestScoped;
/** /**
@ -52,4 +54,12 @@ public class LifecycleDefinitionRepository
return lifecycleDefinition.getDefinitionId() == 0; return lifecycleDefinition.getDefinitionId() == 0;
} }
@Override
protected void initNewEntity(final LifecycleDefinition entity) {
super.initNewEntity(entity);
entity.setUuid(UUID.randomUUID().toString());
}
} }

View File

@ -20,6 +20,8 @@ package org.librecms.lifecycle;
import org.libreccm.core.AbstractEntityRepository; import org.libreccm.core.AbstractEntityRepository;
import java.util.UUID;
import javax.enterprise.context.RequestScoped; import javax.enterprise.context.RequestScoped;
/** /**
@ -30,6 +32,8 @@ import javax.enterprise.context.RequestScoped;
public class LifecycleRepository public class LifecycleRepository
extends AbstractEntityRepository<Long, Lifecycle> { extends AbstractEntityRepository<Long, Lifecycle> {
private static final long serialVersionUID = 1L;
@Override @Override
public Class<Lifecycle> getEntityClass() { public Class<Lifecycle> getEntityClass() {
return Lifecycle.class; return Lifecycle.class;
@ -50,4 +54,10 @@ public class LifecycleRepository
return lifecycle.getLifecycleId() == 0; return lifecycle.getLifecycleId() == 0;
} }
@Override
protected void initNewEntity(final Lifecycle entity) {
super.initNewEntity(entity);
entity.setUuid(UUID.randomUUID().toString());
}
} }

View File

@ -1,9 +1,8 @@
drop schema if exists CCM_CMS; drop schema if exists CCM_CMS CASCADE;
drop schema if exists CCM_CORE; drop schema if exists CCM_CORE CASCADE;
drop sequence if exists HIBERNATE_SEQUENCE; drop sequence if exists HIBERNATE_SEQUENCE;
create schema CCM_CMS; create schema CCM_CMS;
create schema CCM_CORE; create schema CCM_CORE;

View File

@ -736,6 +736,7 @@
LISTENER varchar(1024), LISTENER varchar(1024),
START_DATE_TIME date, START_DATE_TIME date,
STARTED boolean, STARTED boolean,
UUID varchar(255),
DEFINITION_ID bigint, DEFINITION_ID bigint,
primary key (LIFECYCLE_ID) primary key (LIFECYCLE_ID)
); );
@ -743,6 +744,7 @@
create table CCM_CMS.LIFECYLE_DEFINITIONS ( create table CCM_CMS.LIFECYLE_DEFINITIONS (
LIFECYCLE_DEFINITION_ID bigint not null, LIFECYCLE_DEFINITION_ID bigint not null,
DEFAULT_LISTENER varchar(1024), DEFAULT_LISTENER varchar(1024),
UUID varchar(255),
primary key (LIFECYCLE_DEFINITION_ID) primary key (LIFECYCLE_DEFINITION_ID)
); );
@ -1040,6 +1042,12 @@
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
add constraint UK_goj42ghwu4tf1akfb2r6ensns unique (WORKFLOW_TEMPLATE_ID); add constraint UK_goj42ghwu4tf1akfb2r6ensns unique (WORKFLOW_TEMPLATE_ID);
alter table CCM_CMS.LIFECYCLES
add constraint UK_40o4njo54m8c4xlwq6ctnsimd unique (UUID);
alter table CCM_CMS.LIFECYLE_DEFINITIONS
add constraint UK_n6ki3s5im2k2nccpocuctqqe3 unique (UUID);
create table CCM_CORE.APPLICATIONS ( create table CCM_CORE.APPLICATIONS (
APPLICATION_TYPE varchar(1024) not null, APPLICATION_TYPE varchar(1024) not null,
PRIMARY_URL varchar(1024) not null, PRIMARY_URL varchar(1024) not null,
@ -1584,11 +1592,11 @@
SETTING_ID bigint not null, SETTING_ID bigint not null,
CONFIGURATION_CLASS varchar(512) not null, CONFIGURATION_CLASS varchar(512) not null,
NAME varchar(512) not null, NAME varchar(512) not null,
SETTING_VALUE_LONG bigint,
SETTING_VALUE_BIG_DECIMAL decimal(19,2), SETTING_VALUE_BIG_DECIMAL decimal(19,2),
SETTING_VALUE_DOUBLE double,
SETTING_VALUE_STRING varchar(1024),
SETTING_VALUE_BOOLEAN boolean, SETTING_VALUE_BOOLEAN boolean,
SETTING_VALUE_LONG bigint,
SETTING_VALUE_STRING varchar(1024),
SETTING_VALUE_DOUBLE double,
primary key (SETTING_ID) primary key (SETTING_ID)
); );

View File

@ -736,6 +736,7 @@
LISTENER varchar(1024), LISTENER varchar(1024),
START_DATE_TIME date, START_DATE_TIME date,
STARTED boolean, STARTED boolean,
UUID varchar(255),
DEFINITION_ID int8, DEFINITION_ID int8,
primary key (LIFECYCLE_ID) primary key (LIFECYCLE_ID)
); );
@ -743,6 +744,7 @@
create table CCM_CMS.LIFECYLE_DEFINITIONS ( create table CCM_CMS.LIFECYLE_DEFINITIONS (
LIFECYCLE_DEFINITION_ID int8 not null, LIFECYCLE_DEFINITION_ID int8 not null,
DEFAULT_LISTENER varchar(1024), DEFAULT_LISTENER varchar(1024),
UUID varchar(255),
primary key (LIFECYCLE_DEFINITION_ID) primary key (LIFECYCLE_DEFINITION_ID)
); );
@ -1040,6 +1042,12 @@
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
add constraint UK_goj42ghwu4tf1akfb2r6ensns unique (WORKFLOW_TEMPLATE_ID); add constraint UK_goj42ghwu4tf1akfb2r6ensns unique (WORKFLOW_TEMPLATE_ID);
alter table CCM_CMS.LIFECYCLES
add constraint UK_40o4njo54m8c4xlwq6ctnsimd unique (UUID);
alter table CCM_CMS.LIFECYLE_DEFINITIONS
add constraint UK_n6ki3s5im2k2nccpocuctqqe3 unique (UUID);
create table CCM_CORE.APPLICATIONS ( create table CCM_CORE.APPLICATIONS (
APPLICATION_TYPE varchar(1024) not null, APPLICATION_TYPE varchar(1024) not null,
PRIMARY_URL varchar(1024) not null, PRIMARY_URL varchar(1024) not null,
@ -1584,11 +1592,11 @@
SETTING_ID int8 not null, SETTING_ID int8 not null,
CONFIGURATION_CLASS varchar(512) not null, CONFIGURATION_CLASS varchar(512) not null,
NAME varchar(512) not null, NAME varchar(512) not null,
SETTING_VALUE_LONG int8,
SETTING_VALUE_BIG_DECIMAL numeric(19, 2), SETTING_VALUE_BIG_DECIMAL numeric(19, 2),
SETTING_VALUE_DOUBLE float8,
SETTING_VALUE_STRING varchar(1024),
SETTING_VALUE_BOOLEAN boolean, SETTING_VALUE_BOOLEAN boolean,
SETTING_VALUE_LONG int8,
SETTING_VALUE_STRING varchar(1024),
SETTING_VALUE_DOUBLE float8,
primary key (SETTING_ID) primary key (SETTING_ID)
); );

View File

@ -221,6 +221,80 @@
primary key (COMPONENT_MODEL_ID) primary key (COMPONENT_MODEL_ID)
); );
create table CCM_CMS.CONTACT_ENTRIES (
CONTACT_ENTRY_ID bigint not null,
ENTRY_ORDER bigint,
ENTRY_VALUE varchar(4096),
CONTACT_ENTRY_KEY_ID bigint,
CONTACTABLE_ID bigint,
primary key (CONTACT_ENTRY_ID)
);
create table CCM_CMS.CONTACT_ENTRIES_AUD (
CONTACT_ENTRY_ID bigint not null,
REV integer not null,
REVTYPE tinyint,
REVEND integer,
ENTRY_ORDER bigint,
ENTRY_VALUE varchar(4096),
CONTACT_ENTRY_KEY_ID bigint,
primary key (CONTACT_ENTRY_ID, REV)
);
create table CCM_CMS.CONTACT_ENTRY_KEY_LABELS (
KEY_ID bigint not null,
LOCALIZED_VALUE varchar(2147483647),
LOCALE varchar(255) not null,
primary key (KEY_ID, LOCALE)
);
create table CCM_CMS.CONTACT_ENTRY_KEY_LABELS_AUD (
REV integer not null,
KEY_ID bigint not null,
LOCALIZED_VALUE varchar(2147483647) not null,
LOCALE varchar(255) not null,
REVTYPE tinyint,
REVEND integer,
primary key (REV, KEY_ID, LOCALIZED_VALUE, LOCALE)
);
create table CCM_CMS.CONTACT_ENTRY_KEYS (
KEY_ID bigint not null,
ENTRY_KEY varchar(255),
primary key (KEY_ID)
);
create table CCM_CMS.CONTACT_ENTRY_KEYS_AUD (
KEY_ID bigint not null,
REV integer not null,
REVTYPE tinyint,
REVEND integer,
ENTRY_KEY varchar(255),
primary key (KEY_ID, REV)
);
create table CCM_CMS.CONTACTABLE_ENTITIES (
OBJECT_ID bigint not null,
POSTAL_ADDRESS_ID bigint,
primary key (OBJECT_ID)
);
create table CCM_CMS.CONTACTABLE_ENTITIES_AUD (
OBJECT_ID bigint not null,
REV integer not null,
POSTAL_ADDRESS_ID bigint,
primary key (OBJECT_ID, REV)
);
create table CCM_CMS.ContactableEntity_ContactEntry_AUD (
REV integer not null,
CONTACTABLE_ID bigint not null,
CONTACT_ENTRY_ID bigint not null,
REVTYPE tinyint,
REVEND integer,
primary key (REV, CONTACTABLE_ID, CONTACT_ENTRY_ID)
);
create table CCM_CMS.CONTENT_ITEM_COMPONENTS ( create table CCM_CMS.CONTENT_ITEM_COMPONENTS (
MODE varchar(255), MODE varchar(255),
COMPONENT_MODEL_ID bigint not null, COMPONENT_MODEL_ID bigint not null,
@ -662,6 +736,7 @@
LISTENER varchar(1024), LISTENER varchar(1024),
START_DATE_TIME date, START_DATE_TIME date,
STARTED boolean, STARTED boolean,
UUID varchar(255),
DEFINITION_ID bigint, DEFINITION_ID bigint,
primary key (LIFECYCLE_ID) primary key (LIFECYCLE_ID)
); );
@ -669,6 +744,7 @@
create table CCM_CMS.LIFECYLE_DEFINITIONS ( create table CCM_CMS.LIFECYLE_DEFINITIONS (
LIFECYCLE_DEFINITION_ID bigint not null, LIFECYCLE_DEFINITION_ID bigint not null,
DEFAULT_LISTENER varchar(1024), DEFAULT_LISTENER varchar(1024),
UUID varchar(255),
primary key (LIFECYCLE_DEFINITION_ID) primary key (LIFECYCLE_DEFINITION_ID)
); );
@ -805,6 +881,19 @@
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE) primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
); );
create table CCM_CMS.ORGANIZATIONS (
NAME varchar(1024),
OBJECT_ID bigint not null,
primary key (OBJECT_ID)
);
create table CCM_CMS.ORGANIZATIONS_AUD (
OBJECT_ID bigint not null,
REV integer not null,
NAME varchar(1024),
primary key (OBJECT_ID, REV)
);
create table CCM_CMS.PAGE_THEME_CONFIGURATIONS ( create table CCM_CMS.PAGE_THEME_CONFIGURATIONS (
PAGE_ID bigint not null, PAGE_ID bigint not null,
INDEX_PAGE_TEMPLATE varchar(255), INDEX_PAGE_TEMPLATE varchar(255),
@ -827,6 +916,60 @@
primary key (OBJECT_ID) primary key (OBJECT_ID)
); );
create table CCM_CMS.PERSON_NAMES (
PERSON_ID bigint not null,
GIVEN_NAME varchar(255),
NAME_PREFIX varchar(255),
SUFFIX varchar(255),
SURNAME varchar(255)
);
create table CCM_CMS.PERSON_NAMES_AUD (
REV integer not null,
REVTYPE tinyint not null,
PERSON_ID bigint not null,
REVEND integer,
SURNAME varchar(255),
NAME_PREFIX varchar(255),
GIVEN_NAME varchar(255),
SUFFIX varchar(255),
primary key (REV, REVTYPE, PERSON_ID)
);
create table CCM_CMS.PERSONS (
BIRTHDATE date,
OBJECT_ID bigint not null,
primary key (OBJECT_ID)
);
create table CCM_CMS.PERSONS_AUD (
OBJECT_ID bigint not null,
REV integer not null,
BIRTHDATE date,
primary key (OBJECT_ID, REV)
);
create table CCM_CMS.POSTAL_ADDRESSES (
ADDRESS varchar(2048),
CITY varchar(512),
ISO_COUNTRY_CODE varchar(10),
POSTAL_CODE varchar(255),
ADDRESS_STATE varchar(255),
OBJECT_ID bigint not null,
primary key (OBJECT_ID)
);
create table CCM_CMS.POSTAL_ADDRESSES_AUD (
OBJECT_ID bigint not null,
REV integer not null,
ADDRESS varchar(2048),
CITY varchar(512),
ISO_COUNTRY_CODE varchar(10),
POSTAL_CODE varchar(255),
ADDRESS_STATE varchar(255),
primary key (OBJECT_ID, REV)
);
create table CCM_CMS.RELATED_LINKS ( create table CCM_CMS.RELATED_LINKS (
OBJECT_ID bigint not null, OBJECT_ID bigint not null,
BOOKMARK_ID bigint, BOOKMARK_ID bigint,
@ -899,6 +1042,12 @@
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
add constraint UK_goj42ghwu4tf1akfb2r6ensns unique (WORKFLOW_TEMPLATE_ID); add constraint UK_goj42ghwu4tf1akfb2r6ensns unique (WORKFLOW_TEMPLATE_ID);
alter table CCM_CMS.LIFECYCLES
add constraint UK_40o4njo54m8c4xlwq6ctnsimd unique (UUID);
alter table CCM_CMS.LIFECYLE_DEFINITIONS
add constraint UK_n6ki3s5im2k2nccpocuctqqe3 unique (UUID);
create table CCM_CORE.APPLICATIONS ( create table CCM_CORE.APPLICATIONS (
APPLICATION_TYPE varchar(1024) not null, APPLICATION_TYPE varchar(1024) not null,
PRIMARY_URL varchar(1024) not null, PRIMARY_URL varchar(1024) not null,
@ -1444,10 +1593,10 @@
CONFIGURATION_CLASS varchar(512) not null, CONFIGURATION_CLASS varchar(512) not null,
NAME varchar(512) not null, NAME varchar(512) not null,
SETTING_VALUE_BIG_DECIMAL decimal(19,2), SETTING_VALUE_BIG_DECIMAL decimal(19,2),
SETTING_VALUE_DOUBLE double,
SETTING_VALUE_BOOLEAN boolean, SETTING_VALUE_BOOLEAN boolean,
SETTING_VALUE_LONG bigint, SETTING_VALUE_LONG bigint,
SETTING_VALUE_STRING varchar(1024), SETTING_VALUE_STRING varchar(1024),
SETTING_VALUE_DOUBLE double,
primary key (SETTING_ID) primary key (SETTING_ID)
); );
@ -1917,6 +2066,76 @@ create sequence hibernate_sequence start with 1 increment by 1;
foreign key (COMPONENT_MODEL_ID) foreign key (COMPONENT_MODEL_ID)
references CCM_CORE.PAGE_MODEL_COMPONENT_MODELS; references CCM_CORE.PAGE_MODEL_COMPONENT_MODELS;
alter table CCM_CMS.CONTACT_ENTRIES
add constraint FKirtfj8sm4y5myworl5hvs1l78
foreign key (CONTACT_ENTRY_KEY_ID)
references CCM_CMS.CONTACT_ENTRY_KEYS;
alter table CCM_CMS.CONTACT_ENTRIES
add constraint FKljrrfco44damal9eaqrnfam0m
foreign key (CONTACTABLE_ID)
references CCM_CMS.CONTACTABLE_ENTITIES;
alter table CCM_CMS.CONTACT_ENTRIES_AUD
add constraint FKib8xp3ab8kdkc0six36f99e2g
foreign key (REV)
references CCM_CORE.CCM_REVISIONS;
alter table CCM_CMS.CONTACT_ENTRIES_AUD
add constraint FKrse7ibjqsfnny5t1b2tqqs3pt
foreign key (REVEND)
references CCM_CORE.CCM_REVISIONS;
alter table CCM_CMS.CONTACT_ENTRY_KEY_LABELS
add constraint FK243nk3buqm0pskkr5ifjqfxn5
foreign key (KEY_ID)
references CCM_CMS.CONTACT_ENTRY_KEYS;
alter table CCM_CMS.CONTACT_ENTRY_KEY_LABELS_AUD
add constraint FK6n995k5gao6v63gfcga3yaxcw
foreign key (REV)
references CCM_CORE.CCM_REVISIONS;
alter table CCM_CMS.CONTACT_ENTRY_KEY_LABELS_AUD
add constraint FKdr8ujdpn1ej8l6omlxq8bsxbd
foreign key (REVEND)
references CCM_CORE.CCM_REVISIONS;
alter table CCM_CMS.CONTACT_ENTRY_KEYS_AUD
add constraint FKcvn2b1h1d4uvvmtbf4qf81l0y
foreign key (REV)
references CCM_CORE.CCM_REVISIONS;
alter table CCM_CMS.CONTACT_ENTRY_KEYS_AUD
add constraint FKkyy4v3tax8w5htnpkmmt8aec1
foreign key (REVEND)
references CCM_CORE.CCM_REVISIONS;
alter table CCM_CMS.CONTACTABLE_ENTITIES
add constraint FKqefwowr9adclj3xvpfje9rddr
foreign key (POSTAL_ADDRESS_ID)
references CCM_CMS.POSTAL_ADDRESSES;
alter table CCM_CMS.CONTACTABLE_ENTITIES
add constraint FKhdwlhf3jp8wf5wxjkoynrcspj
foreign key (OBJECT_ID)
references CCM_CMS.ASSETS;
alter table CCM_CMS.CONTACTABLE_ENTITIES_AUD
add constraint FKjx8trfvt96fkdn6bafnh839id
foreign key (OBJECT_ID, REV)
references CCM_CMS.ASSETS_AUD;
alter table CCM_CMS.ContactableEntity_ContactEntry_AUD
add constraint FKs5tfdp1auj9ocgvfa9ivec517
foreign key (REV)
references CCM_CORE.CCM_REVISIONS;
alter table CCM_CMS.ContactableEntity_ContactEntry_AUD
add constraint FKskn2ovg24tnnnwd2o8y0biyje
foreign key (REVEND)
references CCM_CORE.CCM_REVISIONS;
alter table CCM_CMS.CONTENT_ITEM_COMPONENTS alter table CCM_CMS.CONTENT_ITEM_COMPONENTS
add constraint FKp83o82kxo2ipa0xo03wxp4dcr add constraint FKp83o82kxo2ipa0xo03wxp4dcr
foreign key (COMPONENT_MODEL_ID) foreign key (COMPONENT_MODEL_ID)
@ -2447,6 +2666,16 @@ create sequence hibernate_sequence start with 1 increment by 1;
foreign key (REVEND) foreign key (REVEND)
references CCM_CORE.CCM_REVISIONS; references CCM_CORE.CCM_REVISIONS;
alter table CCM_CMS.ORGANIZATIONS
add constraint FK77ig0to48xrlfx8qsc0vlfsp6
foreign key (OBJECT_ID)
references CCM_CMS.CONTACTABLE_ENTITIES;
alter table CCM_CMS.ORGANIZATIONS_AUD
add constraint FKp0k3bf008pih96sguio80siql
foreign key (OBJECT_ID, REV)
references CCM_CMS.CONTACTABLE_ENTITIES_AUD;
alter table CCM_CMS.PAGE_THEME_CONFIGURATIONS alter table CCM_CMS.PAGE_THEME_CONFIGURATIONS
add constraint FK6l6xp6ex6sh2uuxfmeekf6ckn add constraint FK6l6xp6ex6sh2uuxfmeekf6ckn
foreign key (PAGE_ID) foreign key (PAGE_ID)
@ -2477,6 +2706,41 @@ create sequence hibernate_sequence start with 1 increment by 1;
foreign key (OBJECT_ID) foreign key (OBJECT_ID)
references CCM_CORE.SITE_AWARE_APPLICATIONS; references CCM_CORE.SITE_AWARE_APPLICATIONS;
alter table CCM_CMS.PERSON_NAMES
add constraint FK2yluyhmpuhwxafcbna6u8txrt
foreign key (PERSON_ID)
references CCM_CMS.PERSONS;
alter table CCM_CMS.PERSON_NAMES_AUD
add constraint FKtqtlwx8pa9ydh009sudtpfxie
foreign key (REV)
references CCM_CORE.CCM_REVISIONS;
alter table CCM_CMS.PERSON_NAMES_AUD
add constraint FKs6m8tgbp8agrd5q3klwbtcujg
foreign key (REVEND)
references CCM_CORE.CCM_REVISIONS;
alter table CCM_CMS.PERSONS
add constraint FKiv4ydysjekfx64pkb5v4vd9yj
foreign key (OBJECT_ID)
references CCM_CMS.CONTACTABLE_ENTITIES;
alter table CCM_CMS.PERSONS_AUD
add constraint FKpup1q3295qkuovaptq8aj5lxp
foreign key (OBJECT_ID, REV)
references CCM_CMS.CONTACTABLE_ENTITIES_AUD;
alter table CCM_CMS.POSTAL_ADDRESSES
add constraint FK4vajjjjo8ro0wns58t8f3i782
foreign key (OBJECT_ID)
references CCM_CMS.ASSETS;
alter table CCM_CMS.POSTAL_ADDRESSES_AUD
add constraint FKcrxgaot6kcp9rbxlg8gpp4grg
foreign key (OBJECT_ID, REV)
references CCM_CMS.ASSETS_AUD;
alter table CCM_CMS.RELATED_LINKS alter table CCM_CMS.RELATED_LINKS
add constraint FKb517dnfj56oby2s34jp1omuim add constraint FKb517dnfj56oby2s34jp1omuim
foreign key (BOOKMARK_ID) foreign key (BOOKMARK_ID)

View File

@ -180,7 +180,7 @@ public class Categorization implements Serializable, Relation, Exportable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -129,7 +129,7 @@ public class DomainOwnership implements Serializable, Exportable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -47,7 +47,6 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.util.Properties; import java.util.Properties;
import javax.transaction.Transactional;
/** /**

View File

@ -125,7 +125,7 @@ public class ResourceType implements Serializable, Exportable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -132,7 +132,7 @@ public class ComponentModel implements Serializable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -140,7 +140,7 @@ public class ContainerModel implements Serializable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -289,7 +289,7 @@ public class PageModel implements Serializable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -104,7 +104,7 @@ public class GroupMembership implements Serializable, Exportable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -141,7 +141,7 @@ public class Party implements Serializable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -220,7 +220,7 @@ public class Permission implements Serializable, Exportable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -233,7 +233,7 @@ public class Role implements Serializable, Exportable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -104,7 +104,7 @@ public class RoleMembership implements Serializable, Exportable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -100,7 +100,7 @@ public class Theme implements Serializable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -125,7 +125,7 @@ public class ThemeFile implements Serializable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -240,7 +240,7 @@ public class Task implements Identifiable, Serializable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -92,7 +92,7 @@ public class TaskAssignment implements Serializable, Exportable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -110,7 +110,7 @@ public class TaskComment implements Identifiable, Serializable, Exportable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -79,7 +79,7 @@ public class TaskDependency implements Serializable, Exportable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -196,7 +196,7 @@ public class Workflow implements Identifiable, Serializable, Exportable {
return uuid; return uuid;
} }
protected void setUuid(final String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }

View File

@ -1,4 +1,4 @@
drop schema if exists CCM_CORE; drop schema if exists CCM_CORE CASCADE;
drop sequence if exists HIBERNATE_SEQUENCE; drop sequence if exists HIBERNATE_SEQUENCE;

View File

@ -1,5 +1,5 @@
DROP SCHEMA IF EXISTS ccm_docrepo; DROP SCHEMA IF EXISTS ccm_docrepo CASCADE;
DROP SCHEMA IF EXISTS ccm_core; DROP SCHEMA IF EXISTS ccm_core CASCADE;
DROP SEQUENCE IF EXISTS hibernate_sequence; DROP SEQUENCE IF EXISTS hibernate_sequence;

View File

@ -1,5 +1,5 @@
DROP SCHEMA IF EXISTS ccm_shortcuts; DROP SCHEMA IF EXISTS ccm_shortcuts CASCADE;
DROP SCHEMA IF EXISTS ccm_core; DROP SCHEMA IF EXISTS ccm_core CASCADE;
DROP SEQUENCE IF EXISTS hibernate_sequence; DROP SEQUENCE IF EXISTS hibernate_sequence;