Project

General

Profile

Revision f974bf29

IDf974bf2953da25629ac03d8db78dd50958404c4d
Parent 7cfc6254
Child 46c571ad

Added by Andreas Müller over 4 years ago

#5970 Add allowOverride

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v40_41/SchemaUpdater_40_41.java
15 15

  
16 16
import org.apache.log4j.Logger;
17 17

  
18
import eu.etaxonomy.cdm.database.update.ColumnAdder;
18 19
import eu.etaxonomy.cdm.database.update.ISchemaUpdater;
19 20
import eu.etaxonomy.cdm.database.update.ISchemaUpdaterStep;
20 21
import eu.etaxonomy.cdm.database.update.SchemaUpdaterBase;
......
63 64
		List<ISchemaUpdaterStep> stepList = new ArrayList<ISchemaUpdaterStep>();
64 65

  
65 66

  
67
        //#5970
68
        //Implement allowOverride in CdmPreference
69
        stepName = "Add allowOverride in CdmPreference";
70
        tableName = "CdmPreference";
71
        newColumnName = "allowOverride";
72
        step = ColumnAdder.NewBooleanInstance(stepName, tableName, newColumnName, false, false);
73
        stepList.add(step);
74

  
75

  
66 76
//        //#5717
67 77
//        //Add sec micro reference
68 78
//        stepName = "Add secMicroReference to TaxonBase";
cdmlib-persistence/src/test/resources/eu/etaxonomy/cdm/persistence/dao/hibernate/common/PreferenceDaoTest.testFindTaxonNodeString.xml
1 1
<?xml version='1.0' encoding='UTF-8'?>
2 2
<dataset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../dataset.xsd">
3
  <CDMPREFERENCE KEY_SUBJECT="/" KEY_PREDICATE="model.name.NC" VALUE="ICNAFP"/>
4
  <CDMPREFERENCE KEY_SUBJECT="/TaxonNode[#t5000#5000#5001#5002#]" KEY_PREDICATE="model.name.NC" VALUE="ICZN"/>
5
  <CDMPREFERENCE KEY_SUBJECT="/TaxonNode[#t5000#5000#5001#]" KEY_PREDICATE="model.name.NC" VALUE="ICVCN"/>
3
  <CDMPREFERENCE KEY_SUBJECT="/" KEY_PREDICATE="model.name.NC" VALUE="ICNAFP" ALLOWOVERRIDE="0"/>
4
  <CDMPREFERENCE KEY_SUBJECT="/TaxonNode[#t5000#5000#5001#5002#]" KEY_PREDICATE="model.name.NC" VALUE="ICZN" ALLOWOVERRIDE="0"/>
5
  <CDMPREFERENCE KEY_SUBJECT="/TaxonNode[#t5000#5000#5001#]" KEY_PREDICATE="model.name.NC" VALUE="ICVCN" ALLOWOVERRIDE="1"/>
6 6
  <CLASSIFICATION ID="5000" CREATED="2016-06-03 16:48:00.0" UUID="bbd2cdb4-8b83-4ef9-a553-c9629c3890aa" UPDATED="[null]" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="European Abies" MICROREFERENCE="[null]" TIMEPERIOD_START="[null]" TIMEPERIOD_FREETEXT="[null]" TIMEPERIOD_END="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" NAME_ID="5000" REFERENCE_ID="[null]" ROOTNODE_ID="5000"/>
7 7
  <TAXONBASE DTYPE="Taxon" ID="5000" CREATED="2016-06-03 16:48:00.0" UUID="db5b95d5-b08a-4e3c-aaee-cfe491ba2dd5" UPDATED="[null]" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" SECMICROREFERENCE="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="??? sec. ???" APPENDEDPHRASE="[null]" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" EXCLUDED="false" TAXONSTATUSUNKNOWN="false" TAXONOMICCHILDRENCOUNT="0" UNPLACED="false" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" NAME_ID="[null]" SEC_ID="[null]" TAXONOMICPARENTCACHE_ID="[null]"/>
8 8
  <TAXONBASE DTYPE="Taxon" ID="5001" CREATED="2016-06-03 16:48:00.0" UUID="dcf4f8bc-363a-4a6e-8444-10a1a16bec27" UPDATED="[null]" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" SECMICROREFERENCE="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="??? sec. ???" APPENDEDPHRASE="[null]" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" EXCLUDED="false" TAXONSTATUSUNKNOWN="false" TAXONOMICCHILDRENCOUNT="0" UNPLACED="false" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" NAME_ID="[null]" SEC_ID="[null]" TAXONOMICPARENTCACHE_ID="[null]"/>
cdmlib-persistence/src/test/resources/eu/etaxonomy/cdm/persistence/dao/hibernate/common/PreferenceDaoTest.xml
1 1
<?xml version='1.0' encoding='UTF-8'?>
2 2
<dataset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../dataset.xsd">
3
  <CDMPREFERENCE KEY_SUBJECT="/" KEY_PREDICATE="model.name.NC" VALUE="ICNAFP"/>
3
  <CDMPREFERENCE KEY_SUBJECT="/" KEY_PREDICATE="model.name.NC" VALUE="ICNAFP" ALLOWOVERRIDE="0"/>
4 4
</dataset>
cdmlib-services/src/test/resources/eu/etaxonomy/cdm/api/service/PreferenceServiceImplTest.xml
1 1
<?xml version='1.0' encoding='UTF-8'?>
2 2
<dataset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../dataset.xsd">
3
	<CDMPREFERENCE KEY_SUBJECT="/" KEY_PREDICATE="model.name.NC" VALUE="ICNAFP"/>
3
	<CDMPREFERENCE KEY_SUBJECT="/" KEY_PREDICATE="model.name.NC" VALUE="ICNAFP" ALLOWOVERRIDE="0"/>
4 4
</dataset>
cdmlib-test/src/main/resources/dbscripts/001-cdm.h2.sql
530 530
CREATE CACHED TABLE PUBLIC.CDMPREFERENCE(
531 531
    KEY_SUBJECT VARCHAR(100),
532 532
    KEY_PREDICATE VARCHAR(100),
533
    VALUE VARCHAR(1023)
533
    VALUE VARCHAR(1023),
534
	ALLOWOVERRIDE BOOLEAN NOT NULL
534 535
);
535 536
-- 3 +/- SELECT COUNT(*) FROM PUBLIC.CDMPREFERENCE;
536 537
CREATE CACHED TABLE PUBLIC.CLASSIFICATION(
cdmlib-test/src/main/resources/eu/etaxonomy/cdm/database/schema/dataset.dtd
28 28
    AUDITEVENT*,
29 29
    CDM_VIEW*,
30 30
    CDM_VIEW_CDM_VIEW*,
31
    CDMPREFERENCE*,
31 32
    COLLECTION*,
32 33
    COLLECTION_ANNOTATION*,
33 34
    COLLECTION_ANNOTATION_AUD*,
......
622 623
    SUPERVIEWS_ID CDATA #REQUIRED
623 624
>
624 625

  
626
<!ELEMENT CDMPREFERENCE EMPTY>
627
<!ATTLIST CDMPREFERENCE
628
    KEY_SUBJECT CDATA #REQUIRED
629
    KEY_PREDICATE CDATA #REQUIRED
630
    VALUE CDATA #IMPLIED
631
    ALLOWOVERRIDE CDATA #REQUIRED
632
>
633

  
625 634
<!ELEMENT COLLECTION EMPTY>
626 635
<!ATTLIST COLLECTION
627 636
    ID CDATA #REQUIRED

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)