@Override protected void startClassMapping(ClassMetaData meta, boolean mappedSuper, Attributes attrs) throws SAXException { if (mappedSuper) ((ClassMapping) meta).getMappingInfo().setStrategy (NoneClassStrategy.ALIAS); }
@Override protected void startClassMapping(ClassMetaData meta, boolean mappedSuper, Attributes attrs) throws SAXException { if (mappedSuper) ((ClassMapping) meta).getMappingInfo().setStrategy (NoneClassStrategy.ALIAS); }
@Override protected void startClassMapping(ClassMetaData meta, boolean mappedSuper, Attributes attrs) throws SAXException { if (mappedSuper) ((ClassMapping) meta).getMappingInfo().setStrategy (NoneClassStrategy.ALIAS); }
@Override protected void startClassMapping(ClassMetaData meta, boolean mappedSuper, Attributes attrs) throws SAXException { if (mappedSuper) ((ClassMapping) meta).getMappingInfo().setStrategy (NoneClassStrategy.ALIAS); }
@Override protected boolean startExtendedClass(String elem, Attributes attrs) throws SAXException { ClassMapping mapping = (ClassMapping) currentElement(); String strategy = attrs.getValue("strategy"); if (!StringUtils.isEmpty(strategy)) mapping.getMappingInfo().setStrategy(strategy); String versionStrat = attrs.getValue("version-strategy"); if (!StringUtils.isEmpty(versionStrat)) mapping.getVersion().getMappingInfo().setStrategy(versionStrat); String discrimStrat = attrs.getValue("discriminator-strategy"); if (!StringUtils.isEmpty(discrimStrat)) mapping.getDiscriminator().getMappingInfo().setStrategy(discrimStrat); String subclassFetchMode = attrs.getValue("subclass-fetch-mode"); if (!StringUtils.isEmpty(subclassFetchMode)) mapping.setSubclassFetchMode(toEagerFetchModeConstant(subclassFetchMode)); return true; } }
@Override protected boolean startExtendedClass(String elem, Attributes attrs) throws SAXException { ClassMapping mapping = (ClassMapping) currentElement(); String strategy = attrs.getValue("strategy"); if (!StringUtil.isEmpty(strategy)) mapping.getMappingInfo().setStrategy(strategy); String versionStrat = attrs.getValue("version-strategy"); if (!StringUtil.isEmpty(versionStrat)) mapping.getVersion().getMappingInfo().setStrategy(versionStrat); String discrimStrat = attrs.getValue("discriminator-strategy"); if (!StringUtil.isEmpty(discrimStrat)) mapping.getDiscriminator().getMappingInfo().setStrategy(discrimStrat); String subclassFetchMode = attrs.getValue("subclass-fetch-mode"); if (!StringUtil.isEmpty(subclassFetchMode)) mapping.setSubclassFetchMode(toEagerFetchModeConstant(subclassFetchMode)); return true; } }
@Override protected boolean startExtendedClass(String elem, Attributes attrs) throws SAXException { ClassMapping mapping = (ClassMapping) currentElement(); String strategy = attrs.getValue("strategy"); if (!StringUtil.isEmpty(strategy)) mapping.getMappingInfo().setStrategy(strategy); String versionStrat = attrs.getValue("version-strategy"); if (!StringUtil.isEmpty(versionStrat)) mapping.getVersion().getMappingInfo().setStrategy(versionStrat); String discrimStrat = attrs.getValue("discriminator-strategy"); if (!StringUtil.isEmpty(discrimStrat)) mapping.getDiscriminator().getMappingInfo().setStrategy(discrimStrat); String subclassFetchMode = attrs.getValue("subclass-fetch-mode"); if (!StringUtil.isEmpty(subclassFetchMode)) mapping.setSubclassFetchMode(toEagerFetchModeConstant(subclassFetchMode)); return true; } }
/** * Synchronize internal information with the mapping data for the given * class. */ public void syncWith(ClassMapping cls) { clear(false); ClassMapping sup = cls.getMappedPCSuperclassMapping(); if (cls.getTable() != null && (sup == null || sup.getTable() != cls.getTable())) _tableName = cls.getMappingRepository().getDBDictionary(). getFullIdentifier(cls.getTable(), true); // set io before syncing cols setColumnIO(cls.getColumnIO()); if (cls.getJoinForeignKey() != null && sup != null && sup.getTable() != null) syncForeignKey(cls, cls.getJoinForeignKey(), cls.getTable(), sup.getTable()); else if (cls.getIdentityType() == ClassMapping.ID_DATASTORE) syncColumns(cls, cls.getPrimaryKeyColumns(), false); // record inheritance strategy if class does not use default strategy // for base classes, and for all subclasses so we can be sure subsequent // mapping runs don't think subclass is unmapped String strat = (cls.getStrategy() == null) ? null : cls.getStrategy().getAlias(); if (strat != null && (cls.getPCSuperclass() != null || !FullClassStrategy.ALIAS.equals(strat))) setStrategy(strat); }
/** * Synchronize internal information with the mapping data for the given * class. */ public void syncWith(ClassMapping cls) { clear(false); ClassMapping sup = cls.getMappedPCSuperclassMapping(); if (cls.getTable() != null && (sup == null || sup.getTable() != cls.getTable())) _tableName = cls.getMappingRepository().getDBDictionary(). getFullIdentifier(cls.getTable(), true); // set io before syncing cols setColumnIO(cls.getColumnIO()); if (cls.getJoinForeignKey() != null && sup != null && sup.getTable() != null) syncForeignKey(cls, cls.getJoinForeignKey(), cls.getTable(), sup.getTable()); else if (cls.getIdentityType() == ClassMapping.ID_DATASTORE) syncColumns(cls, cls.getPrimaryKeyColumns(), false); // record inheritance strategy if class does not use default strategy // for base classes, and for all subclasses so we can be sure subsequent // mapping runs don't think subclass is unmapped String strat = (cls.getStrategy() == null) ? null : cls.getStrategy().getAlias(); if (strat != null && (cls.getPCSuperclass() != null || !FullClassStrategy.ALIAS.equals(strat))) setStrategy(strat); }
/** * Synchronize internal information with the mapping data for the given * class. */ public void syncWith(ClassMapping cls) { clear(false); ClassMapping sup = cls.getMappedPCSuperclassMapping(); if (cls.getTable() != null && (sup == null || sup.getTable() != cls.getTable())) _tableName = cls.getMappingRepository().getDBDictionary(). getFullName(cls.getTable(), true); // set io before syncing cols setColumnIO(cls.getColumnIO()); if (cls.getJoinForeignKey() != null && sup != null && sup.getTable() != null) syncForeignKey(cls, cls.getJoinForeignKey(), cls.getTable(), sup.getTable()); else if (cls.getIdentityType() == ClassMapping.ID_DATASTORE) syncColumns(cls, cls.getPrimaryKeyColumns(), false); // record inheritance strategy if class does not use default strategy // for base classes, and for all subclasses so we can be sure subsequent // mapping runs don't think subclass is unmapped String strat = (cls.getStrategy() == null) ? null : cls.getStrategy().getAlias(); if (strat != null && (cls.getPCSuperclass() != null || !FullClassStrategy.ALIAS.equals(strat))) setStrategy(strat); }
/** * Synchronize internal information with the mapping data for the given * class. */ public void syncWith(ClassMapping cls) { clear(false); ClassMapping sup = cls.getMappedPCSuperclassMapping(); if (cls.getTable() != null && (sup == null || sup.getTable() != cls.getTable())) _tableName = cls.getMappingRepository().getDBDictionary(). getFullIdentifier(cls.getTable(), true); // set io before syncing cols setColumnIO(cls.getColumnIO()); if (cls.getJoinForeignKey() != null && sup != null && sup.getTable() != null) syncForeignKey(cls, cls.getJoinForeignKey(), cls.getTable(), sup.getTable()); else if (cls.getIdentityType() == ClassMapping.ID_DATASTORE) syncColumns(cls, cls.getPrimaryKeyColumns(), false); // record inheritance strategy if class does not use default strategy // for base classes, and for all subclasses so we can be sure subsequent // mapping runs don't think subclass is unmapped String strat = (cls.getStrategy() == null) ? null : cls.getStrategy().getAlias(); if (strat != null && (cls.getPCSuperclass() != null || !FullClassStrategy.ALIAS.equals(strat))) setStrategy(strat); }
/** * Synchronize internal information with the mapping data for the given * class. */ public void syncWith(ClassMapping cls) { clear(false); ClassMapping sup = cls.getMappedPCSuperclassMapping(); if (cls.getTable() != null && (sup == null || sup.getTable() != cls.getTable())) _tableName = cls.getMappingRepository().getDBDictionary(). getFullIdentifier(cls.getTable(), true); // set io before syncing cols setColumnIO(cls.getColumnIO()); if (cls.getJoinForeignKey() != null && sup != null && sup.getTable() != null) syncForeignKey(cls, cls.getJoinForeignKey(), cls.getTable(), sup.getTable()); else if (cls.getIdentityType() == ClassMapping.ID_DATASTORE) syncColumns(cls, cls.getPrimaryKeyColumns(), false); // record inheritance strategy if class does not use default strategy // for base classes, and for all subclasses so we can be sure subsequent // mapping runs don't think subclass is unmapped String strat = (cls.getStrategy() == null) ? null : cls.getStrategy().getAlias(); if (strat != null && (cls.getPCSuperclass() != null || !FullClassStrategy.ALIAS.equals(strat))) setStrategy(strat); }
break; case STRAT: cm.getMappingInfo().setStrategy(((Strategy) anno).value()); break; case SUBCLASS_FETCH_MODE:
break; case STRAT: cm.getMappingInfo().setStrategy(((Strategy) anno).value()); break; case SUBCLASS_FETCH_MODE:
break; case STRAT: cm.getMappingInfo().setStrategy(((Strategy) anno).value()); break; case SUBCLASS_FETCH_MODE:
break; case STRAT: cm.getMappingInfo().setStrategy(((Strategy) anno).value()); break; case SUBCLASS_FETCH_MODE: