/** * Instantiate the given version's named strategy, or return null * if no named strategy. */ protected VersionStrategy namedStrategy(Version version) { String name = version.getMappingInfo().getStrategy(); if (name == null) return null; // if there is a named strategy present, discard it if it matches // the base strategy, so that we won't create an independent instance ClassMapping cls = version.getClassMapping(); while (cls.getJoinablePCSuperclassMapping() != null) cls = cls.getJoinablePCSuperclassMapping(); Version base = cls.getVersion(); if (base != version && base.getStrategy() != null && name.equals(base.getStrategy().getAlias())) return null; return instantiateVersionStrategy(name, version); }
/** * Instantiate the given version's named strategy, or return null * if no named strategy. */ protected VersionStrategy namedStrategy(Version version) { String name = version.getMappingInfo().getStrategy(); if (name == null) return null; // if there is a named strategy present, discard it if it matches // the base strategy, so that we won't create an independent instance ClassMapping cls = version.getClassMapping(); while (cls.getJoinablePCSuperclassMapping() != null) cls = cls.getJoinablePCSuperclassMapping(); Version base = cls.getVersion(); if (base != version && base.getStrategy() != null && name.equals(base.getStrategy().getAlias())) return null; return instantiateVersionStrategy(name, version); }
/** * Instantiate the given version's named strategy, or return null * if no named strategy. */ protected VersionStrategy namedStrategy(Version version) { String name = version.getMappingInfo().getStrategy(); if (name == null) return null; // if there is a named strategy present, discard it if it matches // the base strategy, so that we won't create an independent instance ClassMapping cls = version.getClassMapping(); while (cls.getJoinablePCSuperclassMapping() != null) cls = cls.getJoinablePCSuperclassMapping(); Version base = cls.getVersion(); if (base != version && base.getStrategy() != null && name.equals(base.getStrategy().getAlias())) return null; return instantiateVersionStrategy(name, version); }
/** * Instantiate the given version's named strategy, or return null * if no named strategy. */ protected VersionStrategy namedStrategy(Version version) { String name = version.getMappingInfo().getStrategy(); if (name == null) return null; // if there is a named strategy present, discard it if it matches // the base strategy, so that we won't create an independent instance ClassMapping cls = version.getClassMapping(); while (cls.getJoinablePCSuperclassMapping() != null) cls = cls.getJoinablePCSuperclassMapping(); Version base = cls.getVersion(); if (base != version && base.getStrategy() != null && name.equals(base.getStrategy().getAlias())) return null; return instantiateVersionStrategy(name, version); }
/** * Instantiate the given version's named strategy, or return null * if no named strategy. */ protected VersionStrategy namedStrategy(Version version) { String name = version.getMappingInfo().getStrategy(); if (name == null) return null; // if there is a named strategy present, discard it if it matches // the base strategy, so that we won't create an independent instance ClassMapping cls = version.getClassMapping(); while (cls.getJoinablePCSuperclassMapping() != null) cls = cls.getJoinablePCSuperclassMapping(); Version base = cls.getVersion(); if (base != version && base.getStrategy() != null && name.equals(base.getStrategy().getAlias())) return null; return instantiateVersionStrategy(name, version); }
/** * Update {@link MappingInfo} with our current mapping information. */ public void syncMappingInfo() { _info.syncWith(this); // setup the version field with our mapping info FieldMapping fm = _mapping.getVersionFieldMapping(); if (fm != null) { // erase explicit strategy if it is standard version strategy for // field type if (_info.getStrategy() != null && _info.getStrategy().equals(getMappingRepository(). defaultStrategy(this, fm).getAlias())) _info.setStrategy(null); fm.getMappingInfo().clear(); fm.getValueInfo().clear(); fm.getKeyMapping().getValueInfo().clear(); fm.getElementMapping().getValueInfo().clear(); fm.getValueInfo().copy(_info); _info.clear(); } }
/** * Update {@link MappingInfo} with our current mapping information. */ public void syncMappingInfo() { _info.syncWith(this); // setup the version field with our mapping info FieldMapping fm = _mapping.getVersionFieldMapping(); if (fm != null) { // erase explicit strategy if it is standard version strategy for // field type if (_info.getStrategy() != null && _info.getStrategy().equals(getMappingRepository(). defaultStrategy(this, fm).getAlias())) _info.setStrategy(null); fm.getMappingInfo().clear(); fm.getValueInfo().clear(); fm.getKeyMapping().getValueInfo().clear(); fm.getElementMapping().getValueInfo().clear(); fm.getValueInfo().copy(_info); _info.clear(); } }
/** * Update {@link MappingInfo} with our current mapping information. */ public void syncMappingInfo() { _info.syncWith(this); // setup the version field with our mapping info FieldMapping fm = _mapping.getVersionFieldMapping(); if (fm != null) { // erase explicit strategy if it is standard version strategy for // field type if (_info.getStrategy() != null && _info.getStrategy().equals(getMappingRepository(). defaultStrategy(this, fm).getAlias())) _info.setStrategy(null); fm.getMappingInfo().clear(); fm.getValueInfo().clear(); fm.getKeyMapping().getValueInfo().clear(); fm.getElementMapping().getValueInfo().clear(); fm.getValueInfo().copy(_info); _info.clear(); } }
/** * Update {@link MappingInfo} with our current mapping information. */ public void syncMappingInfo() { _info.syncWith(this); // setup the version field with our mapping info FieldMapping fm = _mapping.getVersionFieldMapping(); if (fm != null) { // erase explicit strategy if it is standard version strategy for // field type if (_info.getStrategy() != null && _info.getStrategy().equals(getMappingRepository(). defaultStrategy(this, fm).getAlias())) _info.setStrategy(null); fm.getMappingInfo().clear(); fm.getValueInfo().clear(); fm.getKeyMapping().getValueInfo().clear(); fm.getElementMapping().getValueInfo().clear(); fm.getValueInfo().copy(_info); _info.clear(); } }
/** * Update {@link MappingInfo} with our current mapping information. */ public void syncMappingInfo() { _info.syncWith(this); // setup the version field with our mapping info FieldMapping fm = _mapping.getVersionFieldMapping(); if (fm != null) { // erase explicit strategy if it is standard version strategy for // field type if (_info.getStrategy() != null && _info.getStrategy().equals(getMappingRepository(). defaultStrategy(this, fm).getAlias())) _info.setStrategy(null); fm.getMappingInfo().clear(); fm.getValueInfo().clear(); fm.getKeyMapping().getValueInfo().clear(); fm.getElementMapping().getValueInfo().clear(); fm.getValueInfo().copy(_info); _info.clear(); } }