KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > media > entity > MediaEntityDTO


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7
8 package org.jboss.media.entity;
9
10 import java.io.Serializable JavaDoc;
11 import java.net.URL JavaDoc;
12
13 /**
14  * Data Transfer Object for an EntityMediaLocal object.
15  *
16  * @version <tt>$Revision: 1.1 $</tt>
17  * @author <a HREF="mailto:ricardoarguello@users.sourceforge.net">Ricardo Argüello</a>
18  */

19 public class MediaEntityDTO implements Serializable JavaDoc
20 {
21    private byte[] content;
22    private URL JavaDoc location;
23    private String JavaDoc description;
24    private String JavaDoc name;
25    private String JavaDoc mimeType;
26
27    /**
28     * Default constructor.
29     */

30    public MediaEntityDTO()
31    {
32    }
33
34    /**
35     * Constructor with all properties.
36     *
37     * @param content content.
38     * @param location location.
39     * @param description description.
40     * @param name name.
41     * @param mimeType MIME type.
42     */

43    public MediaEntityDTO(
44       byte[] content,
45       URL JavaDoc location,
46       String JavaDoc description,
47       String JavaDoc name,
48       String JavaDoc mimeType)
49    {
50       this.content = content;
51       this.location = location;
52       this.description = description;
53       this.name = name;
54       this.mimeType = mimeType;
55    }
56
57    /**
58     * @return Returns the content.
59     */

60    public byte[] getContent()
61    {
62       return content;
63    }
64
65    /**
66     * @param content The content to set.
67     */

68    public void setContent(byte[] content)
69    {
70       this.content = content;
71    }
72
73    /**
74     * @return Returns the description.
75     */

76    public String JavaDoc getDescription()
77    {
78       return description;
79    }
80
81    /**
82     * @param description The description to set.
83     */

84    public void setDescription(String JavaDoc description)
85    {
86       this.description = description;
87    }
88
89    /**
90     * @return Returns the location.
91     */

92    public URL JavaDoc getLocation()
93    {
94       return location;
95    }
96
97    /**
98     * @param location The location to set.
99     */

100    public void setLocation(URL JavaDoc location)
101    {
102       this.location = location;
103    }
104
105    /**
106     * @return Returns the mimeType.
107     */

108    public String JavaDoc getMimeType()
109    {
110       return mimeType;
111    }
112
113    /**
114     * @param mimeType The mimeType to set.
115     */

116    public void setMimeType(String JavaDoc mimeType)
117    {
118       this.mimeType = mimeType;
119    }
120
121    /**
122     * @return Returns the name.
123     */

124    public String JavaDoc getName()
125    {
126       return name;
127    }
128
129    /**
130     * @param name The name to set.
131     */

132    public void setName(String JavaDoc name)
133    {
134       this.name = name;
135    }
136
137    // TODO: Implement equals() and hash()
138
}
Popular Tags