View Javadoc
1   /**
2    * Copyright 2004-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.kpme.pm.positionreportgroup;
17  
18  import org.kuali.kpme.core.api.mo.EffectiveKey;
19  import org.kuali.kpme.core.bo.derived.HrBusinessObjectKey;
20  import org.kuali.rice.core.api.mo.ModelObjectUtils;
21  
22  public class PositionReportGroupKeyBo extends HrBusinessObjectKey<PositionReportGroupBo, PositionReportGroupKeyBo> {
23  
24      private static final long serialVersionUID = 3035597915412860604L;
25  
26  	/*
27  	 * convert immutable to bo
28  	 * 
29  	 * Can be used with ModelObjectUtils:
30  	 * 
31  	 * org.kuali.rice.core.api.mo.ModelObjectUtils.transformSet(setOfPositionReportGroupKey, PositionReportGroupKeyBo.toBo);
32  	 */
33  	public static final ModelObjectUtils.Transformer<EffectiveKey, PositionReportGroupKeyBo> toBo =
34  		new ModelObjectUtils.Transformer<EffectiveKey, PositionReportGroupKeyBo>() {
35  			public PositionReportGroupKeyBo transform(EffectiveKey input) {
36  				return PositionReportGroupKeyBo.from(input);
37  			};
38  		};
39  
40  	/*
41  	 * convert bo to immutable
42  	 *
43  	 * Can be used with ModelObjectUtils:
44  	 *
45  	 * org.kuali.rice.core.api.mo.ModelObjectUtils.transformSet(setOfPositionReportGroupKeyBo, PositionReportGroupKeyBo.toImmutable);
46  	 */
47  	public static final ModelObjectUtils.Transformer<PositionReportGroupKeyBo, EffectiveKey> toImmutable =
48  		new ModelObjectUtils.Transformer<PositionReportGroupKeyBo, EffectiveKey>() {
49  			public EffectiveKey transform(PositionReportGroupKeyBo input) {
50  				return PositionReportGroupKeyBo.to(input);
51  			};
52  		};
53  
54  	@Override
55  	public PositionReportGroupBo getOwner() {
56  		return super.getOwner();
57  	}
58  	
59  	@Override
60  	public void setOwner(PositionReportGroupBo owner) {
61  		super.setOwner(owner);
62  	}
63  	
64  	public static PositionReportGroupKeyBo from(EffectiveKey im) {
65  		return commonFromLogic(im, new PositionReportGroupKeyBo());
66  	}
67  
68  }