01: /*
02: * Copyright 2006 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.core.util;
17:
18: import java.io.Serializable;
19:
20: /**
21: * Container class to simplify getting both a deepCopied object and its size returned from a single call to deepCopy.
22: */
23: public class CopiedObject {
24: private Serializable content;
25: private long size;
26: private long oldSize;
27:
28: public CopiedObject() {
29: oldSize = -1;
30: }
31:
32: /**
33: * @return current value of bytes.
34: */
35: public long getSize() {
36: return size;
37: }
38:
39: /**
40: * Sets the bytes attribute value.
41: *
42: * @param bytes The bytes to set.
43: */
44: public void setSize(long bytes) {
45: this .size = bytes;
46: }
47:
48: /**
49: * @return current value of cacheableObject.
50: */
51: public Serializable getContent() {
52: return content;
53: }
54:
55: /**
56: * Sets the cacheableObject attribute value.
57: *
58: * @param cacheableObject The cacheableObject to set.
59: */
60: public void setContent(Serializable cacheableObject) {
61: this .content = cacheableObject;
62: }
63:
64: /**
65: * @return current value of oldSize.
66: */
67: public long getOldSize() {
68: return oldSize;
69: }
70:
71: /**
72: * Sets the oldSize attribute value.
73: *
74: * @param oldSize The oldSize to set.
75: */
76: public void setOldSize(long oldSize) {
77: this.oldSize = oldSize;
78: }
79:
80: }
|