From 23bfac769b3e2adc17f03ce6b4481d0698a66dc8 Mon Sep 17 00:00:00 2001 From: jensp Date: Fri, 6 Apr 2012 14:54:48 +0000 Subject: [PATCH] Optimierung Assoziationen Publication <-> Series und Series <-> GenericPerson git-svn-id: https://svn.libreccm.org/ccm/trunk@1574 8810af33-2d31-482b-a856-94f89814c4df --- .../com/arsdigita/content-types/Series.pdl | 36 +-- .../com/arsdigita/cms/contenttypes/Series.xml | 2 +- .../cms/contenttypes/EditshipCollection.java | 6 +- .../arsdigita/cms/contenttypes/Series.java | 55 +++-- .../cms/contenttypes/SeriesBundle.java | 226 ++++++++++++++++++ .../VolumeInSeriesCollection.java | 19 +- .../cms/contenttypes/ui/PublisherCreate.java | 2 - .../cms/contenttypes/ui/SeriesCreate.java | 52 ++++ 8 files changed, 346 insertions(+), 52 deletions(-) create mode 100644 ccm-sci-publications/src/com/arsdigita/cms/contenttypes/SeriesBundle.java create mode 100644 ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/SeriesCreate.java diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/Series.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/Series.pdl index 941134072..ce4eacbf5 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/Series.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/Series.pdl @@ -20,6 +20,7 @@ model com.arsdigita.cms.contenttypes; import com.arsdigita.cms.ContentPage; +import com.arsdigita.cms.ContentBundle; // The contenttype described in this PDL file represents a series of publications. object type Series extends ContentPage { @@ -27,21 +28,24 @@ object type Series extends ContentPage { reference key (ct_series.series_id); String[0..1] abstract = ct_series.abstract VARCHAR(4096); +} +object type SeriesBundle extends ContentBundle { + reference key (ct_series_bundles.bundle_id); } //Assoication for the editship of a series association { - Series[0..n] series = join cms_persons.person_id - to ct_series_editship.person_id, - join ct_series_editship.series_id - to ct_series.series_id; + SeriesBundle[0..n] series = join cms_person_bundles.bundle_id + to ct_series_editship.person_id, + join ct_series_editship.series_id + to ct_series_bundles.bundle_id; - GenericPerson[0..n] editors = join ct_series.series_id - to ct_series_editship.series_id, - join ct_series_editship.person_id - to cms_persons.person_id; + GenericPersonBundle[0..n] editors = join ct_series_bundles.bundle_id + to ct_series_editship.series_id, + join ct_series_editship.person_id + to cms_person_bundles.bundle_id; // Additional attributes for the editship Date[0..1] dateFrom = ct_series_editship.dateFrom DATE; @@ -55,15 +59,15 @@ association { //Assoication for the volumes in the series association { - Series[0..n] series = join ct_publications.publication_id - to ct_publications_volume_in_series.publication_id, - join ct_publications_volume_in_series.series_id - to ct_series.series_id; + SeriesBundle[0..n] series = join ct_publication_bundles.bundle_id + to ct_publications_volume_in_series.publication_id, + join ct_publications_volume_in_series.series_id + to ct_series_bundles.bundle_id; - Publication[0..n] publications = join ct_series.series_id - to ct_publications_volume_in_series.series_id, - join ct_publications_volume_in_series.publication_id - to ct_publications.publication_id; + PublicationBundle[0..n] publications = join ct_series_bundles.bundle_id + to ct_publications_volume_in_series.series_id, + join ct_publications_volume_in_series.publication_id + to ct_publication_bundles.bundle_id; // Additional attributes Integer[0..1] volumeOfSeries = ct_publications_volume_in_series.volumeOfSeries INTEGER; } \ No newline at end of file diff --git a/ccm-sci-publications/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Series.xml b/ccm-sci-publications/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Series.xml index 23314d47c..d74c9fc0a 100644 --- a/ccm-sci-publications/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Series.xml +++ b/ccm-sci-publications/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Series.xml @@ -10,7 +10,7 @@ objectType="com.arsdigita.cms.contenttypes.Series" classname="com.arsdigita.cms.contenttypes.Series"> - +