1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/*******************************************************************************
* 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.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", "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);
}
}
|