public boolean checkVersion(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion) throws SQLException { if (updateVersion) sm.setVersion(null); return !updateVersion; }
public boolean checkVersion(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion) throws SQLException { if (updateVersion) sm.setVersion(null); return !updateVersion; }
public boolean checkVersion(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion) throws SQLException { if (updateVersion) sm.setVersion(null); return !updateVersion; }
public boolean checkVersion(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion) throws SQLException { if (updateVersion) sm.setVersion(null); return !updateVersion; }
public boolean checkVersion(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion) throws SQLException { if (updateVersion) sm.setVersion(null); return !updateVersion; }
/** * Sets the version of the given StateManagers from the cached versions. * Provided that the StateManager does not appear in the FlusSets of the * remaining. */ private void rollbackVersion(List<OpenJPAStateManager> sms, Map<OpenJPAStateManager, Object> oldVersions, Collection<StateManagerSet> reminder) { if (reminder.isEmpty()) return; for (OpenJPAStateManager sm : sms) { if (occurs(sm, reminder)) sm.setVersion(oldVersions.get(sm)); } }
/** * Sets the version of the given StateManagers from the cached versions. * Provided that the StateManager does not appear in the FlusSets of the * remaining. */ private void rollbackVersion(List<OpenJPAStateManager> sms, Map<OpenJPAStateManager, Object> oldVersions, Collection<StateManagerSet> reminder) { if (reminder.isEmpty()) return; for (OpenJPAStateManager sm : sms) { if (occurs(sm, reminder)) sm.setVersion(oldVersions.get(sm)); } }
/** * Sets the version of the given StateManagers from the cached versions. * Provided that the StateManager does not appear in the FlusSets of the * remaining. */ private void rollbackVersion(List<OpenJPAStateManager> sms, Map<OpenJPAStateManager, Object> oldVersions, Collection<StateManagerSet> reminder) { if (reminder.isEmpty()) return; for (OpenJPAStateManager sm : sms) { if (occurs(sm, reminder)) sm.setVersion(oldVersions.get(sm)); } }
/** * Set version information into the given state manager. */ protected void loadVersion(OpenJPAStateManager sm) { if (sm.getVersion() == null) sm.setVersion(getVersion()); }
/** * Set version information into the given state manager. */ protected void loadVersion(OpenJPAStateManager sm) { if (sm.getVersion() == null) sm.setVersion(getVersion()); }
/** * Set version information into the given state manager. */ protected void loadVersion(OpenJPAStateManager sm) { if (sm.getVersion() == null) sm.setVersion(getVersion()); }
/** * Set version information into the given state manager. */ protected void loadVersion(OpenJPAStateManager sm) { if (sm.getVersion() == null) sm.setVersion(getVersion()); }
/** * Set version information into the given state manager. */ protected void loadVersion(OpenJPAStateManager sm) { if (sm.getVersion() == null) sm.setVersion(getVersion()); }
/** * Load the data and version information for this object into the * given state manager. Only fields in the given bit set will be loaded. */ public void load(OpenJPAStateManager sm, BitSet fields, FetchConfiguration fetch) { if (sm.getVersion() == null) sm.setVersion(_version); FieldMetaData[] fmds = _meta.getFields(); for (int i = 0; i < fmds.length; i++) if (fields.get(i)) sm.store(i, toLoadable(sm, fmds[i], _data[i], fetch)); }
/** * Load the data and version information for this object into the * given state manager. Only fields in the given bit set will be loaded. */ public void load(OpenJPAStateManager sm, BitSet fields, FetchConfiguration fetch) { if (sm.getVersion() == null) sm.setVersion(_version); FieldMetaData[] fmds = _meta.getFields(); for (int i = 0; i < fmds.length; i++) if (fields.get(i)) sm.store(i, toLoadable(sm, fmds[i], _data[i], fetch)); }
public Object load(OpenJPAStateManager sm, JDBCStore store, Result res, Joins joins) throws SQLException { // typically if one version column is in the result, they all are, so // optimize by checking for the first one before doing any real work Column[] cols = vers.getColumns(); if (!res.contains(cols[0], joins)) { return null; } Object version = populateFromResult(res, joins); // OPENJPA-662 Allow a null StateManager because this method may just be // invoked to get the result of projection query if (sm != null) { sm.setVersion(version); } return version; }
public Object load(OpenJPAStateManager sm, JDBCStore store, Result res, Joins joins) throws SQLException { // typically if one version column is in the result, they all are, so // optimize by checking for the first one before doing any real work Column[] cols = vers.getColumns(); if (!res.contains(cols[0], joins)) { return null; } Object version = populateFromResult(res, joins); // OPENJPA-662 Allow a null StateManager because this method may just be // invoked to get the result of projection query if (sm != null) { sm.setVersion(version); } return version; }
public Object load(OpenJPAStateManager sm, JDBCStore store, Result res, Joins joins) throws SQLException { // typically if one version column is in the result, they all are, so // optimize by checking for the first one before doing any real work Column[] cols = vers.getColumns(); if (!res.contains(cols[0], joins)) { return null; } Object version = populateFromResult(res, joins); // OPENJPA-662 Allow a null StateManager because this method may just be // invoked to get the result of projection query if (sm != null) { sm.setVersion(version); } return version; }
/** * Load the data and version information for this object into the * given state manager. Only fields in the given fetch configuration are * loaded. */ public void load(OpenJPAStateManager sm, FetchConfiguration fetch) { if (sm.getVersion() == null) sm.setVersion(_version); FieldMetaData[] fmds = _meta.getFields(); for (int i = 0; i < fmds.length; i++) if (!sm.getLoaded().get(i) && fetch.requiresFetch(fmds[i]) != FetchConfiguration.FETCH_NONE) sm.store(i, toLoadable(sm, fmds[i], _data[i], fetch)); }
/** * Load the data and version information for this object into the * given state manager. Only fields in the given fetch configuration are * loaded. */ public void load(OpenJPAStateManager sm, FetchConfiguration fetch) { if (sm.getVersion() == null) sm.setVersion(_version); FieldMetaData[] fmds = _meta.getFields(); for (int i = 0; i < fmds.length; i++) if (!sm.getLoaded().get(i) && fetch.requiresFetch(fmds[i]) != FetchConfiguration.FETCH_NONE) sm.store(i, toLoadable(sm, fmds[i], _data[i], fetch)); }