2
* Software License Agreement (BSD License)
4
* Copyright (c) 2008, Regents of the University of California
7
* Redistribution and use of this software in source and binary forms, with or
8
* without modification, are permitted provided that the following conditions
11
* * Redistributions of source code must retain the above
12
* copyright notice, this list of conditions and the
13
* following disclaimer.
15
* * Redistributions in binary form must reproduce the above
16
* copyright notice, this list of conditions and the
17
* following disclaimer in the documentation and/or other
18
* materials provided with the distribution.
20
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
* POSSIBILITY OF SUCH DAMAGE.
32
* Author: Sunil Soman sunils@cs.ucsb.edu
35
package edu.ucsb.eucalyptus.cloud.entities;
37
import org.hibernate.annotations.*;
39
import javax.persistence.*;
40
import javax.persistence.Entity;
41
import javax.persistence.Table;
42
import javax.persistence.CascadeType;
43
import java.util.ArrayList;
44
import java.util.List;
48
@Table( name = "WalrusVolumes" )
49
@Cache( usage = CacheConcurrencyStrategy.READ_WRITE )
50
public class WalrusVolumeInfo {
53
@Column(name = "walrus_volume_id")
54
private Long id = -1l;
55
@Column(name = "volume_name")
56
private String volumeId;
58
@OneToMany( cascade = CascadeType.ALL )
60
name = "volume_has_snapshots",
61
joinColumns = { @JoinColumn( name = "walrus_volume_id" ) },
62
inverseJoinColumns = @JoinColumn( name = "walrus_snapshot_id" )
64
@Cache( usage = CacheConcurrencyStrategy.READ_WRITE )
65
private List<WalrusSnapshotInfo> snapshotSet = new ArrayList<WalrusSnapshotInfo>();
67
public WalrusVolumeInfo() {}
69
public WalrusVolumeInfo(String volumeId) {
70
this.volumeId = volumeId;
73
public String getVolumeId() {
77
public void setVolumeId(String volumeId) {
78
this.volumeId = volumeId;
81
public List<WalrusSnapshotInfo> getSnapshotSet() {
85
public void setSnapshotSet(List<WalrusSnapshotInfo> snapshotSet) {
86
this.snapshotSet = snapshotSet;
b'\\ No newline at end of file'