Hibernate ORM CoreMessageLogger - 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 CoreMessageLogger class.

This code example shows how to use the following methods:recognizedObsoleteHibernateNamespace, usingOldDtd, debug, debugf
	public InputSource resolveEntity(String publicId, String systemId) { 
		InputSource source = null; // returning null triggers default behavior 
		if ( systemId != null ) { 
            LOG.debugf("Trying to resolve system-id [%s]", systemId); 
			if ( systemId.startsWith( HIBERNATE_NAMESPACE ) ) { 
                LOG.debugf("Recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/"); 
				source = resolveOnClassPath( publicId, systemId, HIBERNATE_NAMESPACE ); 
			} 
			else if ( systemId.startsWith( OLD_HIBERNATE_NAMESPACE ) ) { 
                LOG.recognizedObsoleteHibernateNamespace(OLD_HIBERNATE_NAMESPACE, HIBERNATE_NAMESPACE); 
                LOG.debugf("Attempting to resolve on classpath under org/hibernate/"); 
				source = resolveOnClassPath( publicId, systemId, OLD_HIBERNATE_NAMESPACE ); 
			} 
			else if ( systemId.startsWith( USER_NAMESPACE ) ) { 
                LOG.debugf("Recognized local namespace; attempting to resolve on classpath"); 
				String path = systemId.substring( USER_NAMESPACE.length() ); 
				InputStream stream = resolveInLocalNamespace( path ); 
                if (stream == null) LOG.debugf("Unable to locate [%s] on classpath", systemId); 
				else { 
                    LOG.debugf("Located [%s] in classpath", systemId); 

6
CodeRank
This code example shows how to use the following methods:handlingTransientEntity, debug, isTraceEnabled, trace, tracev
		EntityEntry entityEntry = persistenceContext.getEntry( entity ); 
		final EntityPersister persister; 
		final Serializable id; 
		final Object version; 
 
		if ( entityEntry == null ) { 
            LOG.trace("Entity was not persistent in delete processing"); 
 
			persister = source.getEntityPersister( event.getEntityName(), entity ); 
 
			if ( ForeignKeys.isTransient( persister.getEntityName(), entity, null, source ) ) { 
				deleteTransientEntity( source, entity, event.isCascadeDeleteEnabled(), persister, transientEntities ); 
				// EARLY EXIT!!! 
				return; 
			} 
            performDetachedEntityDeletionCheck(event); 
 
			id = persister.getIdentifier( entity, source ); 
 
			if ( id == null ) { 

6
CodeRank
This code example shows how to use the following methods:debugf, isDebugEnabled
		initFromWalker( walker ); 
 
		postInstantiate(); 
 
        LOG.debugf("Static select for collection %s: %s", collectionPersister.getRole(), getSQLString()); 
	} 
} 
5
CodeRank
This code example shows how to use the following methods:debug
This code example shows how to use the following methods:debugf, isDebugEnabled
		initFromWalker( walker ); 
 
		postInstantiate(); 
        LOG.debugf("Static select for one-to-many %s: %s", oneToManyPersister.getRole(), getSQLString()); 
	} 
} 
5
CodeRank
This code example shows how to use the following methods:isTraceEnabled, tracev
	 * @param collectionKey The collection key (differs from owner-id in the case of property-refs). 
	 * @param source The session from which the request originated. 
	 * @throws HibernateException 
	 */ 
	void removeCollection(CollectionPersister role, Serializable collectionKey, EventSource source) throws HibernateException { 
        if (LOG.isTraceEnabled()) LOG.trace("Collection dereferenced while transient " 
                                            + MessageHelper.collectionInfoString(role, ownerIdentifier, source.getFactory())); 
		source.getActionQueue().addAction( new CollectionRemoveAction( owner, role, collectionKey, false, source ) ); 
	} 
 
	/** 
	 * This version is slightly different for say 
	 * {@link org.hibernate.type.CollectionType#getKeyOfOwner} in that here we 
	 * need to assume that the owner is not yet associated with the session, 
	 * and thus we cannot rely on the owner's EntityEntry snapshot... 
	 * 
	 * @param role The persister for the collection role being processed. 
	 * @return 
	 */ 
	final Serializable extractCollectionKeyFromOwner(CollectionPersister role) { 
5
CodeRank
This code example shows how to use the following methods:unableToInstantiateUuidGenerationStrategy, unableToLocateUuidGenerationStrategy
						strategy = (UUIDGenerationStrategy) strategyClass.newInstance(); 
					} 
					catch ( Exception ignore ) { 
                        LOG.unableToInstantiateUuidGenerationStrategy(ignore); 
					} 
				} 
				catch ( ClassNotFoundException ignore ) { 
                    LOG.unableToLocateUuidGenerationStrategy(strategyClassName); 
				} 
			} 
		} 
		if ( strategy == null ) { 
			// lastly use the standard random generator 
			strategy = StandardRandomStrategy.INSTANCE; 
		} 
 
		if ( UUID.class.isAssignableFrom( type.getReturnedClass() ) ) { 
			valueTransformer = UUIDTypeDescriptor.PassThroughTransformer.INSTANCE; 
		} 
		else if ( String.class.isAssignableFrom( type.getReturnedClass() ) ) { 
5
CodeRank
This code example shows how to use the following methods:tracev
		public void injectSessionFactory(SessionFactoryImplementor factory) { 
            if (this.factory != null) { 
				LOG.scopingTypesToSessionFactoryAfterAlreadyScoped( this.factory, factory ); 
			} 
            else { 
				LOG.trace( "Scoping types to session factory " + factory ); 
			} 
			this.factory = factory; 
		} 
 
		public SessionFactoryImplementor resolveFactory() { 
			if ( factory == null ) { 
				throw new HibernateException( "SessionFactory for type scoping not yet known" ); 
			} 
			return factory; 
		} 
	} 
 
	public void injectSessionFactory(SessionFactoryImplementor factory) { 
		typeScope.injectSessionFactory( factory ); 
4
CodeRank
This code example shows how to use the following methods:warnf
This code example shows how to use the following methods:isTraceEnabled, tracev