minor model change for NameTypeDesignations
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / common / CdmMetaData.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.cdm.model.common;
12
13 import java.util.ArrayList;
14 import java.util.List;
15
16 import javax.persistence.Entity;
17
18 import org.apache.log4j.Logger;
19
20 /**
21 * @author a.mueller
22 * @created 07.09.2009
23 * @version 1.0
24 */
25 @Entity
26 public class CdmMetaData extends CdmBase{
27 private static final long serialVersionUID = -3033376680593279078L;
28 @SuppressWarnings("unused")
29 private static final Logger logger = Logger.getLogger(CdmMetaData.class);
30
31 /**
32 * The database schema version number.
33 * It is recommended to have the first two numbers equal to the CDM Library version number.
34 * But it is not obligatory as there may be cases when the library number changes but the
35 * schema version is not changing.
36 * The third should be incremented if the schema changes in a way that SCHEMA_VALIDATION.UPDATE
37 * will probably not work or will not be enough to transform old data into new data.
38 * The fourth number shoud be incremented when minor schema changes take place that can
39 * be handled by SCHEMA_VALIDATION.UPDATE
40 * The last number represents the date of change.
41 */
42 private static final String dbSchemaVersion = "2.1.2.2.200909301715";
43
44 public enum MetaDataPropertyName{
45 DB_SCHEMA_VERSION
46 }
47
48 private MetaDataPropertyName propertyName;
49 private String value;
50
51
52 public static final List<CdmMetaData> propertyList(){
53 List<CdmMetaData> result = new ArrayList<CdmMetaData>();
54 result.add(new CdmMetaData(MetaDataPropertyName.DB_SCHEMA_VERSION, dbSchemaVersion));
55 return result;
56 }
57
58 private CdmMetaData() {
59 super();
60 }
61
62 public CdmMetaData(MetaDataPropertyName propertyName, String value) {
63 super();
64 this.propertyName = propertyName;
65 this.value = value;
66 }
67
68 /**
69 * @return the propertyName
70 */
71 public MetaDataPropertyName getPropertyName() {
72 return propertyName;
73 }
74
75 /**
76 * @param propertyName the propertyName to set
77 */
78 public void setPropertyName(MetaDataPropertyName propertyName) {
79 this.propertyName = propertyName;
80 }
81
82 /**
83 * @return the value
84 */
85 public String getValue() {
86 return value;
87 }
88
89 /**
90 * @param value the value to set
91 */
92 public void setValue(String value) {
93 this.value = value;
94 }
95
96
97
98 }