@Override public KeyValue getKey() { return getIdentifier(); }
@Override public void validate(Mapping mapping) throws MappingException { super.validate( mapping ); if ( !getIdentifier().isValid( mapping ) ) { throw new MappingException( "identifier mapping has wrong number of columns: " + getEntityName() + " type: " + getIdentifier().getType().getName() ); } checkCompositeIdentifier(); }
private void checkCompositeIdentifier() { if ( getIdentifier() instanceof Component ) { Component id = (Component) getIdentifier(); if ( !id.isDynamic() ) { final Class idClass = id.getComponentClass(); if ( idClass != null ) { final String idComponentClassName = idClass.getName(); if ( !ReflectHelper.overridesEquals( idClass ) ) { LOG.compositeIdClassDoesNotOverrideEquals( idComponentClassName ); } if ( !ReflectHelper.overridesHashCode( idClass ) ) { LOG.compositeIdClassDoesNotOverrideHashCode( idComponentClassName ); } if ( !Serializable.class.isAssignableFrom( idClass ) ) { throw new MappingException( "Composite-id class must implement Serializable: " + idComponentClassName ); } } } } }
Component identifier = (Component) rootClass.getIdentifier(); if (identifier == null) { identifier = AnnotationBinder.createComponent(
Component componentId = ( Component ) id; componentId.setKey( true ); if ( rootClass.getIdentifier() != null ) { throw new AnnotationException( componentId.getComponentClassName() + " must not have @Id properties when used as an @EmbeddedId" );
@Override public KeyValue getKey() { return getIdentifier(); }
@Override public KeyValue getKey() { return getIdentifier(); }
@Override public KeyValue getKey() { return getIdentifier(); }
public KeyValue getKey() { return getIdentifier(); }
public KeyValue getKey() { return getIdentifier(); }
Component identifier = (Component) rootClass.getIdentifier(); if (identifier == null) { identifier = AnnotationBinder.createComponent( holder, new PropertyPreloadedData(null, null, null), true, false );
private void checkCompositeIdentifier() { if ( getIdentifier() instanceof Component ) { Component id = (Component) getIdentifier(); if ( !id.isDynamic() ) { Class idClass = id.getComponentClass(); if ( idClass != null && !ReflectHelper.overridesEquals( idClass ) ) { LogFactory.getLog(RootClass.class) .warn( "composite-id class does not override equals(): " + id.getComponentClass().getName() ); } if ( !ReflectHelper.overridesHashCode( idClass ) ) { LogFactory.getLog(RootClass.class) .warn( "composite-id class does not override hashCode(): " + id.getComponentClass().getName() ); } if ( !Serializable.class.isAssignableFrom( idClass ) ) { throw new MappingException( "composite-id class must implement Serializable: " + id.getComponentClass().getName() ); } } } }
private void checkCompositeIdentifier() { if ( getIdentifier() instanceof Component ) { Component id = (Component) getIdentifier(); if ( !id.isDynamic() ) { final Class idClass = id.getComponentClass(); final String idComponendClassName = idClass.getName(); if (idClass != null && !ReflectHelper.overridesEquals(idClass)) LOG.compositeIdClassDoesNotOverrideEquals( idComponendClassName ); if (!ReflectHelper.overridesHashCode(idClass)) LOG.compositeIdClassDoesNotOverrideHashCode( idComponendClassName ); if (!Serializable.class.isAssignableFrom(idClass)) throw new MappingException( "Composite-id class must implement Serializable: " + idComponendClassName); } } }
private void checkCompositeIdentifier() { if ( getIdentifier() instanceof Component ) { Component id = (Component) getIdentifier(); if ( !id.isDynamic() ) { final Class idClass = id.getComponentClass(); final String idComponendClassName = idClass.getName(); if (idClass != null && !ReflectHelper.overridesEquals(idClass)) LOG.compositeIdClassDoesNotOverrideEquals( idComponendClassName ); if (!ReflectHelper.overridesHashCode(idClass)) LOG.compositeIdClassDoesNotOverrideHashCode( idComponendClassName ); if (!Serializable.class.isAssignableFrom(idClass)) throw new MappingException( "Composite-id class must implement Serializable: " + idComponendClassName); } } }
public void validate(Mapping mapping) throws MappingException { super.validate(mapping); if ( !getIdentifier().isValid(mapping) ) { throw new MappingException( "identifier mapping has wrong number of columns: " + getEntityName() + " type: " + getIdentifier().getType().getName() ); } }
public void validate(Mapping mapping) throws MappingException { super.validate(mapping); if ( !getIdentifier().isValid(mapping) ) { throw new MappingException( "identifier mapping has wrong number of columns: " + getEntityName() + " type: " + getIdentifier().getType().getName() ); } checkCompositeIdentifier(); }
@Override public void validate(Mapping mapping) throws MappingException { super.validate(mapping); if ( !getIdentifier().isValid(mapping) ) { throw new MappingException( "identifier mapping has wrong number of columns: " + getEntityName() + " type: " + getIdentifier().getType().getName() ); } checkCompositeIdentifier(); }
@Override public void validate(Mapping mapping) throws MappingException { super.validate(mapping); if ( !getIdentifier().isValid(mapping) ) { throw new MappingException( "identifier mapping has wrong number of columns: " + getEntityName() + " type: " + getIdentifier().getType().getName() ); } checkCompositeIdentifier(); }
Component componentId = ( Component ) id; componentId.setKey( true ); if ( rootClass.getIdentifier() != null ) { throw new AnnotationException( componentId.getComponentClassName() + " must not have @Id properties when used as an @EmbeddedId" );
Component identifier = (Component) rootClass.getIdentifier(); if (identifier == null) { identifier = AnnotationBinder.createComponent( holder, new PropertyPreloadedData(null, null, null), true, false, mappings );