KickJava   Java API By Example, From Geeks To Geeks.

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


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
22 import org.apache.openjpa.persistence.jdbc.Index;
23
24 /**
25  */

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