My favorites
▼
|
Sign in
jo4neo
java objects for neo, the graph database
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
jo4neoblog
/
src
/
main
/
java
/
example
/
model
/
Post.java
‹r308
r490
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package example.model;
import java.util.Collection;
import java.util.Date;
import java.util.HashSet;
import java.util.LinkedList;
import jo4neo.*;
@neo(recency=true)
public class Post extends NeoBean<Post> {
@neo private Collection<Comment> comments = new LinkedList<Comment>();
@neo("hasTag") private Collection<Tag> tags = new HashSet<Tag>();
@neo User author;
@neo Date createdAt;
@neo String title;
@neo(fulltext=true) public String content;
public Post(String s) {
this();
}
public Post() {
createdAt = new Date();
}
public Collection<Comment> getComments() {
return comments;
}
public void setComments(Collection<Comment> comments) {
this.comments = comments;
}
public Post add(Comment c) {
comments.add(c); return this;
}
public User getAuthor() {
return author;
}
public void setAuthor(User author) {
this.author = author;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Collection<Tag> getTags() {
return tags;
}
public void setTags(Collection<Tag> tags) {
this.tags = tags;
}
public void addTag(Tag t) {
tags.add(t);
}
public int getCommentsCount() {
if ( comments != null)
return comments.size();
else
return 0;
}
}
Show details
Hide details
Change log
r439
by thewebsemantic on Feb 6, 2010
Diff
Go to:
/trunk/jo4neoblog/pom.xml
...main/java/action/PostAction.java
...in/java/action/SearchAction.java
...xample/BlogExceptionHandler.java
...ava/example/ContextListener.java
...n/java/example/InitialPosts.java
...a/example/PostTypeConverter.java
...ain/java/example/model/Post.java
...c/main/webapp/layout/default.jsp
Project members,
sign in
to write a code review
Older revisions
r308
by thewebsemantic on Dec 29, 2009
Diff
[No log message]
r241
by thewebsemantic on Dec 22, 2009
Diff
[No log message]
r215
by thewebsemantic on Dec 21, 2009
Diff
[No log message]
All revisions of this file
File info
Size: 1636 bytes, 91 lines
View raw file
Powered by
Google Project Hosting