|
static void | addDescription (Object entity, String id, String description, Contact contact, ChangedValue changed) |
|
static void | addDescription (String path, String id, String description, Contact contact, ChangedValue changed) |
|
static void | remove (String id) |
|
static void | remove (String path, String id) |
|
static Collection< DescribeIt > | descriptions (Object entity) |
|
static Collection< DescribeIt > | descriptions (String path) |
|
static Collection< DescribeIt > | descriptions (String id, Object entity) |
|
static Collection< DescribeIt > | descriptions (String id, String path) |
|
static DescribeIt | description (String id, Object entity) |
|
static DescribeIt | description (String id, String path) |
|
static String | descriptionString (String id, Object entity) |
|
static String | descriptionString (String id, String path) |
|
static Collection< DescribeIt > | pending () |
|
static long | countPending () |
|
static long | count () |
|
static long | count (Object entity) |
|
static long | count (String path) |
|
◆ addDescription() [1/2]
static void org.turro.describeit.DescribeItUtil.addDescription |
( |
Object |
entity, |
|
|
String |
id, |
|
|
String |
description, |
|
|
Contact |
contact, |
|
|
ChangedValue |
changed |
|
) |
| |
|
static |
Definition at line 40 of file DescribeItUtil.java.
41 String path = Entities.getController(entity).getPath();
static DescribeIt description(String id, Object entity)
static void addDescription(Object entity, String id, String description, Contact contact, ChangedValue changed)
◆ addDescription() [2/2]
static void org.turro.describeit.DescribeItUtil.addDescription |
( |
String |
path, |
|
|
String |
id, |
|
|
String |
description, |
|
|
Contact |
contact, |
|
|
ChangedValue |
changed |
|
) |
| |
|
static |
Definition at line 47 of file DescribeItUtil.java.
48 if(Strings.isBlank(
id)) {
51 if(!Strings.isBlank(path) && !Strings.isBlank(
description) && contact !=
null) {
53 Dao dao =
new ContactsPU();
54 if(describeIt !=
null) {
55 if(describeIt.isContainsWiki()) {
58 changed.onChange(describeIt.getWiki(),
description);
61 describeIt.setBody(WikiCompiler.source(describeIt.getWiki()).html());
66 changed.onChange(describeIt.getBody(),
description);
72 describeIt =
new DescribeIt();
73 describeIt.setDescribeId(
id);
74 describeIt.setCreator(contact);
75 describeIt.setDateCreation(
new Date());
76 describeIt.setPath(path);
77 if(describeIt.isContainsWiki()) {
79 describeIt.setBody(WikiCompiler.source(describeIt.getWiki()).html());
84 dao.saveObject(describeIt);
static final String DEFAULT_ID
◆ count() [1/3]
static long org.turro.describeit.DescribeItUtil.count |
( |
| ) |
|
|
static |
Definition at line 185 of file DescribeItUtil.java.
186 Dao dao =
new ContactsPU();
187 return (Long) dao.getSingleResultOrNull(
188 " select count(c) from DescribeIt c "
◆ count() [2/3]
static long org.turro.describeit.DescribeItUtil.count |
( |
Object |
entity | ) |
|
|
static |
Definition at line 192 of file DescribeItUtil.java.
193 String path = Entities.getController(entity).getPath();
◆ count() [3/3]
static long org.turro.describeit.DescribeItUtil.count |
( |
String |
path | ) |
|
|
static |
Definition at line 200 of file DescribeItUtil.java.
201 Dao dao =
new ContactsPU();
202 Long
count = (Long) dao.getSingleResultOrNull(
203 " select count(c) from DescribeIt c " +
205 " order by dateCreation desc ",
206 new Object[] { path }
◆ countPending()
static long org.turro.describeit.DescribeItUtil.countPending |
( |
| ) |
|
|
static |
Definition at line 177 of file DescribeItUtil.java.
178 Dao dao =
new ContactsPU();
179 return (Long) dao.getSingleResultOrNull(
180 " select count(c) from DescribeIt c " +
181 " where accepted = FALSE "
◆ description() [1/2]
static DescribeIt org.turro.describeit.DescribeItUtil.description |
( |
String |
id, |
|
|
Object |
entity |
|
) |
| |
|
static |
Definition at line 142 of file DescribeItUtil.java.
144 if(list !=
null && !list.isEmpty()) {
145 return list.iterator().next();
static Collection< DescribeIt > descriptions(Object entity)
◆ description() [2/2]
static DescribeIt org.turro.describeit.DescribeItUtil.description |
( |
String |
id, |
|
|
String |
path |
|
) |
| |
|
static |
Definition at line 150 of file DescribeItUtil.java.
152 if(list !=
null && !list.isEmpty()) {
153 return list.iterator().next();
◆ descriptions() [1/4]
static Collection<DescribeIt> org.turro.describeit.DescribeItUtil.descriptions |
( |
Object |
entity | ) |
|
|
static |
Definition at line 105 of file DescribeItUtil.java.
106 String path = Entities.getController(entity).getPath();
◆ descriptions() [2/4]
static Collection<DescribeIt> org.turro.describeit.DescribeItUtil.descriptions |
( |
String |
id, |
|
|
Object |
entity |
|
) |
| |
|
static |
Definition at line 123 of file DescribeItUtil.java.
124 String path = Entities.getController(entity).getPath();
◆ descriptions() [3/4]
static Collection<DescribeIt> org.turro.describeit.DescribeItUtil.descriptions |
( |
String |
id, |
|
|
String |
path |
|
) |
| |
|
static |
Definition at line 131 of file DescribeItUtil.java.
132 Dao dao =
new ContactsPU();
133 return dao.getResultList(
134 " select c from DescribeIt c " +
136 " and describeId = ? " +
137 " order by dateCreation ",
138 new Object[] { path,
id }
◆ descriptions() [4/4]
static Collection<DescribeIt> org.turro.describeit.DescribeItUtil.descriptions |
( |
String |
path | ) |
|
|
static |
Definition at line 113 of file DescribeItUtil.java.
114 Dao dao =
new ContactsPU();
115 return dao.getResultList(
116 " select c from DescribeIt c " +
118 " order by dateCreation ",
119 new Object[] { path }
◆ descriptionString() [1/2]
static String org.turro.describeit.DescribeItUtil.descriptionString |
( |
String |
id, |
|
|
Object |
entity |
|
) |
| |
|
static |
◆ descriptionString() [2/2]
static String org.turro.describeit.DescribeItUtil.descriptionString |
( |
String |
id, |
|
|
String |
path |
|
) |
| |
|
static |
◆ pending()
static Collection<DescribeIt> org.turro.describeit.DescribeItUtil.pending |
( |
| ) |
|
|
static |
Definition at line 168 of file DescribeItUtil.java.
169 Dao dao =
new ContactsPU();
170 return dao.getResultList(
171 " select c from DescribeIt c " +
172 " where accepted = FALSE " +
173 " order by dateCreation "
◆ remove() [1/2]
static void org.turro.describeit.DescribeItUtil.remove |
( |
String |
id | ) |
|
|
static |
Definition at line 88 of file DescribeItUtil.java.
89 Dao dao =
new ContactsPU();
91 " delete from DescribeIt c " +
92 " where c.id = '" +
id +
"'"
◆ remove() [2/2]
static void org.turro.describeit.DescribeItUtil.remove |
( |
String |
path, |
|
|
String |
id |
|
) |
| |
|
static |
Definition at line 96 of file DescribeItUtil.java.
97 Dao dao =
new ContactsPU();
99 " delete from DescribeIt c" +
100 " where c.describeId = '" +
id +
"'" +
101 " and c.path = '" + path +
"'"
◆ DEFAULT_ID
final String org.turro.describeit.DescribeItUtil.DEFAULT_ID = "Default" |
|
static |
The documentation for this class was generated from the following file: