public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // this will replace the field in the instance, so the dynamic // proxy should only be called the first time a // lazy-load-proxied field is used in normal usage. Object delegate = sm.fetch(idx); return method.invoke(delegate, args); } };
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // this will replace the field in the instance, so the dynamic // proxy should only be called the first time a // lazy-load-proxied field is used in normal usage. Object delegate = sm.fetch(idx); return method.invoke(delegate, args); } };
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // this will replace the field in the instance, so the dynamic // proxy should only be called the first time a // lazy-load-proxied field is used in normal usage. Object delegate = sm.fetch(idx); return method.invoke(delegate, args); } };
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // this will replace the field in the instance, so the dynamic // proxy should only be called the first time a // lazy-load-proxied field is used in normal usage. Object delegate = sm.fetch(idx); return method.invoke(delegate, args); } };
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // this will replace the field in the instance, so the dynamic // proxy should only be called the first time a // lazy-load-proxied field is used in normal usage. Object delegate = sm.fetch(idx); return method.invoke(delegate, args); } };
/** * Gets the value of the given field of the managed object. * * @param field name of a persistent property * @return value of the given field in the managed instance * @exception IllegalArgumentException if the named field is not a persistent property */ public Object getManangedFieldValue(String field) { FieldMetaData fmd = _sm.getMetaData().getField(field); if (fmd == null) { throw new IllegalArgumentException(field + " does not exist in " + _original); } return _sm.fetch(fmd.getIndex()); }
/** * Gets the value of the given field of the managed object. * * @param field name of a persistent property * @return value of the given field in the managed instance * @exception IllegalArgumentException if the named field is not a persistent property */ public Object getManangedFieldValue(String field) { FieldMetaData fmd = _sm.getMetaData().getField(field); if (fmd == null) { throw new IllegalArgumentException(field + " does not exist in " + _original); } return _sm.fetch(fmd.getIndex()); }
/** * Gets the value of the given field of the managed object. * * @param field name of a persistent property * @return value of the given field in the managed instance * @exception IllegalArgumentException if the named field is not a persistent property */ public Object getManangedFieldValue(String field) { FieldMetaData fmd = _sm.getMetaData().getField(field); if (fmd == null) { throw new IllegalArgumentException(field + " does not exist in " + _original); } return _sm.fetch(fmd.getIndex()); }
/** * Gets the value of the given field of the managed object. * * @param field name of a persistent property * @return value of the given field in the managed instance * @exception IllegalArgumentException if the named field is not a persistent property */ public Object getManangedFieldValue(String field) { FieldMetaData fmd = _sm.getMetaData().getField(field); if (fmd == null) { throw new IllegalArgumentException(field + " does not exist in " + _original); } return _sm.fetch(fmd.getIndex()); }
private void getRelations(StateManagerImpl sm, Collection rels, StoreContext ctx) { FieldMetaData[] fields = sm.getMetaData().getFields(); for (int i = 0; i < fields.length; i++) { Object obj = sm.fetch(i); StateManagerImpl esm = (StateManagerImpl)ctx.getStateManager(obj); if (esm != null) { if (!esm.isEmbedded()) rels.add(esm); else getRelations(esm, rels, ctx); } } }
private void getRelations(StateManagerImpl sm, Collection rels, StoreContext ctx) { FieldMetaData[] fields = sm.getMetaData().getFields(); for (int i = 0; i < fields.length; i++) { Object obj = sm.fetch(i); StateManagerImpl esm = (StateManagerImpl)ctx.getStateManager(obj); if (esm != null) { if (!esm.isEmbedded()) rels.add(esm); else getRelations(esm, rels, ctx); } } }
private void getRelations(StateManagerImpl sm, Collection rels, StoreContext ctx) { FieldMetaData[] fields = sm.getMetaData().getFields(); for (int i = 0; i < fields.length; i++) { Object obj = sm.fetch(i); StateManagerImpl esm = (StateManagerImpl)ctx.getStateManager(obj); if (esm != null) { if (!esm.isEmbedded()) rels.add(esm); else getRelations(esm, rels, ctx); } } }
private void getRelations(StateManagerImpl sm, Collection rels, StoreContext ctx) { FieldMetaData[] fields = sm.getMetaData().getFields(); for (int i = 0; i < fields.length; i++) { Object obj = sm.fetch(i); StateManagerImpl esm = (StateManagerImpl)ctx.getStateManager(obj); if (esm != null) { if (!esm.isEmbedded()) rels.add(esm); else getRelations(esm, rels, ctx); } } }
if (!saved.isFieldEqual(i, fetch(i))) { dirty(i);
if (!saved.isFieldEqual(i, fetch(i))) { dirty(i);
if (!saved.isFieldEqual(i, fetch(i))) { dirty(i);
public Object fetch(int field) { StateManager sm = _pc.pcGetStateManager(); if (sm != null) { if (sm instanceof DetachedStateManager) return fetchFromDetachedSM((DetachedStateManager) sm, field); if (_ctx.getAllowReferenceToSiblingContext() && sm instanceof StateManagerImpl) { return ((StateManagerImpl) sm).fetch(field); } throw new UnsupportedException(_loc.get("detach-val-badsm", _pc)); } provideField(field); Object val = fetchField(field, false); clear(); return _meta.getField(field).getExternalValue(val, _ctx.getBroker()); }
public Object fetch(int field) { StateManager sm = _pc.pcGetStateManager(); if (sm != null) { if (sm instanceof DetachedStateManager) return fetchFromDetachedSM((DetachedStateManager) sm, field); if (_ctx.getAllowReferenceToSiblingContext() && sm instanceof StateManagerImpl) { return ((StateManagerImpl) sm).fetch(field); } throw new UnsupportedException(_loc.get("detach-val-badsm", _pc)); } provideField(field); Object val = fetchField(field, false); clear(); return _meta.getField(field).getExternalValue(val, _ctx.getBroker()); }
public Object fetch(int field) { StateManager sm = _pc.pcGetStateManager(); if (sm != null) { if (sm instanceof DetachedStateManager) return fetchFromDetachedSM((DetachedStateManager) sm, field); if (_ctx.getAllowReferenceToSiblingContext() && sm instanceof StateManagerImpl) { return ((StateManagerImpl) sm).fetch(field); } throw new UnsupportedException(_loc.get("detach-val-badsm", _pc)); } provideField(field); Object val = fetchField(field, false); clear(); return _meta.getField(field).getExternalValue(val, _ctx.getBroker()); }
public Object fetch(int field) { StateManager sm = _pc.pcGetStateManager(); if (sm != null) { if (sm instanceof DetachedStateManager) return fetchFromDetachedSM((DetachedStateManager) sm, field); if (_ctx.getAllowReferenceToSiblingContext() && sm instanceof StateManagerImpl) { return ((StateManagerImpl) sm).fetch(field); } throw new UnsupportedException(_loc.get("detach-val-badsm", _pc)); } provideField(field); Object val = fetchField(field, false); clear(); return _meta.getField(field).getExternalValue(val, _ctx.getBroker()); }