/** * Parse inheritance. */ private boolean startInheritance(Attributes attrs) { String val = attrs.getValue("strategy"); if (val == null) return true; ClassMapping cm = (ClassMapping) currentElement(); ClassMappingInfo info = cm.getMappingInfo(); switch (Enum.valueOf(InheritanceType.class, val)) { case SINGLE_TABLE: info.setHierarchyStrategy(FlatClassStrategy.ALIAS); break; case JOINED: info.setHierarchyStrategy(VerticalClassStrategy.ALIAS); break; case TABLE_PER_CLASS: info.setHierarchyStrategy(FullClassStrategy.ALIAS); break; } return true; }
/** * Parse inheritance. */ private boolean startInheritance(Attributes attrs) { String val = attrs.getValue("strategy"); if (val == null) return true; ClassMapping cm = (ClassMapping) currentElement(); ClassMappingInfo info = cm.getMappingInfo(); switch (Enum.valueOf(InheritanceType.class, val)) { case SINGLE_TABLE: info.setHierarchyStrategy(FlatClassStrategy.ALIAS); break; case JOINED: info.setHierarchyStrategy(VerticalClassStrategy.ALIAS); break; case TABLE_PER_CLASS: info.setHierarchyStrategy(FullClassStrategy.ALIAS); break; } return true; }
/** * Parse inheritance. */ private boolean startInheritance(Attributes attrs) { String val = attrs.getValue("strategy"); if (val == null) return true; ClassMapping cm = (ClassMapping) currentElement(); ClassMappingInfo info = cm.getMappingInfo(); switch (Enum.valueOf(InheritanceType.class, val)) { case SINGLE_TABLE: info.setHierarchyStrategy(FlatClassStrategy.ALIAS); break; case JOINED: info.setHierarchyStrategy(VerticalClassStrategy.ALIAS); break; case TABLE_PER_CLASS: info.setHierarchyStrategy(FullClassStrategy.ALIAS); break; } return true; }
/** * Parse inheritance. */ private boolean startInheritance(Attributes attrs) { String val = attrs.getValue("strategy"); if (val == null) return true; ClassMapping cm = (ClassMapping) currentElement(); ClassMappingInfo info = cm.getMappingInfo(); switch (Enum.valueOf(InheritanceType.class, val)) { case SINGLE_TABLE: info.setHierarchyStrategy(FlatClassStrategy.ALIAS); break; case JOINED: info.setHierarchyStrategy(VerticalClassStrategy.ALIAS); break; case TABLE_PER_CLASS: info.setHierarchyStrategy(FullClassStrategy.ALIAS); break; } return true; }
/** * Parse @Inheritance. */ private void parseInheritance(ClassMapping cm, Inheritance inherit) { ClassMappingInfo info = cm.getMappingInfo(); switch (inherit.strategy()) { case SINGLE_TABLE: info.setHierarchyStrategy(FlatClassStrategy.ALIAS); break; case JOINED: info.setHierarchyStrategy(VerticalClassStrategy.ALIAS); break; case TABLE_PER_CLASS: info.setHierarchyStrategy(FullClassStrategy.ALIAS); break; default: throw new InternalException(); } }
/** * Parse @Inheritance. */ private void parseInheritance(ClassMapping cm, Inheritance inherit) { ClassMappingInfo info = cm.getMappingInfo(); switch (inherit.strategy()) { case SINGLE_TABLE: info.setHierarchyStrategy(FlatClassStrategy.ALIAS); break; case JOINED: info.setHierarchyStrategy(VerticalClassStrategy.ALIAS); break; case TABLE_PER_CLASS: info.setHierarchyStrategy(FullClassStrategy.ALIAS); break; default: throw new InternalException(); } }
/** * Parse @Inheritance. */ private void parseInheritance(ClassMapping cm, Inheritance inherit) { ClassMappingInfo info = cm.getMappingInfo(); switch (inherit.strategy()) { case SINGLE_TABLE: info.setHierarchyStrategy(FlatClassStrategy.ALIAS); break; case JOINED: info.setHierarchyStrategy(VerticalClassStrategy.ALIAS); break; case TABLE_PER_CLASS: info.setHierarchyStrategy(FullClassStrategy.ALIAS); break; default: throw new InternalException(); } }
/** * Parse @Inheritance. */ private void parseInheritance(ClassMapping cm, Inheritance inherit) { ClassMappingInfo info = cm.getMappingInfo(); switch (inherit.strategy()) { case SINGLE_TABLE: info.setHierarchyStrategy(FlatClassStrategy.ALIAS); break; case JOINED: info.setHierarchyStrategy(VerticalClassStrategy.ALIAS); break; case TABLE_PER_CLASS: info.setHierarchyStrategy(FullClassStrategy.ALIAS); break; default: throw new InternalException(); } }
/** * If an inheritance strategy has not been set on this mapping, set it * to the default (flat). This method should be called before strategies * are created for the specified mapping. */ protected void setDefaultInheritanceStrategy(ClassMapping mapping) { ClassMappingInfo info = mapping.getMappingInfo(); if (info != null && info.getHierarchyStrategy() == null) info.setHierarchyStrategy(FlatClassStrategy.ALIAS); }
/** * If an inheritance strategy has not been set on this mapping, set it * to the default (flat). This method should be called before strategies * are created for the specified mapping. */ protected void setDefaultInheritanceStrategy(ClassMapping mapping) { ClassMappingInfo info = mapping.getMappingInfo(); if (info != null && info.getHierarchyStrategy() == null) info.setHierarchyStrategy(FlatClassStrategy.ALIAS); }
/** * If an inheritance strategy has not been set on this mapping, set it * to the default (flat). This method should be called before strategies * are created for the specified mapping. */ protected void setDefaultInheritanceStrategy(ClassMapping mapping) { ClassMappingInfo info = mapping.getMappingInfo(); if (info != null && info.getHierarchyStrategy() == null) info.setHierarchyStrategy(FlatClassStrategy.ALIAS); }
/** * If an inheritance strategy has not been set on this mapping, set it * to the default (flat). This method should be called before strategies * are created for the specified mapping. */ protected void setDefaultInheritanceStrategy(ClassMapping mapping) { ClassMappingInfo info = mapping.getMappingInfo(); if (info != null && info.getHierarchyStrategy() == null) info.setHierarchyStrategy(FlatClassStrategy.ALIAS); }