- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 41 of file LogLoader.java.
◆ load()
Collection<ILogRegister> org.turro.contacts.log.LogLoader.load |
( |
LogType |
type, |
|
|
String |
pathOrigin, |
|
|
int |
group, |
|
|
String |
comment |
|
) |
| |
Implements org.turro.plugin.log.ILogLoader.
Definition at line 44 of file LogLoader.java.
45 Dao dao =
new ContactsPU();
46 List<Object[]> list = dao.getResultList(createCriteria(type, pathOrigin, group, comment));
47 ArrayList<ILogRegister> result =
new ArrayList<ILogRegister>();
48 for(Object o[] : list) {
49 String path =
null, name =
null, actualComment =
null;
51 int count = 0, field = 0;
52 if(group == LogUtil.GROUP_ENTITY) {
53 path = (String) o[field++];
54 }
else if(group == LogUtil.GROUP_USER) {
55 name = (String) o[field++];
57 if(Strings.isBlank(comment)) {
58 actualComment = (String) o[field++];
60 count = ((Long) o[field++]).intValue();
61 date = (Date) o[field++];
62 result.add(
new LogRegister(type, path,
null, name, date, actualComment,
null, count));
◆ loadLogin()
Collection<ILogRegister> org.turro.contacts.log.LogLoader.loadLogin |
( |
| ) |
|
Implements org.turro.plugin.log.ILogLoader.
Definition at line 127 of file LogLoader.java.
128 Dao dao =
new ContactsPU();
129 List<Object[]> list = dao.getResultList(createLoginCriteria());
130 ArrayList<ILogRegister> result =
new ArrayList<ILogRegister>();
131 for(Object o[] : list) {
134 int count = 0, field = 0;
135 path = (String) o[field++];
136 name = (String) o[field++];
137 count = ((Long) o[field++]).intValue();
138 date = (Date) o[field++];
139 result.add(
new LogRegister(
null,
null,
null, name, date, path,
null, count));
The documentation for this class was generated from the following file: