// // Copyright (C) 2014 Jens Pelzetter // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // model com.arsdigita.cms.contentassets; import com.arsdigita.cms.contenttypes.PublicationBundle; import com.arsdigita.kernel.ACSObject; import com.arsdigita.cms.ContentItem; association { PublicationBundle[0..n] discussedBy = join ct_publication_bundles.bundle_id to ca_publications_about.discussed_publication_id, join ca_publications_about.discussing_publication_id to ct_publication_bundles.bundle_id; PublicationBundle[0..n] discusses = join ct_publication_bundles.bundle_id to ca_publications_about.discussing_publication_id, join ca_publications_about.discussed_publication_id to ct_publication_bundles.bundle_id; Integer[0..1] publicationsOrder = ca_publications_about.publications_order INTEGER; } //Helper object to allow efficent filtering object type SciPublicationsAbout extends ACSObject { String[0..1] discusses = ca_publications_about_asset.discusses; String[0..1] discussedBy = ca_publications_about_asset.discussed_by; reference key ( ca_publications_about_asset.about_id); } association { composite ContentItem[1..1] owner = join ca_publications_about_asset.owner_id to cms_items.item_id; component SciPublicationsAbout[0..1] publicationsAbout = join cms_items.item_id to ca_publications_about_asset.owner_id; }