1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.social.model;
16  
17  import java.io.Serializable;
18  
19  /**
20   * <a href="SocialEquityActionMapping.java.html"><b><i>View Source</i></b></a>
21   *
22   * @author Brian Wing Shun Chan
23   */
24  public class SocialEquityActionMapping implements Serializable {
25  
26      public SocialEquityActionMapping clone() {
27          SocialEquityActionMapping equityActionMapping =
28              new SocialEquityActionMapping();
29  
30          equityActionMapping.setActionId(_actionId);
31          equityActionMapping.setClassName(_className);
32          equityActionMapping.setInformationLifespan(_informationLifespan);
33          equityActionMapping.setInformationValue(_informationValue);
34          equityActionMapping.setParticipationLifespan(_participationLifespan);
35          equityActionMapping.setParticipationValue(_participationValue);
36  
37          return equityActionMapping;
38      }
39  
40      public boolean equals(
41          SocialEquityActionMapping equityActionMapping, int type) {
42  
43          if (type == SocialEquitySettingConstants.TYPE_INFORMATION) {
44              if ((_informationLifespan !=
45                      equityActionMapping.getInformationLifespan()) ||
46                  (_informationValue !=
47                      equityActionMapping.getInformationValue())) {
48  
49                  return false;
50              }
51          }
52          else {
53              if ((_participationLifespan !=
54                      equityActionMapping.getParticipationLifespan()) ||
55                  (_participationValue !=
56                      equityActionMapping.getParticipationValue())) {
57  
58                  return false;
59              }
60          }
61  
62          return true;
63      }
64  
65      public String getActionId() {
66          return _actionId;
67      }
68  
69      public String getClassName() {
70          return _className;
71      }
72  
73      public int getInformationLifespan() {
74          return _informationLifespan;
75      }
76  
77      public int getInformationValue() {
78          return _informationValue;
79      }
80  
81      public int getParticipationLifespan() {
82          return _participationLifespan;
83      }
84  
85      public int getParticipationValue() {
86          return _participationValue;
87      }
88  
89      public void setActionId(String actionId) {
90          _actionId = actionId;
91      }
92  
93      public void setClassName(String className) {
94          _className = className;
95      }
96  
97      public void setInformationLifespan(int informationLifespan) {
98          _informationLifespan = informationLifespan;
99      }
100 
101     public void setInformationValue(int informationValue) {
102         _informationValue = informationValue;
103     }
104 
105     public void setParticipationLifespan(int participationLifespan) {
106         _participationLifespan = participationLifespan;
107     }
108 
109     public void setParticipationValue(int participationValue) {
110         _participationValue = participationValue;
111     }
112 
113     private String _actionId;
114     private String _className;
115     private int _informationLifespan;
116     private int _informationValue;
117     private int _participationLifespan;
118     private int _participationValue;
119 
120 }