mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-09 20:54:46 +00:00
HHH-6619 : Move org.hibernate.pretty.Printer to org.hibernate.internal.util.EntityPrinter
This commit is contained in:
parent
25acc5078e
commit
b0df669cbc
@ -41,8 +41,8 @@
|
|||||||
import org.hibernate.hql.internal.classic.ParserHelper;
|
import org.hibernate.hql.internal.classic.ParserHelper;
|
||||||
import org.hibernate.internal.CoreMessageLogger;
|
import org.hibernate.internal.CoreMessageLogger;
|
||||||
import org.hibernate.internal.FilterImpl;
|
import org.hibernate.internal.FilterImpl;
|
||||||
|
import org.hibernate.internal.util.EntityPrinter;
|
||||||
import org.hibernate.internal.util.collections.ArrayHelper;
|
import org.hibernate.internal.util.collections.ArrayHelper;
|
||||||
import org.hibernate.pretty.Printer;
|
|
||||||
import org.hibernate.transform.ResultTransformer;
|
import org.hibernate.transform.ResultTransformer;
|
||||||
import org.hibernate.type.Type;
|
import org.hibernate.type.Type;
|
||||||
|
|
||||||
@ -277,7 +277,7 @@ public void setLockOptions(LockOptions lockOptions) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void traceParameters(SessionFactoryImplementor factory) throws HibernateException {
|
public void traceParameters(SessionFactoryImplementor factory) throws HibernateException {
|
||||||
Printer print = new Printer( factory );
|
EntityPrinter print = new EntityPrinter( factory );
|
||||||
if (positionalParameterValues.length != 0) LOG.trace("Parameters: "
|
if (positionalParameterValues.length != 0) LOG.trace("Parameters: "
|
||||||
+ print.toString(positionalParameterTypes, positionalParameterValues));
|
+ print.toString(positionalParameterTypes, positionalParameterValues));
|
||||||
if (namedParameters != null) LOG.trace("Named parameters: " + print.toString(namedParameters));
|
if (namedParameters != null) LOG.trace("Named parameters: " + print.toString(namedParameters));
|
||||||
|
@ -51,10 +51,10 @@
|
|||||||
import org.hibernate.event.spi.EventSource;
|
import org.hibernate.event.spi.EventSource;
|
||||||
import org.hibernate.event.spi.FlushEntityEventListener;
|
import org.hibernate.event.spi.FlushEntityEventListener;
|
||||||
import org.hibernate.event.spi.FlushEvent;
|
import org.hibernate.event.spi.FlushEvent;
|
||||||
|
import org.hibernate.internal.util.EntityPrinter;
|
||||||
import org.hibernate.internal.util.collections.IdentityMap;
|
import org.hibernate.internal.util.collections.IdentityMap;
|
||||||
import org.hibernate.internal.util.collections.LazyIterator;
|
import org.hibernate.internal.util.collections.LazyIterator;
|
||||||
import org.hibernate.persister.entity.EntityPersister;
|
import org.hibernate.persister.entity.EntityPersister;
|
||||||
import org.hibernate.pretty.Printer;
|
|
||||||
import org.hibernate.event.service.spi.EventListenerGroup;
|
import org.hibernate.event.service.spi.EventListenerGroup;
|
||||||
import org.hibernate.event.service.spi.EventListenerRegistry;
|
import org.hibernate.event.service.spi.EventListenerRegistry;
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ protected void flushEverythingToExecutions(FlushEvent event) throws HibernateExc
|
|||||||
session.getActionQueue().numberOfCollectionRemovals(),
|
session.getActionQueue().numberOfCollectionRemovals(),
|
||||||
persistenceContext.getCollectionEntries().size()
|
persistenceContext.getCollectionEntries().size()
|
||||||
);
|
);
|
||||||
new Printer( session.getFactory() ).toString(
|
new EntityPrinter( session.getFactory() ).toString(
|
||||||
persistenceContext.getEntitiesByKey().values().iterator()
|
persistenceContext.getEntitiesByKey().values().iterator()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* Boston, MA 02110-1301 USA
|
* Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
package org.hibernate.pretty;
|
package org.hibernate.internal.util;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@ -42,9 +42,9 @@
|
|||||||
* Renders entities to a nicely readable string.
|
* Renders entities to a nicely readable string.
|
||||||
* @author Gavin King
|
* @author Gavin King
|
||||||
*/
|
*/
|
||||||
public final class Printer {
|
public final class EntityPrinter {
|
||||||
|
|
||||||
private static final CoreMessageLogger LOG = Logger.getMessageLogger(CoreMessageLogger.class, Printer.class.getName());
|
private static final CoreMessageLogger LOG = Logger.getMessageLogger(CoreMessageLogger.class, EntityPrinter.class.getName());
|
||||||
|
|
||||||
private SessionFactoryImplementor factory;
|
private SessionFactoryImplementor factory;
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ public void toString(Iterator iterator) throws HibernateException {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Printer(SessionFactoryImplementor factory) {
|
public EntityPrinter(SessionFactoryImplementor factory) {
|
||||||
this.factory = factory;
|
this.factory = factory;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user