Project

General

Profile

Download (1.78 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy 
5
* http://www.e-taxonomy.eu
6
* 
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10

    
11
package eu.etaxonomy.cdm.strategy.match;
12

    
13
import java.lang.reflect.Field;
14

    
15
import org.apache.log4j.Logger;
16

    
17
/**
18
 * @author a.mueller
19
 * @created 07.08.2009
20
 * @version 1.0
21
 */
22
public abstract class FieldMatcherBase {
23
	@SuppressWarnings("unused")
24
	private static final Logger logger = Logger.getLogger(FieldMatcherBase.class);
25
	
26
	private String propertyName ; 
27
	private Field field;
28
	private MatchMode matchMode;
29
	
30
	protected FieldMatcherBase (String propertyname, Field field, MatchMode matchMode){
31
		this.propertyName = propertyname;
32
		this.field = field;
33
		this.matchMode = matchMode;
34
	}
35

    
36
	/**
37
	 * @return the propertyName
38
	 */
39
	public String getPropertyName() {
40
		return propertyName;
41
	}
42

    
43
	/**
44
	 * @param propertyName the propertyName to set
45
	 */
46
	public void setPropertyName(String propertyName) {
47
		this.propertyName = propertyName;
48
	}
49

    
50
	/**
51
	 * @return the field
52
	 */
53
	public Field getField() {
54
		return field;
55
	}
56

    
57
	/**
58
	 * @param field the field to set
59
	 */
60
	public void setField(Field field) {
61
		this.field = field;
62
	}
63

    
64
	
65
	
66
	/**
67
	 * @return the matchMode
68
	 */
69
	public MatchMode getMatchMode() {
70
		return matchMode;
71
	}
72

    
73
	/**
74
	 * @param matchMode the matchMode to set
75
	 */
76
	public void setMatchMode(MatchMode matchMode) {
77
		this.matchMode = matchMode;
78
	}
79
	
80
	@Override
81
	public String toString(){
82
		if (propertyName == null || matchMode == null){
83
			return super.toString();
84
		}
85
		return "[" + propertyName + "->" + matchMode.toString() +"]";
86
	}
87
	
88
	
89
}
(4-4/11)