1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.aws.s3.pojo;
17
18 import com.amazonaws.services.s3.model.Bucket;
19
20 public class BucketPrefixSummary implements Comparable<BucketPrefixSummary> {
21
22 Bucket bucket;
23 String prefix;
24 long count;
25 long size;
26
27 public BucketPrefixSummary() {
28 this(null);
29 }
30
31 public BucketPrefixSummary(String prefix) {
32 super();
33 this.prefix = prefix;
34 }
35
36 public int compareTo(BucketPrefixSummary other) {
37 String prefix1 = getPrefix();
38 String prefix2 = other.getPrefix();
39 if (prefix1 == null) {
40 return -1;
41 } else {
42 return prefix1.compareTo(prefix2);
43 }
44 }
45
46 public long getCount() {
47 return count;
48 }
49
50 public void setCount(long objectCount) {
51 this.count = objectCount;
52 }
53
54 public long getSize() {
55 return size;
56 }
57
58 public void setSize(long objectSize) {
59 this.size = objectSize;
60 }
61
62 public String getPrefix() {
63 return prefix;
64 }
65
66 public void setPrefix(String prefix) {
67 this.prefix = prefix;
68 }
69
70 public Bucket getBucket() {
71 return bucket;
72 }
73
74 public void setBucket(Bucket bucket) {
75 this.bucket = bucket;
76 }
77
78 }