1 /*
2 * PROJECT : DAR Runtime and Tools
3 * COPYRIGHT : Copyright (C) 1999-2004 tim.stephenson@enableit.org
4 * LICENSE : GNU LESSER GENERAL PUBLIC LICENSE
5 * Version 2.1, February 1999
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21 package org.enableit.db.darrt.resolvers;
22
23 import org.apache.log4j.Logger;
24 import org.enableit.db.beans.Provider;
25 import org.enableit.db.beans.RowSet;
26 import org.enableit.db.darrt.ConflictResolver;
27
28
29 /***
30 * Conflict resolver that assumes the existing row should be kept.
31 *
32 * @author Tim Stephenson
33 */
34 public class IgnoreConflictResolver implements ConflictResolver {
35 /*
36 * Properties
37 */
38
39 /***
40 * The Log4J <code>Logger</code> doing the logging.
41 */
42 private static Logger logger = Logger.getLogger(IgnoreConflictResolver.class);
43
44 /***
45 * CVS info ABOUT this class and its current version
46 */
47 public static final String about = "$Id $";
48
49 /*
50 * Constructors
51 */
52
53 /***
54 * Default Constructor
55 */
56 public IgnoreConflictResolver() {
57 }
58
59 /*
60 * Methods
61 */
62
63 /***
64 * When a record already exists with the same primary key it will be ignored.
65 * <p><b>Implementation Note:</b> This is currently assumed to be all rows.</p>
66 */
67 public RowSet resolve(Provider target, RowSet rows) {
68 rows.removeAllRow();
69
70 return rows;
71 }
72 }
This page was automatically generated by Maven