View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.myfaces.flow;
20  
21  import java.io.Serializable;
22  
23  /**
24   *
25   * @author lu4242
26   */
27  class _FlowContextualInfo implements Serializable
28  {
29      private static final long serialVersionUID = -3732849062185115847L;
30      
31      private FlowReference flowReference;
32      private String lastDisplayedViewId;
33      private FlowReference sourceFlowReference;
34  
35      public _FlowContextualInfo()
36      {
37      }
38      
39      public _FlowContextualInfo(FlowReference flowReference, String lastDisplayedViewId, 
40          FlowReference souFlowReference)
41      {
42          this.flowReference = flowReference;
43          this.lastDisplayedViewId = lastDisplayedViewId;
44          this.sourceFlowReference = souFlowReference;
45      }
46  
47      @Override
48      public int hashCode()
49      {
50          int hash = 3;
51          hash = 23 * hash + (this.flowReference != null ? this.flowReference.hashCode() : 0);
52          hash = 23 * hash + (this.lastDisplayedViewId != null ? this.lastDisplayedViewId.hashCode() : 0);
53          return hash;
54      }
55  
56      @Override
57      public boolean equals(Object obj)
58      {
59          if (obj == null)
60          {
61              return false;
62          }
63          if (getClass() != obj.getClass())
64          {
65              return false;
66          }
67          final _FlowContextualInfo other = (_FlowContextualInfo) obj;
68          if (this.flowReference != other.flowReference && (this.flowReference == null || 
69              !this.flowReference.equals(other.flowReference)))
70          {
71              return false;
72          }
73          if ((this.lastDisplayedViewId == null) ? (other.lastDisplayedViewId != null) : 
74              !this.lastDisplayedViewId.equals(other.lastDisplayedViewId))
75          {
76              return false;
77          }
78          return true;
79      }
80      
81  
82      /**
83       * @return the flowReference
84       */
85      public FlowReference getFlowReference()
86      {
87          return flowReference;
88      }
89  
90      /**
91       * @param flowReference the flowReference to set
92       */
93      public void setFlowReference(FlowReference flowReference)
94      {
95          this.flowReference = flowReference;
96      }
97  
98      /**
99       * @return the lastDisplayedViewId
100      */
101     public String getLastDisplayedViewId()
102     {
103         return lastDisplayedViewId;
104     }
105 
106     /**
107      * @param lastDisplayedViewId the lastDisplayedViewId to set
108      */
109     public void setLastDisplayedViewId(String lastDisplayedViewId)
110     {
111         this.lastDisplayedViewId = lastDisplayedViewId;
112     }
113 
114     /**
115      * @return the sourceFlowReference
116      */
117     public FlowReference getSourceFlowReference()
118     {
119         return sourceFlowReference;
120     }
121 
122     /**
123      * @param sourceFlowReference the sourceFlowReference to set
124      */
125     public void setSourceFlowReference(FlowReference sourceFlowReference)
126     {
127         this.sourceFlowReference = sourceFlowReference;
128     }
129 }