Hibernate ORM EntityEntry - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM EntityEntry class.

This code example shows how to use the following methods: getDeletedState, getId, getLoadedState, getPersister, getStatus
					false 
			); 
		} 
		else { 
            LOG.trace("Deleting a persistent instance"); 
 
			if ( entityEntry.getStatus() == Status.DELETED || entityEntry.getStatus() == Status.GONE ) { 
                LOG.trace("Object was already deleted"); 
				return; 
			} 
			persister = entityEntry.getPersister(); 
			id = entityEntry.getId(); 
			version = entityEntry.getVersion(); 
		} 
 
		/*if ( !persister.isMutable() ) { 
			throw new HibernateException( 
					"attempted to delete an object of immutable class: " + 
					MessageHelper.infoString(persister) 
				); 

6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getId, getPersister, getStatus

6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getId, getPersister, getStatus

6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getId
		return source.getPersistenceContext().getLoadedCollectionOwnerIdOrNull( collection );
	} 
 
	protected static Serializable getOwnerIdOrNull( Object owner, EventSource source ) {
		EntityEntry ownerEntry = source.getPersistenceContext().getEntry( owner );
		return ( ownerEntry == null ? null : ownerEntry.getId() );
	} 
 
	protected static String getAffectedOwnerEntityName(CollectionPersister collectionPersister, Object affectedOwner, EventSource source ) {
 
		// collectionPersister should not be null, but we don't want to throw 
		// an exception if it is null 
		String entityName =
				( collectionPersister == null ? null : collectionPersister.getOwnerEntityPersister().getEntityName() );
		if ( affectedOwner != null ) { 
			EntityEntry ee = source.getPersistenceContext().getEntry( affectedOwner );
			if ( ee != null && ee.getEntityName() != null) {
				entityName = ee.getEntityName();
			} 
		}	 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getStatus
			if ( owner == null ) { 
				throw new AssertionFailure( 
						"collection owner not associated with session: " + 
						loadedPersister.getRole() 
				); 
			} 
			EntityEntry e = persistenceContext.getEntry(owner); 
			//only collections belonging to deleted entities are allowed to be dereferenced in the case of orphan delete 
			if ( e != null && e.getStatus() != Status.DELETED && e.getStatus() != Status.GONE ) { 
				throw new HibernateException( 
						"A collection with cascade=\"all-delete-orphan\" was no longer referenced by the owning entity instance: " + 
						loadedPersister.getRole() 
				); 
			} 
		} 
 
		// do the work 
		entry.setCurrentPersister(null); 
		entry.setCurrentKey(null); 
		prepareCollectionForUpdate( coll, entry, session.getFactory() ); 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE