Skip to main content
summaryrefslogblamecommitdiffstats
blob: 72a2911d6444f73d280505bf90e62c241887fbb6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                                                 
                                                     
 

                           
                                                                       

                                                                    
                                                                 
                                                                                  



                         
                                                                      
                                                                                  
                                                                                                           

    
                                                                                                 
                                                                 


                                                                                                       
                        

    

                                                                                                                                                     
    
 
/*******************************************************************************
 * Copyright (c) 2010 Boeing.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Boeing - initial API and implementation
 *******************************************************************************/
package org.eclipse.osee.framework.branch.management;

import java.util.ArrayList;
import java.util.List;
import org.eclipse.osee.framework.branch.management.internal.Activator;
import org.eclipse.osee.framework.core.operation.CompositeOperation;
import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.core.operation.OperationLogger;
import org.eclipse.osee.framework.database.operation.InvalidTxCurrentsAndModTypes;

/**
 * @author Ryan D. Brooks
 */
public class TxCurrentsAndModTypesCommand extends CompositeOperation {
   public TxCurrentsAndModTypesCommand(OperationLogger logger, boolean archived) {
      super("TxCurrents And Mod Types", Activator.PLUGIN_ID, logger, buildSubOperations(logger, archived));
   }

   private static List<IOperation> buildSubOperations(OperationLogger logger, boolean archived) {
      List<IOperation> operations = new ArrayList<IOperation>(3);
      operations.add(buildFixOperation(logger, archived, "1/3 ", "osee_artifact", "art_id"));
      operations.add(buildFixOperation(logger, archived, "2/3 ", "osee_attribute", "attr_id"));
      operations.add(buildFixOperation(logger, archived, "3/3 ", "osee_relation_link", "rel_link_id"));
      return operations;
   }

   private static IOperation buildFixOperation(OperationLogger logger, boolean archived, String operationName, String tableName, String columnName) {
      return new InvalidTxCurrentsAndModTypes(operationName, tableName, columnName, logger, true, archived);
   }
}

Back to the top