@Override public Object read(DbReadContext ctx) throws SQLException { return idProperty.read(ctx); }
@Override public Object readSet(DbReadContext ctx, EntityBean bean) throws SQLException { Object id = idProperty.read(ctx); if (id != null) { idProperty.setValue(bean, id); } return id; }
@Override public Object read(DbReadContext ctx) throws SQLException { return idProperty.read(ctx); }
public Object load(BeanProperty prop) { if (!rawSql && !prop.isLoadProperty(ctx.isDraftQuery())) { return null; } if ((bean == null) || (lazyLoading && ebi.isLoadedProperty(prop.getPropertyIndex())) || (type != null && !prop.isAssignableFrom(type))) { // ignore this property // ... null: bean already in persistence context // ... lazyLoading: partial bean that is lazy loading // ... type: inheritance and not assignable to this instance prop.loadIgnore(ctx); return null; } try { Object dbVal = prop.read(ctx); if (!refreshLoading) { prop.setValue(bean, dbVal); } else { prop.setValueIntercept(bean, dbVal); } return dbVal; } catch (Exception e) { bean._ebean_getIntercept().setLoadError(prop.getPropertyIndex(), e); ctx.handleLoadError(prop.getFullBeanName(), e); return prop.getValue(bean); } }
@Override public Object readSet(DbReadContext ctx, EntityBean bean) throws SQLException { Object id = idProperty.read(ctx); if (id != null) { idProperty.setValue(bean, id); } return id; }
public Object load(BeanProperty prop) { if (!rawSql && !prop.isLoadProperty(ctx.isDraftQuery())) { return null; } if ((bean == null) || (lazyLoading && ebi.isLoadedProperty(prop.getPropertyIndex())) || (type != null && !prop.isAssignableFrom(type))) { // ignore this property // ... null: bean already in persistence context // ... lazyLoading: partial bean that is lazy loading // ... type: inheritance and not assignable to this instance prop.loadIgnore(ctx); return null; } try { Object dbVal = prop.read(ctx); if (!refreshLoading) { prop.setValue(bean, dbVal); } else { prop.setValueIntercept(bean, dbVal); } return dbVal; } catch (Exception e) { bean._ebean_getIntercept().setLoadError(prop.getPropertyIndex(), e); ctx.handleLoadError(prop.getFullBeanName(), e); return prop.getValue(bean); } }