/** * Cross between {@link #collapse} and {@link #partiallyUnqualify}. Functions much like {@link #collapse} * except that only the qualifierBase is collapsed. For example, with a base of 'org.hibernate' the name * 'org.hibernate.internal.util.StringHelper' would become 'o.h.util.StringHelper'. * * @param name The (potentially) qualified name. * @param qualifierBase The qualifier base. * * @return The name itself if it does not begin with the qualifierBase, or the properly collapsed form otherwise. */ public static String collapseQualifierBase(String name, String qualifierBase) { if ( name == null || !name.startsWith( qualifierBase ) ) { return collapse( name ); } return collapseQualifier( qualifierBase, true ) + name.substring( qualifierBase.length() ); }
/** * Cross between {@link #collapse} and {@link #partiallyUnqualify}. Functions much like {@link #collapse} * except that only the qualifierBase is collapsed. For example, with a base of 'org.hibernate' the name * 'org.hibernate.internal.util.StringHelper' would become 'o.h.util.StringHelper'. * * @param name The (potentially) qualified name. * @param qualifierBase The qualifier base. * * @return The name itself if it does not begin with the qualifierBase, or the properly collapsed form otherwise. */ public static String collapseQualifierBase(String name, String qualifierBase) { if ( name == null || ! name.startsWith( qualifierBase ) ) { return collapse( name ); } return collapseQualifier( qualifierBase, true ) + name.substring( qualifierBase.length() ); }
public static String toLoggableString(NavigableRole role) { if ( role == null ) { return UNREFERENCED; } if ( role.isRoot() ) { return StringHelper.collapse( role.getFullPath() ); } else { assert role.getParent() != null; return StringHelper.collapse( role.getParent().getFullPath() ) + '.' + role.getNavigableName(); } }
/** * Cross between {@link #collapse} and {@link #partiallyUnqualify}. Functions much like {@link #collapse} * except that only the qualifierBase is collapsed. For example, with a base of 'org.hibernate' the name * 'org.hibernate.internal.util.StringHelper' would become 'o.h.util.StringHelper'. * * @param name The (potentially) qualified name. * @param qualifierBase The qualifier base. * * @return The name itself if it does not begin with the qualifierBase, or the properly collapsed form otherwise. */ public static String collapseQualifierBase(String name, String qualifierBase) { if ( name == null || !name.startsWith( qualifierBase ) ) { return collapse( name ); } return collapseQualifier( qualifierBase, true ) + name.substring( qualifierBase.length() ); }
/** * Cross between {@link #collapse} and {@link #partiallyUnqualify}. Functions much like {@link #collapse} * except that only the qualifierBase is collapsed. For example, with a base of 'org.hibernate' the name * 'org.hibernate.internal.util.StringHelper' would become 'o.h.util.StringHelper'. * * @param name The (potentially) qualified name. * @param qualifierBase The qualifier base. * * @return The name itself if it does not begin with the qualifierBase, or the properly collapsed form otherwise. */ public static String collapseQualifierBase(String name, String qualifierBase) { if ( name == null || ! name.startsWith( qualifierBase ) ) { return collapse( name ); } return collapseQualifier( qualifierBase, true ) + name.substring( qualifierBase.length() ); }
public static String toLoggableString(EntityKey entityKey) { return toLoggableString( StringHelper.collapse( entityKey.getEntityName() ), entityKey.getKeyValue() ); }
EntityLoadingLogger.INSTANCE.tracef( "(%s) Beginning Initializer#resolveKey process for entity : %s", StringHelper.collapse( this.getClass().getName() ), toLoggableString( getNavigablePath() ) ); EntityLoadingLogger.INSTANCE.debugf( "(%s) EntityKey (%s) is null", StringHelper.collapse( this.getClass().getName() ), toLoggableString( getNavigablePath() ) ); EntityLoadingLogger.INSTANCE.debugf( "(%s) Hydrated EntityKey (%s): %s", StringHelper.collapse( this.getClass().getName() ), toLoggableString( getNavigablePath() ), entityKey.getIdentifier()
@Override public void initializeInstance(RowProcessingState rowProcessingState) { if ( !responsible ) { return; } // the LHS key value of the association final CollectionKey collectionKey = resolveCollectionKey( rowProcessingState ); // the RHS key value of the association final Object keyCollectionValue = getKeyCollectionValue(); if ( keyCollectionValue != null ) { // the row contains an element in the collection... if ( CollectionLoadingLogger.DEBUG_ENABLED ) { CollectionLoadingLogger.INSTANCE.debugf( "(%s) Reading element from row for collection [%s] -> %s", StringHelper.collapse( this.getClass().getName() ), LoggingHelper.toLoggableString( getNavigablePath(), collectionKey.getKey() ), LoggingHelper.toLoggableString( collectionInstance ) ); } readCollectionRow( rowProcessingState ); } }
@Override public void resolveKey(RowProcessingState rowProcessingState) { keyContainerValue = keyTargetAssembler.assemble( rowProcessingState, rowProcessingState.getJdbcValuesSourceProcessingState().getProcessingOptions() ); if ( keyCollectionAssembler == null ) { keyCollectionValue = keyContainerValue; } else { keyCollectionValue = keyCollectionAssembler.assemble( rowProcessingState, rowProcessingState.getJdbcValuesSourceProcessingState().getProcessingOptions() ); } collectionKey = new CollectionKey( getFetchedAttribute().getPersistentCollectionDescriptor(), getKeyContainerValue() ); if ( CollectionLoadingLogger.DEBUG_ENABLED ) { CollectionLoadingLogger.INSTANCE.debugf( "(%s) Current row collection key : %s", StringHelper.collapse( this.getClass().getName() ), LoggingHelper.toLoggableString( getNavigablePath(), collectionKey.getKey() ) ); } }
CollectionLoadingLogger.INSTANCE.tracef( "(%s) Beginning Initializer#resolveInstance for collection : %s", StringHelper.collapse( this.getClass().getName() ), LoggingHelper.toLoggableString( getNavigablePath(), collectionKey.getKey() ) ); CollectionLoadingLogger.INSTANCE.debugf( "(%s) Found existing loading collection entry [%s]; using loading collection instance - %s", StringHelper.collapse( this.getClass().getName() ), LoggingHelper.toLoggableString( getNavigablePath(), collectionKey.getKey() ), LoggingHelper.toLoggableString( collectionInstance ) CollectionLoadingLogger.INSTANCE.debugf( "(%s) Collection [%s] being loaded by another initializer [%s] - skipping processing", StringHelper.collapse( this.getClass().getName() ), LoggingHelper.toLoggableString( getNavigablePath(), collectionKey.getKey() ), existingLoadingEntry.getInitializer() CollectionLoadingLogger.INSTANCE.debugf( "(%s) Found existing collection instance [%s] in Session; skipping processing - [%s]", StringHelper.collapse( this.getClass().getName() ), LoggingHelper.toLoggableString( getNavigablePath(), collectionKey.getKey() ), LoggingHelper.toLoggableString( collectionInstance ) CollectionLoadingLogger.INSTANCE.debugf( "(%s) Found existing unowned collection instance [%s] in Session; skipping processing - [%s]", StringHelper.collapse( this.getClass().getName() ), LoggingHelper.toLoggableString( getNavigablePath(), collectionKey.getKey() ), LoggingHelper.toLoggableString( collectionInstance )
EntityLoadingLogger.INSTANCE.tracef( "(%s) Beginning Initializer#resolveInstance process for entity (%s) : %s", StringHelper.collapse( this.getClass().getName() ), toLoggableString( getNavigablePath() ), entityIdentifier EntityLoadingLogger.INSTANCE.debugf( "(%s) Found existing loading entry [%s] - using loading instance", StringHelper.collapse( this.getClass().getName() ), toLoggableString( getNavigablePath(), entityIdentifier ) ); EntityLoadingLogger.INSTANCE.debugf( "(%s) Entity [%s] being loaded by another initializer [%s] - skipping processing", StringHelper.collapse( this.getClass().getName() ), toLoggableString( getNavigablePath(), entityIdentifier ), existingLoadingEntry.getEntityInitializer()