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 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. // // rgc : 2 March 2011 : Still hacky. If the version field is in a mapped super class we need to look // at the defining metadata to find the correct Version. Not sure why the version for the declaring metadata // is different than the defining metadata. if (isVersion()){ ClassMapping cm = (ClassMapping)((FieldMetaData)this).getDefiningMetaData(); return cm.getVersion().getColumns(); }else return _val.getColumns(); }
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. // // rgc : 2 March 2011 : Still hacky. If the version field is in a mapped super class we need to look // at the defining metadata to find the correct Version. Not sure why the version for the declaring metadata // is different than the defining metadata. if (isVersion()){ ClassMapping cm = (ClassMapping)((FieldMetaData)this).getDefiningMetaData(); return cm.getVersion().getColumns(); }else return _val.getColumns(); }
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. // // rgc : 2 March 2011 : Still hacky. If the version field is in a mapped super class we need to look // at the defining metadata to find the correct Version. Not sure why the version for the declaring metadata // is different than the defining metadata. if (isVersion()){ ClassMapping cm = (ClassMapping)((FieldMetaData)this).getDefiningMetaData(); return cm.getVersion().getColumns(); }else return _val.getColumns(); }
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. // // rgc : 2 March 2011 : Still hacky. If the version field is in a mapped super class we need to look // at the defining metadata to find the correct Version. Not sure why the version for the declaring metadata // is different than the defining metadata. if (isVersion()){ ClassMapping cm = (ClassMapping)((FieldMetaData)this).getDefiningMetaData(); return cm.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); }
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); }
FieldMapping fmd = (FieldMapping) path.last(); if (fmd.isVersion()) augmentUpdates = false;
FieldMapping fmd = (FieldMapping) path.last(); if (fmd.isVersion()) augmentUpdates = false;
FieldMapping fmd = (FieldMapping) path.last(); if (fmd.isVersion()) augmentUpdates = false;
FieldMapping fmd = (FieldMapping) path.last(); if (fmd.isVersion()) augmentUpdates = false;
/** * Update {@link MappingInfo} with our current mapping information. */ public void syncMappingInfo() { if (isVersion()) { // we rely on the fact that the version will setup our mapping // info correctly when it is synced } else if (getMappedByMapping() != null) { _info.clear(); _val.getValueInfo().clear(); _key.getValueInfo().clear(); _elem.getValueInfo().clear(); FieldMapping mapped = getMappedByMapping(); _info.syncStrategy(this); if (_orderCol.getColumn() != null && mapped.getOrderColumn() == null) _info.syncOrderColumn(this); _val.getValueInfo().setUseClassCriteria (_val.getUseClassCriteria()); _key.getValueInfo().setUseClassCriteria (_key.getUseClassCriteria()); _elem.getValueInfo().setUseClassCriteria (_elem.getUseClassCriteria()); } else { _info.syncWith(this); _val.syncMappingInfo(); _key.syncMappingInfo(); _elem.syncMappingInfo(); } }
/** * Update {@link MappingInfo} with our current mapping information. */ public void syncMappingInfo() { if (isVersion()) { // we rely on the fact that the version will setup our mapping // info correctly when it is synced } else if (getMappedByMapping() != null) { _info.clear(); _val.getValueInfo().clear(); _key.getValueInfo().clear(); _elem.getValueInfo().clear(); FieldMapping mapped = getMappedByMapping(); _info.syncStrategy(this); if (_orderCol.getColumn() != null && mapped.getOrderColumn() == null) _info.syncOrderColumn(this); _val.getValueInfo().setUseClassCriteria (_val.getUseClassCriteria()); _key.getValueInfo().setUseClassCriteria (_key.getUseClassCriteria()); _elem.getValueInfo().setUseClassCriteria (_elem.getUseClassCriteria()); } else { _info.syncWith(this); _val.syncMappingInfo(); _key.syncMappingInfo(); _elem.syncMappingInfo(); } }
/** * Update {@link MappingInfo} with our current mapping information. */ public void syncMappingInfo() { if (isVersion()) { // we rely on the fact that the version will setup our mapping // info correctly when it is synced } else if (getMappedByMapping() != null) { _info.clear(); _val.getValueInfo().clear(); _key.getValueInfo().clear(); _elem.getValueInfo().clear(); FieldMapping mapped = getMappedByMapping(); _info.syncStrategy(this); if (_orderCol.getColumn() != null && mapped.getOrderColumn() == null) _info.syncOrderColumn(this); _val.getValueInfo().setUseClassCriteria (_val.getUseClassCriteria()); _key.getValueInfo().setUseClassCriteria (_key.getUseClassCriteria()); _elem.getValueInfo().setUseClassCriteria (_elem.getUseClassCriteria()); } else { _info.syncWith(this); _val.syncMappingInfo(); _key.syncMappingInfo(); _elem.syncMappingInfo(); } }
/** * Update {@link MappingInfo} with our current mapping information. */ public void syncMappingInfo() { if (isVersion()) { // we rely on the fact that the version will setup our mapping // info correctly when it is synced } else if (getMappedByMapping() != null) { _info.clear(); _val.getValueInfo().clear(); _key.getValueInfo().clear(); _elem.getValueInfo().clear(); FieldMapping mapped = getMappedByMapping(); _info.syncStrategy(this); if (_orderCol.getColumn() != null && mapped.getOrderColumn() == null) _info.syncOrderColumn(this); _val.getValueInfo().setUseClassCriteria (_val.getUseClassCriteria()); _key.getValueInfo().setUseClassCriteria (_key.getUseClassCriteria()); _elem.getValueInfo().setUseClassCriteria (_elem.getUseClassCriteria()); } else { _info.syncWith(this); _val.syncMappingInfo(); _key.syncMappingInfo(); _elem.syncMappingInfo(); } }
/** * Update {@link MappingInfo} with our current mapping information. */ public void syncMappingInfo() { if (isVersion()) { // we rely on the fact that the version will setup our mapping // info correctly when it is synced } else if (getMappedByMapping() != null) { _info.clear(); _val.getValueInfo().clear(); _key.getValueInfo().clear(); _elem.getValueInfo().clear(); FieldMapping mapped = getMappedByMapping(); _info.syncStrategy(this); if (_orderCol.getColumn() != null && mapped.getOrderColumn() == null) _info.syncOrderColumn(this); _val.getValueInfo().setUseClassCriteria (_val.getUseClassCriteria()); _key.getValueInfo().setUseClassCriteria (_key.getUseClassCriteria()); _elem.getValueInfo().setUseClassCriteria (_elem.getUseClassCriteria()); } else { _info.syncWith(this); _val.syncMappingInfo(); _key.syncMappingInfo(); _elem.syncMappingInfo(); } }
if (isVersion()) _strategy = NoneFieldStrategy.getInstance(); else
if (isVersion()) _strategy = NoneFieldStrategy.getInstance(); else