001: /*
002: * Created on May 7, 2003
003: */
004: package net.sf.jportlet.portlets.bookmark.impl;
005:
006: import net.sf.jportlet.portlet.User;
007: import net.sf.jportlet.portlets.bookmark.Bookmark;
008:
009: /**
010: * @author <a href="mailto:tchbansi@sourceforge.net">Herve Tchepannou</a>
011: *
012: * @hibernate.class
013: * table="T_BOOKMARK"
014: * proxy="net.sf.jportlet.portlets.bookmark.Bookmark"
015: */
016: public class BookmarkImpl implements Bookmark {
017: //~ Instance fields --------------------------------------------------------
018:
019: private String _description;
020: private String _id;
021: private String _title;
022: private String _url;
023: private String _userId;
024:
025: //~ Constructors -----------------------------------------------------------
026:
027: public BookmarkImpl() {
028: }
029:
030: public BookmarkImpl(String id, String title, String url,
031: String description, User user) {
032: _id = id;
033: _title = title;
034: _url = url;
035: _description = description;
036: _userId = ((user != null) ? user.getId() : null);
037: }
038:
039: //~ Methods ----------------------------------------------------------------
040:
041: /**
042: * @see net.sf.jportlet.portlets.bookmark.Bookmark#getId()
043: *
044: * @hibernate.id
045: * length="32"
046: * generator-class="uuid.hex"
047: */
048: public String getId() {
049: return _id;
050: }
051:
052: /**
053: * @see net.sf.jportlet.portlets.bookmark.Bookmark#getTitle()
054: *
055: * @hibernate.property
056: * length="100"
057: * not-null="true"
058: */
059: public String getTitle() {
060: return _title;
061: }
062:
063: /**
064: * @see net.sf.jportlet.portlets.bookmark.Bookmark#getDescription()
065: *
066: * @hibernate.property
067: * length="255"
068: */
069: public String getDescription() {
070: return _description;
071: }
072:
073: /**
074: * @see net.sf.jportlet.portlets.bookmark.Bookmark#getUrl()
075: *
076: * @hibernate.property
077: * length="255"
078: * not-null="true"
079: */
080: public String getUrl() {
081: return _url;
082: }
083:
084: /**
085: * @return
086: * @hibernate.property
087: * length="255"
088: */
089: public String getUserId() {
090: return _userId;
091: }
092:
093: /**
094: * @param string
095: */
096: public void setDescription(String string) {
097: _description = string;
098: }
099:
100: /**
101: * @param string
102: */
103: public void setId(String string) {
104: _id = string;
105: }
106:
107: /**
108: * @param string
109: */
110: public void setTitle(String string) {
111: _title = string;
112: }
113:
114: public void setUrl(String url) {
115: _url = url;
116: }
117:
118: /**
119: * @param string
120: */
121: public void setUserId(String userId) {
122: _userId = userId;
123: }
124: }
|