/** * This method is to provide override for non-JDBC or JDBC-like * implementation of getting version from the result set. */ protected void getVersion(ClassMapping mapping, OpenJPAStateManager sm, Result res) throws SQLException { mapping.getVersion().afterLoad(sm, this); }
/** * This method is to provide override for non-JDBC or JDBC-like * implementation of getting version from the result set. */ protected void getVersion(ClassMapping mapping, OpenJPAStateManager sm, Result res) throws SQLException { mapping.getVersion().afterLoad(sm, this); }
/** * This method is to provide override for non-JDBC or JDBC-like * implementation of getting version from the result set. */ protected void getVersion(ClassMapping mapping, OpenJPAStateManager sm, Result res) throws SQLException { mapping.getVersion().afterLoad(sm, this); }
/** * Parse @VersionColumn(s). */ private void parseVersionColumns(ClassMapping cm, VersionColumn... vcols) { if (vcols.length == 0) return; List<Column> cols = new ArrayList<Column>(vcols.length); for (VersionColumn vcol : vcols) cols.add(newColumn(vcol, delimit())); cm.getVersion().getMappingInfo().setColumns(cols); }
public boolean checkVersion(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion) throws SQLException { return vers.getClassMapping().getPCSuperclassMapping().getVersion(). checkVersion(sm, store, updateVersion); }
public Map getBulkUpdateValues() { return vers.getClassMapping().getPCSuperclassMapping().getVersion() .getBulkUpdateValues(); } }
private void endVersionColumns() { if (_versionColumnsList == null) { throw new InternalException(); } if (_versionColumnsList.size() > 0) { ClassMapping cm = (ClassMapping)peekElement(); cm.getVersion().getMappingInfo().setColumns(_versionColumnsList); _versionColumnsList= null; } }
public void initialize() { // record whether we're using a state image indicator, which requires // that we do special null checks when loading primitives _stateImage = field.getDefiningMapping().getVersion().getStrategy(). getAlias().equals(StateComparisonVersionStrategy.ALIAS); if (_stateImage) field.setUsesImplData(null); }
public boolean checkVersion(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion) throws SQLException { return vers.getClassMapping().getPCSuperclassMapping().getVersion(). checkVersion(sm, store, updateVersion); }
public boolean syncVersion(OpenJPAStateManager sm, Object context) { ClassMapping mapping = (ClassMapping) sm.getMetaData(); try { return mapping.getVersion().checkVersion(sm, this, true); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } }
public boolean checkVersion(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion) throws SQLException { return vers.getClassMapping().getPCSuperclassMapping().getVersion(). checkVersion(sm, store, updateVersion); }
public Map getBulkUpdateValues() { return vers.getClassMapping().getPCSuperclassMapping().getVersion() .getBulkUpdateValues(); } }
public Map getBulkUpdateValues() { return vers.getClassMapping().getPCSuperclassMapping().getVersion() .getBulkUpdateValues(); } }
public void initialize() { // record whether we're using a state image indicator, which requires // that we do special null checks when loading primitives _stateImage = field.getDefiningMapping().getVersion().getStrategy(). getAlias().equals(StateComparisonVersionStrategy.ALIAS); if (_stateImage) field.setUsesImplData(null); }
private void endVersionColumns() { if (_versionColumnsList == null) { throw new InternalException(); } if (_versionColumnsList.size() > 0) { ClassMapping cm = (ClassMapping)peekElement(); cm.getVersion().getMappingInfo().setColumns(_versionColumnsList); _versionColumnsList= null; } }
public void initialize() { // record whether we're using a state image indicator, which requires // that we do special null checks when loading primitives _stateImage = field.getDefiningMapping().getVersion().getStrategy(). getAlias().equals(StateComparisonVersionStrategy.ALIAS); if (_stateImage) field.setUsesImplData(null); }
public boolean syncVersion(OpenJPAStateManager sm, Object context) { ClassMapping mapping = (ClassMapping) sm.getMetaData(); try { return mapping.getVersion().checkVersion(sm, this, true); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict, getReadLockLevel()); } }
public Column[] getColumns() { // pcl: 6 July 2007: this seems a bit hacky, but if the mapping is a // version, it will have a NoneFieldMapping (since the version strategy // for the class takes care of it's mapping), and NoneFieldStrategies // do not have columns. if (isVersion()) return getDeclaringMapping().getVersion().getColumns(); else return _val.getColumns(); }
public Object loadProjection(JDBCStore store, JDBCFetchConfiguration fetch, Result res, Joins joins) throws SQLException { // OPENJPA-662: Version fields have NoneFieldStrategy -- hence they // need special treatment if (isVersion()) { return getDefiningMapping().getVersion().load(null, store, res, joins); } return assertStrategy().loadProjection(store, fetch, res, joins); }
public Object loadProjection(JDBCStore store, JDBCFetchConfiguration fetch, Result res, Joins joins) throws SQLException { // OPENJPA-662: Version fields have NoneFieldStrategy -- hence they // need special treatment if (isVersion()) { return getDefiningMapping().getVersion().load(null, store, res, joins); } return assertStrategy().loadProjection(store, fetch, res, joins); }