public void installStrategy(FieldMapping field) { FieldStrategy strategy = repos.namedStrategy(field, true); if (strategy == null) strategy = repos.defaultStrategy(field, true, true); field.setStrategy(strategy, Boolean.TRUE); }
/** * Determine the default strategy to use for the given discriminator. * Does not take into account the current strategy, if any. */ protected DiscriminatorStrategy defaultStrategy(Discriminator discrim) { return defaultStrategy(discrim, getStrategyInstaller().isAdapting()); }
public void installStrategy(Discriminator discrim) { DiscriminatorStrategy strat = repos.namedStrategy(discrim); if (strat == null) strat = repos.defaultStrategy(discrim, false); discrim.setStrategy(strat, Boolean.FALSE); } }
public void installStrategy(Version version) { VersionStrategy strat = repos.namedStrategy(version); if (strat == null) strat = repos.defaultStrategy(version, true); version.setStrategy(strat, Boolean.TRUE); }
/** * Determine the default strategy to use for the given class. Does * not take into account the current strategy, if any. */ protected ClassStrategy defaultStrategy(ClassMapping cls) { return defaultStrategy(cls, getStrategyInstaller().isAdapting()); }
public void installStrategy(FieldMapping field) { FieldStrategy strategy = repos.namedStrategy(field, true); if (strategy == null) strategy = repos.defaultStrategy(field, true, true); field.setStrategy(strategy, Boolean.TRUE); }
/** * Determine the default strategy to use for the given field. Does * not take into account the named or current strategy, if any. If a * non-null strategy is returned, this method may as a side effect install * value handlers on the field's value mappings. */ protected FieldStrategy defaultStrategy(FieldMapping field, boolean installHandlers) { return defaultStrategy(field, installHandlers, getStrategyInstaller().isAdapting()); }
/** * Determine the default strategy to use for the given class. Does * not take into account the current strategy, if any. */ protected ClassStrategy defaultStrategy(ClassMapping cls) { return defaultStrategy(cls, getStrategyInstaller().isAdapting()); }
/** * Determine the default strategy to use for the given discriminator. * Does not take into account the current strategy, if any. */ protected DiscriminatorStrategy defaultStrategy(Discriminator discrim) { return defaultStrategy(discrim, getStrategyInstaller().isAdapting()); }
public void installStrategy(Version version) { VersionStrategy strat = repos.namedStrategy(version); if (strat == null) strat = repos.defaultStrategy(version, true); version.setStrategy(strat, Boolean.TRUE); }
/** * Determine the default strategy to use for the given class. Does * not take into account the current strategy, if any. */ protected ClassStrategy defaultStrategy(ClassMapping cls) { return defaultStrategy(cls, getStrategyInstaller().isAdapting()); }
public void installStrategy(FieldMapping field) { FieldStrategy strategy = repos.namedStrategy(field, true); if (strategy == null) strategy = repos.defaultStrategy(field, true, true); field.setStrategy(strategy, Boolean.TRUE); }
public void installStrategy(Discriminator discrim) { DiscriminatorStrategy strat = repos.namedStrategy(discrim); if (strat == null) strat = repos.defaultStrategy(discrim, true); discrim.setStrategy(strat, Boolean.TRUE); } }
public void installStrategy(Version version) { VersionStrategy strat = repos.namedStrategy(version); if (strat == null) strat = repos.defaultStrategy(version, false); version.setStrategy(strat, Boolean.FALSE); }
/** * Determine the default strategy to use for the given field. Does * not take into account the named or current strategy, if any. If a * non-null strategy is returned, this method may as a side effect install * value handlers on the field's value mappings. */ protected FieldStrategy defaultStrategy(FieldMapping field, boolean installHandlers) { return defaultStrategy(field, installHandlers, getStrategyInstaller().isAdapting()); }
/** * Determine the default strategy to use for the given discriminator. * Does not take into account the current strategy, if any. */ protected DiscriminatorStrategy defaultStrategy(Discriminator discrim) { return defaultStrategy(discrim, getStrategyInstaller().isAdapting()); }
public void installStrategy(FieldMapping field) { FieldStrategy strategy = repos.namedStrategy(field, true); if (strategy == null) strategy = repos.defaultStrategy(field, true, true); field.setStrategy(strategy, Boolean.TRUE); }
public void installStrategy(ClassMapping cls) { ClassStrategy strat = repos.namedStrategy(cls); if (strat == null) strat = repos.defaultStrategy(cls, true); cls.setStrategy(strat, Boolean.TRUE); cls.setSourceMode(MetaDataModes.MODE_MAPPING, true); }
public void installStrategy(ClassMapping cls) { if ((cls.getSourceMode() & cls.MODE_MAPPING) == 0) throw new MetaDataException(_loc.get("no-mapping", cls)); ClassStrategy strat = repos.namedStrategy(cls); if (strat == null) strat = repos.defaultStrategy(cls, false); cls.setStrategy(strat, Boolean.FALSE); }
public void installStrategy(ClassMapping cls) { if ((cls.getSourceMode() & cls.MODE_MAPPING) == 0) throw new MetaDataException(_loc.get("no-mapping", cls)); ClassStrategy strat = repos.namedStrategy(cls); if (strat == null) strat = repos.defaultStrategy(cls, false); cls.setStrategy(strat, Boolean.FALSE); }