]> git.mxchange.org Git - jcontacts-business-core.git/blob - src/org/mxchange/jcontactsbusiness/logo/CompanyLogo.java
no cascading may fix this? + updated jar(s)
[jcontacts-business-core.git] / src / org / mxchange / jcontactsbusiness / logo / CompanyLogo.java
1 /*
2  * Copyright (C) 2015 Roland Haeder
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 package org.mxchange.jcontactsbusiness.logo;
18
19 import javax.persistence.Basic;
20 import javax.persistence.Column;
21 import javax.persistence.Entity;
22 import javax.persistence.GeneratedValue;
23 import javax.persistence.GenerationType;
24 import javax.persistence.Id;
25 import javax.persistence.Table;
26
27 /**
28  * A POJO for company logos
29  * <p>
30  * @author Roland Haeder
31  */
32 @Entity (name = "company_logos")
33 @Table (name = "company_logos")
34 public class CompanyLogo implements BusinessLogo, Comparable<BusinessLogo> {
35
36         /**
37          * Serial number
38          */
39         private static final long serialVersionUID = 475_871_875_718_751_285L;
40
41         /**
42          * Local file name of the logo (relative to /resources/logos/)
43          */
44         @Basic (optional = false)
45         @Column (name = "logo_file_name", nullable = false, unique = true, updatable = false)
46         private String logoFileName;
47
48         /**
49          * Id number
50          */
51         @Id
52         @GeneratedValue (strategy = GenerationType.IDENTITY)
53         @Column (name = "logo_id", length = 20, nullable = false, updatable = false)
54         private Long logoId;
55
56         @Override
57         public int compareTo (final BusinessLogo businessLogo) {
58                 throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
59         }
60
61         @Override
62         public String getLogoFileName () {
63                 return this.logoFileName;
64         }
65
66         @Override
67         public void setLogoFileName (final String logoFileName) {
68                 this.logoFileName = logoFileName;
69         }
70
71         @Override
72         public Long getLogoId () {
73                 return this.logoId;
74         }
75
76         @Override
77         public void setLogoId (final Long logoId) {
78                 this.logoId = logoId;
79         }
80 }