KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > activemq > store > jpa > model > StoredMessage


1 /*
2  * Copyright 2006 The Apache Software Foundation.
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 package org.apache.activemq.store.jpa.model;
17
18 import javax.persistence.Basic;
19 import javax.persistence.Entity;
20 import javax.persistence.Id;
21 import javax.persistence.Lob;
22
23 import org.apache.openjpa.persistence.jdbc.Index;
24
25 /**
26  */

27 @Entity()
28 public class StoredMessage {
29     
30     @Id
31     private long id;
32     
33     @Basic(optional=false)
34     @Index(enabled=true, unique=false)
35     private String JavaDoc messageId;
36
37     @Basic(optional=false)
38     @Index(enabled=true, unique=false)
39     private String JavaDoc destination;
40
41     @Basic
42     private long exiration;
43
44     @Basic
45     @Lob
46     private byte[] data;
47
48     public StoredMessage() {
49     }
50
51     public byte[] getData() {
52         return data;
53     }
54
55     public void setData(byte[] data) {
56         this.data = data;
57     }
58
59     public String JavaDoc getDestination() {
60         return destination;
61     }
62
63     public void setDestination(String JavaDoc destination) {
64         this.destination = destination;
65     }
66
67     public long getExiration() {
68         return exiration;
69     }
70
71     public void setExiration(long exiration) {
72         this.exiration = exiration;
73     }
74
75     public String JavaDoc getMessageId() {
76         return messageId;
77     }
78
79     public void setMessageId(String JavaDoc messageId) {
80         this.messageId = messageId;
81     }
82
83     public long getId() {
84         return id;
85     }
86
87     public void setId(long sequenceId) {
88         this.id = sequenceId;
89     }
90
91 }
92
Popular Tags