/** * Create an instance of {@link JaxbHbmSimpleIdType } * */ public JaxbHbmSimpleIdType createJaxbHbmSimpleIdType() { return new JaxbHbmSimpleIdType(); }
@Override public List getColumnOrFormulaElements() { return idElement.getColumn(); }
@Override public String getColumnAttribute() { return idElement.getColumnAttribute(); }
super( mappingDocument ); if ( StringHelper.isEmpty( idElement.getName() ) ) { DeprecationLogger.DEPRECATION_LOGGER.logDeprecationOfNonNamedIdAttribute( container.getAttributeRoleBase().getFullPath() ); name = null; name = idElement.getName(); this.xmlNodeName = idElement.getNode(); this.accessName = idElement.getAccess();
public IdentifierSourceSimpleImpl(RootEntitySourceImpl rootEntitySource) { final JaxbHbmRootEntityType jaxbEntityMapping = rootEntitySource.jaxbEntityMapping(); this.attribute = new SingularIdentifierAttributeSourceImpl( rootEntitySource.sourceMappingDocument(), rootEntitySource, jaxbEntityMapping.getId() ); this.generatorDefinition = EntityHierarchySourceImpl.interpretGeneratorDefinition( rootEntitySource.sourceMappingDocument(), rootEntitySource.getEntityNamingSource(), rootEntitySource.jaxbEntityMapping().getId().getGenerator() ); this.unsavedValue = jaxbEntityMapping.getId().getUnsavedValue(); this.toolingHintContext = Helper.collectToolingHints( rootEntitySource.getToolingHintContext(), jaxbEntityMapping.getId() ); }
@Override public SizeSource getSizeSource() { return Helper.interpretSizeSource( idElement.getLength(), (Integer) null, null ); }
@Override public String getSourceName() { return idElement.getName(); }
super( mappingDocument ); if ( StringHelper.isEmpty( idElement.getName() ) ) { DeprecationLogger.DEPRECATION_LOGGER.logDeprecationOfNonNamedIdAttribute( container.getAttributeRoleBase().getFullPath() ); name = null; name = idElement.getName(); this.xmlNodeName = idElement.getNode(); this.accessName = idElement.getAccess();
public IdentifierSourceSimpleImpl(RootEntitySourceImpl rootEntitySource) { final JaxbHbmRootEntityType jaxbEntityMapping = rootEntitySource.jaxbEntityMapping(); this.attribute = new SingularIdentifierAttributeSourceImpl( rootEntitySource.sourceMappingDocument(), rootEntitySource, jaxbEntityMapping.getId() ); this.generatorDefinition = EntityHierarchySourceImpl.interpretGeneratorDefinition( rootEntitySource.sourceMappingDocument(), rootEntitySource.getEntityNamingSource(), rootEntitySource.jaxbEntityMapping().getId().getGenerator() ); this.unsavedValue = jaxbEntityMapping.getId().getUnsavedValue(); this.toolingHintContext = Helper.collectToolingHints( rootEntitySource.getToolingHintContext(), jaxbEntityMapping.getId() ); }
@Override public SizeSource getSizeSource() { return Helper.interpretSizeSource( idElement.getLength(), (Integer) null, null ); }
@Override public String getSourceName() { return idElement.getName(); }
private JaxbHbmHibernateMapping generateXml(boolean includeEntityMode) throws Exception { JaxbHbmHibernateMapping hm = new JaxbHbmHibernateMapping(); JaxbHbmRootEntityType clazz = new JaxbHbmRootEntityType(); JaxbHbmTuplizerType tuplizer = new JaxbHbmTuplizerType(); tuplizer.setClazz( DynamicMapEntityTuplizer.class.getCanonicalName() ); if ( includeEntityMode ) { tuplizer.setEntityMode( EntityMode.MAP ); } clazz.getTuplizer().add( tuplizer ); JaxbHbmSimpleIdType id = new JaxbHbmSimpleIdType(); clazz.setId( id ); hm.getClazz().add( clazz ); return hm; } }
@Override public String getColumnAttribute() { return idElement.getColumnAttribute(); }
@Override public List getColumnOrFormulaElements() { return idElement.getColumn(); }
@Test public void testMashallAttributeWithNullGenerationTiming() throws Exception { JaxbHbmHibernateMapping hm = new JaxbHbmHibernateMapping(); JaxbHbmRootEntityType clazz = new JaxbHbmRootEntityType(); JaxbHbmSimpleIdType id = new JaxbHbmSimpleIdType(); JaxbHbmBasicAttributeType att = new JaxbHbmBasicAttributeType(); att.setName( "attributeName" ); clazz.getAttributes().add( att ); clazz.setId( id ); hm.getClazz().add( clazz ); XmlBindingChecker.checkValidGeneration( hm ); }
/** * Create an instance of {@link JaxbHbmSimpleIdType } * */ public JaxbHbmSimpleIdType createJaxbHbmSimpleIdType() { return new JaxbHbmSimpleIdType(); }