@Override protected void upgrade() { super.upgrade(); if (TYPE_0_1.equals(type)) { Map<String, Object> me = JSObjectAdapter.$properties(this); // Error in older versions of LD objects: We used @schema instead of // @context. Whoops. if (me.$get("@context") == null && me.$get("@schema") != null) me.$put("@context", me.$get("@schema")); setContextAndType(Ebac.context_0_2, TYPE_0_2); } if (TYPE_0_2.equals(getFullType())) { setContextAndType(Ebac.context_0_3, TYPE_0_3); } }
@Override protected void upgrade() { super.upgrade(); if (TYPE_0_1.equals(type)) { Map<String, Object> me = JSObjectAdapter.$properties(this); // Error in older versions of LD objects: We used @schema instead of // @context. Whoops. if (me.$get("@context") == null && me.$get("@schema") != null) me.$put("@context", me.$get("@schema")); setContextAndType(Ebac.context_0_2, TYPE_0_2); } if (TYPE_0_2.equals(getFullType())) { setContextAndType(Ebac.context_0_3, TYPE_0_3); } }
@Override public void copyFrom(Object that) { Map<String, Object> me = JSObjectAdapter.$properties(this); for (String key : me) me.$delete(key); Map<String, Object> you = JSObjectAdapter.$properties(that); // We do not upgrade encrypted objects, as it invalidates the // signatures. for (String key : you) { if (me.$get(key) == null) me.$put(key.replace("@", ""), you.$get(key)); } if (!isAny(getTypes())) throw new RuntimeException("Incompatible type: " + getFullType()); }
private static void getHandleData(Object p1, String originalUrl, Callback1<EcRemoteLinkedData> success, Callback1<String> failure, String finalUrl) { JSObjectAdapter.$properties(fetching).$delete(originalUrl); EcRemoteLinkedData d = new EcRemoteLinkedData("", ""); d.copyFrom(p1); if (d.getFullType() == null) { EcRepository.find(originalUrl, Global.JSON.stringify(p1), new Object(), 0, success, failure); return; } if (caching) { JSObjectAdapter.$put(cache, finalUrl, d); if (d.id != null) JSObjectAdapter.$put(cache, d.id, d); //See eduworks/ec#1 - fray. //JSObjectAdapter.$put(cache, d.shortId(), d); } success.$invoke(d); }
@Override protected void upgrade() { super.upgrade(); if (TYPE_0_1==type) { Map<String, Object> me = JSObjectAdapter.$properties(this); // Error in older versions of LD objects: We used @schema instead of // @context. Whoops. if (me.$get("@context") == null && me.$get("@schema") != null) me.$put("@context", me.$get("@schema")); setContextAndType(Ebac.context_0_2, TYPE_0_2); } if (TYPE_0_2==getFullType()) { setContextAndType(Ebac.context_0_3, TYPE_0_3); } }
@Override protected void upgrade() { super.upgrade(); if (TYPE_0_1.equals(type)) { Map<String, Object> me = JSObjectAdapter.$properties(this); // Error in older versions of LD objects: We used @schema instead of // @context. Whoops. if (me.$get("@context") == null && me.$get("@schema") != null) me.$put("@context", me.$get("@schema")); setContextAndType(Ebac.context_0_2, TYPE_0_2); } if (TYPE_0_2.equals(getFullType())) { setContextAndType(Ebac.context_0_3, TYPE_0_3); } }
@Override protected void upgrade() { super.upgrade(); if (TYPE_0_1.equals(type)) { Map<String, Object> me = JSObjectAdapter.$properties(this); // Error in older versions of LD objects: We used @schema instead of // @context. Whoops. if (me.$get("@context") == null && me.$get("@schema") != null) me.$put("@context", me.$get("@schema")); setContextAndType(Ebac.context_0_2, TYPE_0_2); } if (TYPE_0_2.equals(getFullType())) { setContextAndType(Ebac.context_0_3, TYPE_0_3); } }
@Override protected void upgrade() { super.upgrade(); if (TYPE_0_1.equals(type)) { Map<String, Object> me = JSObjectAdapter.$properties(this); // Error in older versions of LD objects: We used @schema instead of // @context. Whoops. if (me.$get("@context") == null && me.$get("@schema") != null) me.$put("@context", me.$get("@schema")); setContextAndType(Ebac.context_0_2, TYPE_0_2); } if (TYPE_0_2.equals(getFullType())) { setContextAndType(Ebac.context_0_3, TYPE_0_3); } }
@Override protected void upgrade() { super.upgrade(); if (TYPE_0_1.equals(type)) { Map<String, Object> me = JSObjectAdapter.$properties(this); // Error in older versions of LD objects: We used @schema instead of // @context. Whoops. if (me.$get("@context") == null && me.$get("@schema") != null) me.$put("@context", me.$get("@schema")); setContextAndType(Ebac.context_0_2, TYPE_0_2); } if (TYPE_0_2.equals(getFullType())) { setContextAndType(Ebac.context_0_3, TYPE_0_3); } }
@Override protected void upgrade() { super.upgrade(); if (TYPE_0_1.equals(type)) { Map<String, Object> me = JSObjectAdapter.$properties(this); // Error in older versions of LD objects: We used @schema instead of // @context. Whoops. if (me.$get("@context") == null && me.$get("@schema") != null) me.$put("@context", me.$get("@schema")); setContextAndType(Ebac.context_0_2, TYPE_0_2); } if (TYPE_0_2.equals(getFullType())) { setContextAndType(Ebac.context_0_3, TYPE_0_3); } }
@Override protected void upgrade() { super.upgrade(); if (TYPE_0_1==type) { Map<String, Object> me = JSObjectAdapter.$properties(this); // Error in older versions of LD objects: We used @schema instead of // @context. Whoops. if (me.$get("@context") == null && me.$get("@schema") != null) me.$put("@context", me.$get("@schema")); setContextAndType(Ebac.context_0_2, TYPE_0_2); } if (TYPE_0_2==getFullType()) { setContextAndType(Ebac.context_0_3, TYPE_0_3); } }
@Override protected void upgrade() { super.upgrade(); if (TYPE_0_1.equals(type)) { Map<String, Object> me = JSObjectAdapter.$properties(this); // Error in older versions of LD objects: We used @schema instead of // @context. Whoops. if (me.$get("@context") == null && me.$get("@schema") != null) me.$put("@context", me.$get("@schema")); setContextAndType(General.context_0_2, TYPE_0_2); } }
public EcCompetency() { Map<String, Object> me = JSObjectAdapter.$properties(this); if (template != null) { Map<String, Object> you = JSObjectAdapter.$properties(template); for (String key : you) { if (JSGlobal.typeof(you.$get(key)) != "function") me.$put(key.replace("@", ""), you.$get(key)); } } }
@Override public void $invoke(String p1) { if (cacheKey != null) { JSObjectAdapter.$properties(fetching).$delete(cacheKey); } JSObjectAdapter.$put(cache, cacheKey, null); } });
public EcFramework() { Map<String, Object> me = JSObjectAdapter.$properties(this); if (template != null) { Map<String, Object> you = JSObjectAdapter.$properties(template); for (String key : you) { if (JSGlobal.typeof(you.$get(key)) != "function") me.$put(key.replace("@", ""), you.$get(key)); } } }
@Override public void $invoke(String p1) { if (cacheKey != null) { JSObjectAdapter.$properties(fetching).$delete(cacheKey); } JSObjectAdapter.$put(cache, cacheKey, null); } });
@Override public void $invoke(Object p1) { JSObjectAdapter.$put(cache, cacheKey, p1); if (cacheKey != null) { JSObjectAdapter.$properties(fetching).$delete(cacheKey); } } }, new Callback1<String>() {
@Override public void $invoke(Object p1) { JSObjectAdapter.$put(cache, cacheKey, p1); if (cacheKey != null) { JSObjectAdapter.$properties(fetching).$delete(cacheKey); } } }, new Callback1<String>() {
@Override public void $invoke(Object p1) { if (cachingSearch) { JSObjectAdapter.$put(cache, cacheKey, p1); } if (cacheKey != null) { JSObjectAdapter.$properties(fetching).$delete(cacheKey); } me.handleSearchResults((Array<EcRemoteLinkedData>) p1, eachSuccess, success, failure); } }, new Callback1<String>() {
@Override public void $invoke(String p1) { if (cacheKey != null) { JSObjectAdapter.$properties(fetching).$delete(cacheKey); } if (failure != null) { failure.$invoke(p1); } } });