protected void putData(OpenJPAStateManager sm, ResultSet rs, DBDictionary dict) throws SQLException { byte[] b = (byte[]) sm.setImplData(field.getIndex(), null); Blob blob = rs.getBlob(1); dict.putBytes(blob, b); }
protected void putData(OpenJPAStateManager sm, ResultSet rs, DBDictionary dict) throws SQLException { byte[] b = (byte[]) sm.setImplData(field.getIndex(), null); Blob blob = rs.getBlob(1); dict.putBytes(blob, b); }
protected void putData(OpenJPAStateManager sm, ResultSet rs, DBDictionary dict) throws SQLException { byte[] b = (byte[]) sm.setImplData(field.getIndex(), null); Blob blob = rs.getBlob(1); dict.putBytes(blob, b); }
protected void putData(OpenJPAStateManager sm, ResultSet rs, DBDictionary dict) throws SQLException { byte[] b = (byte[]) sm.setImplData(field.getIndex(), null); Blob blob = rs.getBlob(1); dict.putBytes(blob, b); }
protected void putData(OpenJPAStateManager sm, ResultSet rs, DBDictionary dict) throws SQLException { byte[] b = (byte[]) sm.setImplData(field.getIndex(), null); Object blob = rs.getBlob(1); dict.putBytes(blob, b); }
/** * Set field-level impl data into the given state manager. */ protected void loadImplData(OpenJPAStateManager sm, FieldMetaData fmd) { int index = fmd.getIndex(); Object impl = getImplData(index); if (impl != null) sm.setImplData(index, impl); }
/** * Set impl data information into the given state manager. */ protected void loadImplData(OpenJPAStateManager sm) { Object impl = getImplData(); if (sm.getImplData() == null && impl != null) sm.setImplData(impl, true); }
public boolean exists(OpenJPAStateManager sm, Object edata) { for (SliceStoreManager slice : _slices) { if (slice.exists(sm, edata)) { sm.setImplData(slice.getName(), true); return true; } } return false; }
/** * Set impl data information into the given state manager. */ protected void loadImplData(OpenJPAStateManager sm) { Object impl = getImplData(); if (sm.getImplData() == null && impl != null) sm.setImplData(impl, true); }
/** * Set impl data information into the given state manager. */ protected void loadImplData(OpenJPAStateManager sm) { Object impl = getImplData(); if (sm.getImplData() == null && impl != null) sm.setImplData(impl, true); }
/** * Set impl data information into the given state manager. */ protected void loadImplData(OpenJPAStateManager sm) { Object impl = getImplData(); if (sm.getImplData() == null && impl != null) sm.setImplData(impl, true); }
/** * Set field-level impl data into the given state manager. */ protected void loadImplData(OpenJPAStateManager sm, FieldMetaData fmd) { int index = fmd.getIndex(); Object impl = getImplData(index); if (impl != null) sm.setImplData(index, impl); }
/** * Set impl data information into the given state manager. */ protected void loadImplData(OpenJPAStateManager sm) { Object impl = getImplData(); if (sm.getImplData() == null && impl != null) sm.setImplData(impl, true); }
/** * Set field-level impl data into the given state manager. */ protected void loadImplData(OpenJPAStateManager sm, FieldMetaData fmd) { int index = fmd.getIndex(); Object impl = getImplData(index); if (impl != null) sm.setImplData(index, impl); }
private String assignSlice(OpenJPAStateManager sm) { Object pc = sm.getPersistenceCapable(); DistributionPolicy policy = _conf.getDistributionPolicyInstance(); List<String> sliceNames = _conf.getActiveSliceNames(); String slice =policy.distribute(pc, sliceNames, getContext()); if (!sliceNames.contains(slice)) { throw new UserException(_loc.get("bad-policy-slice", new Object[] { policy.getClass().getName(), slice, pc, sliceNames })); } sm.setImplData(slice, true); return slice; }
protected Object getValue(OpenJPAStateManager sm) { byte[] b = (byte[]) sm.getImplData(field.getIndex()); if (b == null || (b.length > _maxSize && !field.getColumns()[0].isNotNull())) return null; sm.setImplData(field.getIndex(), null); DBDictionary.SerializedData dat = new DBDictionary.SerializedData(b); return dat; } }
protected Object getValue(OpenJPAStateManager sm) { byte[] b = (byte[]) sm.getImplData(field.getIndex()); if (b == null || (b.length > _maxSize && !field.getColumns()[0].isNotNull())) return null; sm.setImplData(field.getIndex(), null); DBDictionary.SerializedData dat = new DBDictionary.SerializedData(b); return dat; } }
protected Object getValue(OpenJPAStateManager sm) { byte[] b = (byte[]) sm.getImplData(field.getIndex()); if (b == null || (b.length > _maxSize && !field.getColumns()[0].isNotNull())) return null; sm.setImplData(field.getIndex(), null); DBDictionary.SerializedData dat = new DBDictionary.SerializedData(b); return dat; } }
protected void update(OpenJPAStateManager sm, Row row) throws SQLException { byte[] b = (byte[]) sm.getImplData(field.getIndex()); if (b == null || (b.length > _maxSize && !field.getColumns()[0].isNotNull())) row.setNull(field.getColumns()[0], true); else { sm.setImplData(field.getIndex(), null); DBDictionary.SerializedData dat = new DBDictionary.SerializedData(b); row.setObject(field.getColumns()[0], dat); } }
protected void update(OpenJPAStateManager sm, Row row) throws SQLException { byte[] b = (byte[]) sm.getImplData(field.getIndex()); if (b == null || (b.length > _maxSize && !field.getColumns()[0].isNotNull())) row.setNull(field.getColumns()[0], true); else { sm.setImplData(field.getIndex(), null); DBDictionary.SerializedData dat = new DBDictionary.SerializedData(b); row.setObject(field.getColumns()[0], dat); } }