1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.fourthline.cling.support.model;
17
18 import org.fourthline.cling.model.types.UnsignedIntegerFourBytes;
19
20
21
22
23 public class SearchResult {
24
25 protected String result;
26
27 protected UnsignedIntegerFourBytes count;
28
29 protected UnsignedIntegerFourBytes totalMatches;
30
31 protected UnsignedIntegerFourBytes containerUpdateID;
32
33 public SearchResult(String result, UnsignedIntegerFourBytes count,
34 UnsignedIntegerFourBytes totalMatches,
35 UnsignedIntegerFourBytes containerUpdateID) {
36 this.result = result;
37 this.count = count;
38 this.totalMatches = totalMatches;
39 this.containerUpdateID = containerUpdateID;
40 }
41
42 public SearchResult(String result, long count, long totalMatches) {
43 this(result, count, totalMatches, 0);
44 }
45
46 public SearchResult(String result, long count, long totalMatches, long updateID) {
47 this(
48 result,
49 new UnsignedIntegerFourBytes(count),
50 new UnsignedIntegerFourBytes(totalMatches),
51 new UnsignedIntegerFourBytes(updateID)
52 );
53 }
54
55 public String getResult() {
56 return result;
57 }
58
59 public UnsignedIntegerFourBytes getCount() {
60 return count;
61 }
62
63 public long getCountLong() {
64 return count.getValue();
65 }
66
67 public UnsignedIntegerFourBytes getTotalMatches() {
68 return totalMatches;
69 }
70
71 public long getTotalMatchesLong() {
72 return totalMatches.getValue();
73 }
74
75 public UnsignedIntegerFourBytes getContainerUpdateID() {
76 return containerUpdateID;
77 }
78
79 public long getContainerUpdateIDLong() {
80 return containerUpdateID.getValue();
81 }
82 }