Subversion Repositories XServices

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
74 brianR 1
/*
2
 *   Copyright 2010 Brian Rosenberger (Brutex Network)
3
 *
4
 *   Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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
 
17
package net.brutex.xservices.types;
18
 
19
import java.util.UUID;
20
 
21
import javax.xml.bind.annotation.XmlElement;
22
import javax.xml.bind.annotation.XmlType;
23
 
24
/**
25
 * Defines a collection of storable objects.
26
 *
27
 * @author Brian Rosenberger
28
 * @since 1.0
29
 */
30
@XmlType()
31
public class CollectionType {
32
 
33
	private String name="";
34
	final private UUID uuid;
35
 
36
	/**
37
	 * @return the name
38
	 */
39
	public String getName() {
40
		return name;
41
	}
42
 
43
	/**
44
	 * @param name the name to set
45
	 */
46
	@XmlElement(required=true)
47
	public void setName(String name) {
48
		this.name = name;
49
	}
50
 
51
	/**
52
	 * @return
53
	 */
54
	public String getUuid() {
55
		return uuid.toString();
56
	}
57
 
58
	/**
59
	 * @param name
60
	 * @param uuid
61
	 */
62
	public CollectionType(String name, UUID uuid) {
63
		this.name = name;
64
		this.uuid = uuid;
65
	}
66
 
67
	/**
68
	 * @param name
69
	 * @param uuid
70
	 */
71
	public CollectionType(String name) {
72
		this.name = name;
73
		this.uuid = UUID.randomUUID();
74
	}
75
 
76
 
77
	/**
78
	 */
79
	public CollectionType() {
80
		this.name = "";
81
		this.uuid = UUID.randomUUID();
82
	}
83
 
84
}