001 /*
002 *
003 * $Revision: 14743 $ $Date: 2009-02-17 09:51:32 +0100 (Tue, 17 Feb 2009) $
004 *
005 * This file is part of *** M y C o R e ***
006 * See http://www.mycore.de/ for details.
007 *
008 * This program is free software; you can use it, redistribute it
009 * and / or modify it under the terms of the GNU General Public License
010 * (GPL) as published by the Free Software Foundation; either version 2
011 * of the License or (at your option) any later version.
012 *
013 * This program is distributed in the hope that it will be useful, but
014 * WITHOUT ANY WARRANTY; without even the implied warranty of
015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
016 * GNU General Public License for more details.
017 *
018 * You should have received a copy of the GNU General Public License
019 * along with this program, in a file called gpl.txt or license.txt.
020 * If not, write to the Free Software Foundation Inc.,
021 * 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
022 */
023
024 package org.mycore.backend.hibernate.tables;
025
026 /**
027 * This class implement the data sructure of the MCRURN table.
028 *
029 * @author Heiko Helmbrecht
030 * @author Jens Kupferschmidt
031 * @version $Revision: 14743 $ $Date: 2009-02-17 09:51:32 +0100 (Tue, 17 Feb 2009) $
032 */
033 public class MCRURN {
034 private MCRURNPK key;
035 private String path;
036 private String filename;
037
038 /**
039 * The constructor of the class MCRURN
040 */
041 public MCRURN() {
042 this.key = new MCRURNPK();
043 }
044
045 /**
046 * The constructor of the class MCRURN
047 *
048 * @param id
049 * The document ID
050 * @param urn
051 * The URN
052 */
053 public MCRURN(String id, String urn) {
054 this.key = new MCRURNPK();
055 key.setMcrid(id);
056 key.setMcrurn(urn);
057 }
058
059 /**
060 * The constructor of the class MCRURN
061 *
062 * @param id
063 * The document ID
064 * @param urn
065 * The URN
066 */
067 public MCRURN(String id, String urn, String path, String filename) {
068 this.key = new MCRURNPK();
069 key.setMcrid(id);
070 key.setMcrurn(urn);
071 this.path = path;
072 this.filename = filename;
073 }
074
075 /**
076 * This method returns the primary key.
077 *
078 * @return returns the primary key as class MCRURNPK.
079 * @hibernate.property column="Primary Key" not-null="true" update="true"
080 */
081 public MCRURNPK getKey() {
082 return key;
083 }
084
085 /**
086 * This method set the primary key.
087 *
088 * @param key
089 * the primary key as instance of the class MCRURNPK
090 */
091 public void setKey(MCRURNPK key) {
092 this.key = key;
093 }
094
095 /**
096 * Get the object ID value.
097 *
098 * @return the object ID value as a String.
099 * @hibernate.property column="MCRID" not-null="true" update="true"
100 */
101 public String getId() {
102 return key.getMcrid();
103 }
104
105 /**
106 * Set the object ID value.
107 *
108 * @param id
109 * the object ID value as a string
110 */
111 public void setId(String id) {
112 key.setMcrid(id);
113 }
114
115 /**
116 * Get the URN value.
117 *
118 * @return the URN value as a String.
119 * @hibernate.property column="MCRURN" not-null="true" update="true"
120 */
121 public String getURN() {
122 return key.getMcrurn();
123 }
124
125 /**
126 * Set the URN value.
127 *
128 * @param urn
129 * the urn value as a string
130 */
131 public void setURN(String urn) {
132 key.setMcrurn(urn);
133 }
134
135 /**
136 * @return the path
137 */
138 public String getPath() {
139 return path;
140 }
141
142 /**
143 * @param path
144 * the path to set
145 */
146 public void setPath(String path) {
147 this.path = path;
148 }
149
150 /**
151 * @return the filename
152 */
153 public String getFilename() {
154 return filename;
155 }
156
157 /**
158 * @param filename
159 * the filename to set
160 */
161 public void setFilename(String filename) {
162 this.filename = filename;
163 }
164 }