• R/O
  • HTTP
  • SSH
  • HTTPS

vaadin: Commit

sample


Commit MetaInfo

Revision7d548fda02d39fe0cb4a440222e8bd26f96e8d01 (tree)
Time2016-05-05 18:05:31
Authorcintake <gozilla3st@user...>
Commitercintake

Log Message

add jsp-api

Change Summary

Incremental Difference

--- /dev/null
+++ b/src/main/java/net/korabo/app/orientdb/OrientDbUtil.java
@@ -0,0 +1,30 @@
1+/*
2+ * To change this license header, choose License Headers in Project Properties.
3+ * To change this template file, choose Tools | Templates
4+ * and open the template in the editor.
5+ */
6+package net.korabo.app.orientdb;
7+
8+import com.orientechnologies.orient.core.id.ORID;
9+import com.orientechnologies.orient.core.record.impl.ODocument;
10+import com.orientechnologies.orient.object.enhancement.OObjectProxyMethodHandler;
11+import javassist.util.proxy.ProxyObject;
12+
13+/**
14+ *
15+ * @author cintake
16+ */
17+public class OrientDbUtil {
18+
19+ public static ORID getRIDfrm(Object iprxyobj) {
20+ ORID ret = null;
21+ if (iprxyobj instanceof ProxyObject) {
22+ ODocument oDocument = ((OObjectProxyMethodHandler) ((ProxyObject) iprxyobj).getHandler()).getDoc();
23+ if (oDocument != null) {
24+ ret = oDocument.getIdentity();
25+ }
26+ }
27+ return ret;
28+ }
29+
30+}
--- a/src/main/java/net/korabo/app/vaadin01/srv/ContactService.java
+++ b/src/main/java/net/korabo/app/vaadin01/srv/ContactService.java
@@ -109,17 +109,13 @@ public class ContactService {
109109 OObjectDatabaseTx db = new OObjectDatabaseTx(pool.acquire())) {
110110 db.getEntityManager().registerEntityClass(Contact.class);
111111 for (Contact contact : db.browseClass(Contact.class)) {
112- try {
113- boolean passesFilter = (stringFilter == null || stringFilter.isEmpty())
114- || contact.toString().toLowerCase()
115- .contains(stringFilter.toLowerCase());
116- if (passesFilter) {
117- arrayList.add(contact.clone());
118- }
119- } catch (CloneNotSupportedException ex) {
120- Logger.getLogger(ContactService.class.getName()).log(
121- Level.SEVERE, null, ex);
122- }
112+ boolean passesFilter = (stringFilter == null || stringFilter.isEmpty())
113+ || contact.toString().toLowerCase()
114+ .contains(stringFilter.toLowerCase());
115+ if (passesFilter) {
116+ contact = db.detach(contact);
117+ arrayList.add(contact);
118+ }
123119 }
124120
125121 }
--- a/src/main/webapp/VAADIN/themes/mytheme/addons.scss
+++ b/src/main/webapp/VAADIN/themes/mytheme/addons.scss
@@ -1,7 +1,7 @@
1-/* This file is automatically managed and will be overwritten from time to time. */
2-/* Do not manually edit this file. */
3-
4-/* Import and include this mixin into your project theme to include the addon themes */
5-@mixin addons {
6-}
7-
1+/* This file is automatically managed and will be overwritten from time to time. */
2+/* Do not manually edit this file. */
3+
4+/* Import and include this mixin into your project theme to include the addon themes */
5+@mixin addons {
6+}
7+
Show on old repository browser