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(); }
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(); }
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(); }
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(); }
/** * Setup mapping. */ private void resolveMapping() { // map strategy MappingRepository repos = getMappingRepository(); if (_strategy == null) repos.getStrategyInstaller().installStrategy(this); Log log = repos.getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("strategy", this, _strategy.getAlias())); // mark columns as mapped Column[] cols = getColumns(); ColumnIO io = getColumnIO(); for (int i = 0; i < cols.length; i++) { if (io.isInsertable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_INSERT, true); if (io.isUpdatable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_UPDATE, true); } }
/** * Setup mapping. */ private void resolveMapping() { // map strategy MappingRepository repos = getMappingRepository(); if (_strategy == null) repos.getStrategyInstaller().installStrategy(this); Log log = repos.getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("strategy", this, _strategy.getAlias())); // mark columns as mapped Column[] cols = getColumns(); ColumnIO io = getColumnIO(); for (int i = 0; i < cols.length; i++) { if (io.isInsertable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_INSERT, true); if (io.isUpdatable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_UPDATE, true); } }
/** * Setup mapping. */ private void resolveMapping() { // map strategy MappingRepository repos = getMappingRepository(); if (_strategy == null) repos.getStrategyInstaller().installStrategy(this); Log log = repos.getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("strategy", this, _strategy.getAlias())); // mark columns as mapped Column[] cols = getColumns(); ColumnIO io = getColumnIO(); for (int i = 0; i < cols.length; i++) { if (io.isInsertable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_INSERT, true); if (io.isUpdatable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_UPDATE, true); } }
/** * Setup mapping. */ private void resolveMapping() { // map strategy MappingRepository repos = getMappingRepository(); if (_strategy == null) repos.getStrategyInstaller().installStrategy(this); Log log = repos.getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("strategy", this, _strategy.getAlias())); // mark columns as mapped Column[] cols = getColumns(); ColumnIO io = getColumnIO(); for (int i = 0; i < cols.length; i++) { if (io.isInsertable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_INSERT, true); if (io.isUpdatable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_UPDATE, true); } }
/** * Setup mapping. */ private void resolveMapping() { // map strategy MappingRepository repos = getMappingRepository(); if (_strategy == null) repos.getStrategyInstaller().installStrategy(this); Log log = repos.getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("strategy", this, _strategy.getAlias())); // mark columns as mapped Column[] cols = getColumns(); ColumnIO io = getColumnIO(); for (int i = 0; i < cols.length; i++) { if (io.isInsertable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_INSERT, true); if (io.isUpdatable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_UPDATE, true); } }
/** * Setup mapping. */ private void resolveMapping() { // if there is a version field, copy mapping info from it FieldMapping fm = _mapping.getVersionFieldMapping(); if (fm != null) _info.copy(fm.getValueInfo()); // map strategy MappingRepository repos = getMappingRepository(); if (_strategy == null) repos.getStrategyInstaller().installStrategy(this); Log log = repos.getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("strategy", this, _strategy.getAlias())); // mark columns as mapped Column[] cols = getColumns(); ColumnIO io = getColumnIO(); for (int i = 0; i < cols.length; i++) { if (io.isInsertable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_INSERT, true); if (io.isUpdatable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_UPDATE, true); } }
/** * Setup mapping. */ private void resolveMapping() { // if there is a version field, copy mapping info from it FieldMapping fm = _mapping.getVersionFieldMapping(); if (fm != null) _info.copy(fm.getValueInfo()); // map strategy MappingRepository repos = getMappingRepository(); if (_strategy == null) repos.getStrategyInstaller().installStrategy(this); Log log = repos.getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("strategy", this, _strategy.getAlias())); // mark columns as mapped Column[] cols = getColumns(); ColumnIO io = getColumnIO(); for (int i = 0; i < cols.length; i++) { if (io.isInsertable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_INSERT, true); if (io.isUpdatable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_UPDATE, true); } }
/** * Setup mapping. */ private void resolveMapping() { // if there is a version field, copy mapping info from it FieldMapping fm = _mapping.getVersionFieldMapping(); if (fm != null) _info.copy(fm.getValueInfo()); // map strategy MappingRepository repos = getMappingRepository(); if (_strategy == null) repos.getStrategyInstaller().installStrategy(this); Log log = repos.getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("strategy", this, _strategy.getAlias())); // mark columns as mapped Column[] cols = getColumns(); ColumnIO io = getColumnIO(); for (int i = 0; i < cols.length; i++) { if (io.isInsertable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_INSERT, true); if (io.isUpdatable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_UPDATE, true); } }
/** * Setup mapping. */ private void resolveMapping() { // if there is a version field, copy mapping info from it FieldMapping fm = _mapping.getVersionFieldMapping(); if (fm != null) _info.copy(fm.getValueInfo()); // map strategy MappingRepository repos = getMappingRepository(); if (_strategy == null) repos.getStrategyInstaller().installStrategy(this); Log log = repos.getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("strategy", this, _strategy.getAlias())); // mark columns as mapped Column[] cols = getColumns(); ColumnIO io = getColumnIO(); for (int i = 0; i < cols.length; i++) { if (io.isInsertable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_INSERT, true); if (io.isUpdatable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_UPDATE, true); } }
/** * Setup mapping. */ private void resolveMapping() { // if there is a version field, copy mapping info from it FieldMapping fm = _mapping.getVersionFieldMapping(); if (fm != null) _info.copy(fm.getValueInfo()); // map strategy MappingRepository repos = getMappingRepository(); if (_strategy == null) repos.getStrategyInstaller().installStrategy(this); Log log = repos.getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("strategy", this, _strategy.getAlias())); // mark columns as mapped Column[] cols = getColumns(); ColumnIO io = getColumnIO(); for (int i = 0; i < cols.length; i++) { if (io.isInsertable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_INSERT, true); if (io.isUpdatable(i, false)) cols[i].setFlag(Column.FLAG_DIRECT_UPDATE, true); } }
repos.getStrategyInstaller().installStrategy(this); Log log = getRepository().getLog(); if (log.isTraceEnabled())
repos.getStrategyInstaller().installStrategy(this); Log log = getRepository().getLog(); if (log.isTraceEnabled())
repos.getStrategyInstaller().installStrategy(this); Log log = getRepository().getLog(); if (log.isTraceEnabled())
_strategy = NoneFieldStrategy.getInstance(); else repos.getStrategyInstaller().installStrategy(this);
_strategy = NoneFieldStrategy.getInstance(); else repos.getStrategyInstaller().installStrategy(this);