/** * Check nullability of the class persister properties * * @param values entity properties * @param persister class persister * @param isUpdate whether it is intended to be updated or saved * * @throws PropertyValueException Break the nullability of one property * @throws HibernateException error while getting Component values */ public void checkNullability( final Object[] values, final EntityPersister persister, final boolean isUpdate) { checkNullability( values, persister, isUpdate ? NullabilityCheckType.UPDATE : NullabilityCheckType.CREATE ); }
/** * Nullifies any references to transient entities in the entity state * maintained by this action. References to transient entities * should be nullified when an entity is made "managed" or when this * action is executed, whichever is first. * <p/> * References will only be nullified the first time this method is * called for a this object, so it can safely be called both when * the entity is made "managed" and when this action is executed. * * @see {@link #makeEntityManaged() } */ protected final void nullifyTransientReferencesIfNotAlready() { if ( ! areTransientReferencesNullified ) { new ForeignKeys.Nullifier( getInstance(), false, isEarlyInsert(), getSession() ) .nullifyTransientReferences( getState(), getPersister().getPropertyTypes() ); new Nullability( getSession() ).checkNullability( getState(), getPersister(), false ); areTransientReferencesNullified = true; } }
new Nullability( session ).checkNullability( entityEntry.getDeletedState(), persister, Nullability.NullabilityCheckType.DELETE ); persistenceContext.getNullifiableEntityKeys().add( key );
new Nullability( session ).checkNullability( values, persister, true );
/** * Check nullability of the class entityDescriptor properties * * @param values entity properties * @param entityDescriptor class entity descriptor * @param isUpdate whether it is intended to be updated or saved * * @throws PropertyValueException Break the nullability of one property * @throws HibernateException error while getting Component values */ public void checkNullability( final Object[] values, final EntityTypeDescriptor entityDescriptor, final boolean isUpdate) { checkNullability( values, entityDescriptor, isUpdate ? NullabilityCheckType.UPDATE : NullabilityCheckType.CREATE ); }
/** * Nullifies any references to transient entities in the entity state * maintained by this action. References to transient entities * should be nullified when an entity is made "managed" or when this * action is executed, whichever is first. * <p/> * References will only be nullified the first time this method is * called for a this object, so it can safely be called both when * the entity is made "managed" and when this action is executed. * * @see {@link #makeEntityManaged() } */ protected final void nullifyTransientReferencesIfNotAlready() { if ( ! areTransientReferencesNullified ) { new ForeignKeys.Nullifier( getInstance(), false, isEarlyInsert(), getSession() ) .nullifyTransientReferences( getState(), getPersister().getPropertyTypes() ); new Nullability( getSession() ).checkNullability( getState(), getPersister(), false ); areTransientReferencesNullified = true; } }
/** * Nullifies any references to transient entities in the entity state * maintained by this action. References to transient entities * should be nullified when an entity is made "managed" or when this * action is executed, whichever is first. * <p/> * References will only be nullified the first time this method is * called for a this object, so it can safely be called both when * the entity is made "managed" and when this action is executed. * * @see #makeEntityManaged() */ @SuppressWarnings("unchecked") protected final void nullifyTransientReferencesIfNotAlready() { if ( ! areTransientReferencesNullified ) { final List<NonIdPersistentAttribute<?,?>> persistentAttributes = ( (EntityTypeDescriptor) getEntityDescriptor() ).getPersistentAttributes(); final Object[] state = getState(); new ForeignKeys.Nullifier( getInstance(), false, isEarlyInsert(), getSession() ) .nullifyTransientReferences( state, persistentAttributes ); new Nullability( getSession() ).checkNullability( state, getEntityDescriptor(), false ); areTransientReferencesNullified = true; } }
/** * Nullifies any references to transient entities in the entity state * maintained by this action. References to transient entities * should be nullified when an entity is made "managed" or when this * action is executed, whichever is first. * <p/> * References will only be nullified the first time this method is * called for a this object, so it can safely be called both when * the entity is made "managed" and when this action is executed. * * @see {@link #makeEntityManaged() } */ protected final void nullifyTransientReferencesIfNotAlready() { if ( ! areTransientReferencesNullified ) { new ForeignKeys.Nullifier( getInstance(), false, isEarlyInsert(), getSession() ) .nullifyTransientReferences( getState(), getPersister().getPropertyTypes() ); new Nullability( getSession() ).checkNullability( getState(), getPersister(), false ); areTransientReferencesNullified = true; } }
new Nullability( session ).checkNullability( entityEntry.getDeletedState(), persister, true ); persistenceContext.getNullifiableEntityKeys().add( key );
new Nullability( session ).checkNullability( entityEntry.getDeletedState(), persister, true ); persistenceContext.getNullifiableEntityKeys().add( key );
new ForeignKeys.Nullifier( entity, true, false, session ) .nullifyTransientReferences( entityEntry.getDeletedState(), attributes ); new Nullability( session ).checkNullability( entityEntry.getDeletedState(), entityDescriptor, Nullability.NullabilityCheckType.DELETE ); persistenceContext.getNullifiableEntityKeys().add( key );
new Nullability(session).checkNullability( values, persister, true );
new Nullability(session).checkNullability( values, persister, true );
new Nullability( session ).checkNullability( values, entityDescriptor, true );