01: /*
02: * Copyright (c) 2002-2006 by OpenSymphony
03: * All rights reserved.
04: */
05:
06: package com.opensymphony.xwork.config.entities;
07:
08: import com.opensymphony.xwork.interceptor.Interceptor;
09:
10: import java.io.Serializable;
11:
12: /**
13: * <code>InterceptorMapping</code>
14: *
15: * @author <a href="mailto:hermanns@aixcept.de">Rainer Hermanns</a>
16: * @version $Id: InterceptorMapping.java 1268 2006-12-11 12:43:08Z tm_jee $
17: */
18: public class InterceptorMapping implements Serializable {
19:
20: private static final long serialVersionUID = -6916794422111224317L;
21:
22: private String name;
23: private Interceptor interceptor;
24:
25: public InterceptorMapping() {
26: }
27:
28: public InterceptorMapping(String name, Interceptor interceptor) {
29: this .name = name;
30: this .interceptor = interceptor;
31: }
32:
33: public String getName() {
34: return name;
35: }
36:
37: public void setName(String name) {
38: this .name = name;
39: }
40:
41: public Interceptor getInterceptor() {
42: return interceptor;
43: }
44:
45: public void setInterceptor(Interceptor interceptor) {
46: this .interceptor = interceptor;
47: }
48:
49: public boolean equals(Object o) {
50: if (this == o)
51: return true;
52: if (o == null || getClass() != o.getClass())
53: return false;
54:
55: final InterceptorMapping that = (InterceptorMapping) o;
56:
57: if (name != null ? !name.equals(that.name) : that.name != null)
58: return false;
59:
60: return true;
61: }
62:
63: public int hashCode() {
64: int result;
65: result = (name != null ? name.hashCode() : 0);
66: return result;
67: }
68: }
|