/** * 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()); }
protected void prepareMapping(ClassMetaData meta) { // make sure superclass resolved first; resolving superclass may have // resolved this mapping ClassMapping mapping = (ClassMapping) meta; ClassMapping sup = mapping.getPCSuperclassMapping(); if (sup != null && (mapping.getResolve() & MODE_MAPPING) != 0) return; // define superclass fields after mapping class, so we can tell whether // the class is mapped and needs to redefine abstract superclass fields getStrategyInstaller().installStrategy(mapping); mapping.defineSuperclassFields(mapping.getJoinablePCSuperclassMapping() == null); // resolve everything that doesn't involve relations to allow relation // mappings to use the others as joinables mapping.resolveNonRelationMappings(); }
protected void prepareMapping(ClassMetaData meta) { // make sure superclass resolved first; resolving superclass may have // resolved this mapping ClassMapping mapping = (ClassMapping) meta; ClassMapping sup = mapping.getPCSuperclassMapping(); if (sup != null && (mapping.getResolve() & MODE_MAPPING) != 0) return; // if this mapping is not for a managed interface, ensure that if // we have an inheritance hierarchy there is a default strategy // applied to the root class if (!mapping.getDescribedType().isInterface() && !mapping.isEmbeddedOnly()) { // if an inheritance strategy has not been set on this mapping // determine if needs one and if so, set it if (!hasInheritanceStrategy(mapping)) { ClassMapping baseMapping = findBaseClassMapping(mapping); if (baseMapping != null) setDefaultInheritanceStrategy(baseMapping); } } // define superclass fields after mapping class, so we can tell whether // the class is mapped and needs to redefine abstract superclass fields getStrategyInstaller().installStrategy(mapping); mapping.defineSuperclassFields(mapping.getJoinablePCSuperclassMapping() == null); // resolve everything that doesn't involve relations to allow relation // mappings to use the others as joinables mapping.resolveNonRelationMappings(); }
/** * 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()); }
protected void prepareMapping(ClassMetaData meta) { // make sure superclass resolved first; resolving superclass may have // resolved this mapping ClassMapping mapping = (ClassMapping) meta; ClassMapping sup = mapping.getPCSuperclassMapping(); if (sup != null && (mapping.getResolve() & MODE_MAPPING) != 0) return; // if this mapping is not for a managed interface, ensure that if // we have an inheritance hierarchy there is a default strategy // applied to the root class if (!mapping.getDescribedType().isInterface() && !mapping.isEmbeddedOnly()) { // if an inheritance strategy has not been set on this mapping // determine if needs one and if so, set it if (!hasInheritanceStrategy(mapping)) { ClassMapping baseMapping = findBaseClassMapping(mapping); if (baseMapping != null) setDefaultInheritanceStrategy(baseMapping); } } // define superclass fields after mapping class, so we can tell whether // the class is mapped and needs to redefine abstract superclass fields getStrategyInstaller().installStrategy(mapping); mapping.defineSuperclassFields(mapping.getJoinablePCSuperclassMapping() == null); // resolve everything that doesn't involve relations to allow relation // mappings to use the others as joinables mapping.resolveNonRelationMappings(); }
/** * 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()); }
protected void prepareMapping(ClassMetaData meta) { // make sure superclass resolved first; resolving superclass may have // resolved this mapping ClassMapping mapping = (ClassMapping) meta; ClassMapping sup = mapping.getPCSuperclassMapping(); if (sup != null && (mapping.getResolve() & MODE_MAPPING) != 0) return; // if this mapping is not for a managed interface, ensure that if // we have an inheritance hierarchy there is a default strategy // applied to the root class if (!mapping.getDescribedType().isInterface() && !mapping.isEmbeddedOnly()) { // if an inheritance strategy has not been set on this mapping // determine if needs one and if so, set it if (!hasInheritanceStrategy(mapping)) { ClassMapping baseMapping = findBaseClassMapping(mapping); if (baseMapping != null) setDefaultInheritanceStrategy(baseMapping); } } // define superclass fields after mapping class, so we can tell whether // the class is mapped and needs to redefine abstract superclass fields getStrategyInstaller().installStrategy(mapping); mapping.defineSuperclassFields(mapping.getJoinablePCSuperclassMapping() == null); // resolve everything that doesn't involve relations to allow relation // mappings to use the others as joinables mapping.resolveNonRelationMappings(); }
/** * Determine the default handler to use for the given value. Does * not take into account the named handler, if any. */ protected ValueHandler defaultHandler(ValueMapping val) { return defaultHandler(val, getStrategyInstaller().isAdapting()); }
cls.refSchemaComponents(); if (cls.getDiscriminator().getStrategy() == null) getStrategyInstaller().installStrategy (cls.getDiscriminator()); cls.getDiscriminator().refSchemaComponents(); if (cls.getVersion().getStrategy() == null) getStrategyInstaller().installStrategy(cls.getVersion()); cls.getVersion().refSchemaComponents();
/** * 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()); }
cls.refSchemaComponents(); if (cls.getDiscriminator().getStrategy() == null) getStrategyInstaller().installStrategy (cls.getDiscriminator()); cls.getDiscriminator().refSchemaComponents(); if (cls.getVersion().getStrategy() == null) getStrategyInstaller().installStrategy(cls.getVersion()); cls.getVersion().refSchemaComponents();
/** * 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()); }
protected void prepareMapping(ClassMetaData meta) { // make sure superclass resolved first; resolving superclass may have // resolved this mapping ClassMapping mapping = (ClassMapping) meta; ClassMapping sup = mapping.getPCSuperclassMapping(); if (sup != null && (mapping.getResolve() & MODE_MAPPING) != 0) return; // if this mapping is not for a managed interface, ensure that if // we have an inheritance hierarchy there is a default strategy // applied to the root class if (!mapping.getDescribedType().isInterface() && !mapping.isEmbeddedOnly()) { // if an inheritance strategy has not been set on this mapping // determine if needs one and if so, set it if (!hasInheritanceStrategy(mapping)) { ClassMapping baseMapping = findBaseClassMapping(mapping); if (baseMapping != null) setDefaultInheritanceStrategy(baseMapping); } } // define superclass fields after mapping class, so we can tell whether // the class is mapped and needs to redefine abstract superclass fields getStrategyInstaller().installStrategy(mapping); mapping.defineSuperclassFields(mapping.getJoinablePCSuperclassMapping() == null); // resolve everything that doesn't involve relations to allow relation // mappings to use the others as joinables mapping.resolveNonRelationMappings(); }
/** * Determine the default strategy to use for the given version. * Does not take into account the current strategy, if any. */ protected VersionStrategy defaultStrategy(Version version) { return defaultStrategy(version, getStrategyInstaller().isAdapting()); }
cls.refSchemaComponents(); if (cls.getDiscriminator().getStrategy() == null) getStrategyInstaller().installStrategy (cls.getDiscriminator()); cls.getDiscriminator().refSchemaComponents(); if (cls.getVersion().getStrategy() == null) getStrategyInstaller().installStrategy(cls.getVersion()); cls.getVersion().refSchemaComponents();
/** * 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()); }
cls.refSchemaComponents(); if (cls.getDiscriminator().getStrategy() == null) getStrategyInstaller().installStrategy (cls.getDiscriminator()); cls.getDiscriminator().refSchemaComponents(); if (cls.getVersion().getStrategy() == null) getStrategyInstaller().installStrategy(cls.getVersion()); cls.getVersion().refSchemaComponents();
/** * 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()); }
cls.refSchemaComponents(); if (cls.getDiscriminator().getStrategy() == null) getStrategyInstaller().installStrategy (cls.getDiscriminator()); cls.getDiscriminator().refSchemaComponents(); if (cls.getVersion().getStrategy() == null) getStrategyInstaller().installStrategy(cls.getVersion()); cls.getVersion().refSchemaComponents();
/** * 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()); }