Project

General

Profile

Revision 1e918bbc

ID1e918bbc94f2b1e85a09c932ed21befa96bd6fc5
Parent 32e833cb
Child 58a29064

Added by Andreas Müller over 4 years ago

#5976 First partial implementation for updateSortIndex

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v40_41/SchemaUpdater_40_41.java
20 20
import eu.etaxonomy.cdm.database.update.ISchemaUpdaterStep;
21 21
import eu.etaxonomy.cdm.database.update.SchemaUpdaterBase;
22 22
import eu.etaxonomy.cdm.database.update.SimpleSchemaUpdaterStep;
23
import eu.etaxonomy.cdm.database.update.SortIndexUpdater;
23 24
import eu.etaxonomy.cdm.database.update.v36_40.SchemaUpdater_36_40;
24 25

  
25 26
/**
......
109 110
        simpleStep = SimpleSchemaUpdaterStep.NewAuditedInstance(stepName, query, "Representation", -99);
110 111
        stepList.add(simpleStep);
111 112

  
113

  
114

  
115
        //#5976
116
        //update sortindex on FeatureNode children
117
        stepName = "Update sort index on FeatureNode children";
118
        tableName = "FeatureNode";
119
        String parentIdColumn = "parent_id";
120
        String sortIndexColumn = "sortIndex";
121
        SortIndexUpdater updateSortIndex = SortIndexUpdater.NewInstance(stepName, tableName, "parent_fk", sortIndexColumn, INCLUDE_AUDIT);
122
        stepList.add(updateSortIndex);
123

  
124
        //#5976
125
        // update sortindex for TaxonNodes
126
        stepName = "Update sort index on TaxonNode children";
127
        tableName = "TaxonNode";
128
        parentIdColumn = "parent_id";
129
        sortIndexColumn = "sortIndex";
130
        updateSortIndex = SortIndexUpdater.NewInstance(
131
                stepName, tableName, parentIdColumn, sortIndexColumn,
132
                INCLUDE_AUDIT);
133
        stepList.add(updateSortIndex);
134

  
135
        //#5976
136
        // TODO?: update sortindex for PolytomousKeyNodes
137

  
138

  
112 139
        return stepList;
113 140

  
114 141
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)