01: /*
02: * Copyright 2007 Outerthought bvba and Schaubroeck nv
03: *
04: * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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.outerj.daisy.workflow;
17:
18: import org.outerj.daisy.repository.query.SortOrder;
19:
20: public class QueryOrderByItem {
21: private final String name;
22: private final QueryValueSource type;
23: private final SortOrder sortOrder;
24:
25: public QueryOrderByItem(String name, QueryValueSource type,
26: SortOrder sortOrder) {
27: if (name == null)
28: throw new IllegalArgumentException("Null argument: name");
29: if (type == null)
30: throw new IllegalArgumentException("Null argument: type");
31: if (sortOrder == null)
32: throw new IllegalArgumentException(
33: "Null argument: sortOrder");
34:
35: this .name = name;
36: this .type = type;
37: this .sortOrder = sortOrder;
38: }
39:
40: public String getName() {
41: return name;
42: }
43:
44: public QueryValueSource getType() {
45: return type;
46: }
47:
48: public SortOrder getSortOrder() {
49: return sortOrder;
50: }
51: }
|