From 965dc3138b8df1253b3e6eb1955970f452479492 Mon Sep 17 00:00:00 2001 From: jensp Date: Thu, 12 Oct 2017 15:16:53 +0000 Subject: [PATCH] Missed a file git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@5043 8810af33-2d31-482b-a856-94f89814c4df --- .../librecms/pages/ThemeConfiguration.java | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 ccm-cms/src/main/java/org/librecms/pages/ThemeConfiguration.java diff --git a/ccm-cms/src/main/java/org/librecms/pages/ThemeConfiguration.java b/ccm-cms/src/main/java/org/librecms/pages/ThemeConfiguration.java new file mode 100644 index 000000000..6b0a8ffef --- /dev/null +++ b/ccm-cms/src/main/java/org/librecms/pages/ThemeConfiguration.java @@ -0,0 +1,124 @@ +/* + * Copyright (C) 2017 LibreCCM Foundation. + * + * 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., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.librecms.pages; + +import java.io.Serializable; +import java.util.Objects; + +import javax.persistence.Column; +import javax.persistence.Embeddable; + +/** + * + * @author Jens Pelzetter + */ +@Embeddable +public class ThemeConfiguration implements Serializable { + + private static final long serialVersionUID = -989896906728810984L; + + @Column(name = "THEME") + private String theme; + + @Column(name = "INDEX_PAGE_TEMPLATE") + private String indexPageTemplate; + + @Column(name = "ITEM_PAGE_TEMPLATE") + private String itemPageTemplate; + + public String getTheme() { + return theme; + } + + public void setTheme(final String theme) { + this.theme = theme; + } + + public String getIndexPageTemplate() { + return indexPageTemplate; + } + + public void setIndexPageTemplate(final String indexPageTemplate) { + this.indexPageTemplate = indexPageTemplate; + } + + public String getItemPageTemplate() { + return itemPageTemplate; + } + + public void setItemPageTemplate(final String itemPageTemplate) { + this.itemPageTemplate = itemPageTemplate; + } + + @Override + public int hashCode() { + int hash = 3; + hash = 59 * hash + Objects.hashCode(theme); + hash = 59 * hash + Objects.hashCode(indexPageTemplate); + hash = 59 * hash + Objects.hashCode(itemPageTemplate); + return hash; + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (!(obj instanceof ThemeConfiguration)) { + return false; + } + final ThemeConfiguration other = (ThemeConfiguration) obj; + if (!other.canEqual(this)) { + return false; + } + if (!Objects.equals(theme, other.getTheme())) { + return false; + } + if (!Objects.equals(indexPageTemplate, other.getIndexPageTemplate())) { + return false; + } + return Objects.equals(itemPageTemplate, other.getItemPageTemplate()); + } + + public boolean canEqual(final Object obj) { + return obj instanceof ThemeConfiguration; + } + + @Override + public final String toString() { + return toString(""); + } + + public String toString(final String data) { + return String.format("%s{ " + + "theme = \"%s\"," + + "indexPageTemplate = \"%s\", " + + "itemPageTemplate = \"%s\"%s" + + " }", + super.toString(), + theme, + indexPageTemplate, + itemPageTemplate, + data); + } + +}