private void beforeStatement(String statementName, int statementType) { inFunctionCall = false; level++; if ( level == 1 ) { this.statementTypeName = statementName; this.statementType = statementType; } currentStatementType = statementType; LOG.debugf("%s << begin [level=%s, statement=%s]", statementName, level, this.statementTypeName); }
public SessionFactory getSessionFactory(String uuid) { LOG.debugf( "Lookup: uid=%s", uuid ); final SessionFactory sessionFactory = sessionFactoryMap.get( uuid ); if ( sessionFactory == null && LOG.isDebugEnabled() ) { LOG.debugf( "Not found: %s", uuid ); LOG.debugf( sessionFactoryMap.toString() ); } return sessionFactory; }
private void addTypeDefinition(String registrationKey, TypeDefinition typeDefinition) { final TypeDefinition previous = typeDefinitionMap.put( registrationKey, typeDefinition ); if ( previous != null ) { log.debugf( "Duplicate typedef name [%s] now -> %s", registrationKey, typeDefinition.getTypeImplementorClass().getName() ); } }
@Override public RegionFactory initiateService(Map configurationValues, ServiceRegistryImplementor registry) { final RegionFactory regionFactory = resolveRegionFactory( configurationValues, registry ); LOG.debugf( "Cache region factory : %s", regionFactory.getClass().getName() ); return regionFactory; }
@Override public Object getObjectInstance(Object reference, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception { LOG.debugf( "JNDI lookup: %s", name ); final String uuid = (String) ( (Reference) reference ).get( 0 ).getContent(); LOG.tracef( "Resolved to UUID = %s", uuid ); return INSTANCE.getSessionFactory( uuid ); } }
/** * @deprecated (since 5.2) expected changes to "collection-valued parameter binding" in 6.0 */ @Deprecated @SuppressWarnings("unchecked") private <T> QueryParameterListBinding<T> transformQueryParameterBindingToQueryParameterListBinding(QueryParameter<T> queryParameter) { log.debugf( "Converting QueryParameterBinding to QueryParameterListBinding for given QueryParameter : %s", queryParameter ); getAndRemoveBinding( queryParameter ); return makeListBinding( queryParameter ); }
void addJoinByPathMap(String path, FromElement destination) { if ( LOG.isDebugEnabled() ) { LOG.debugf( "addJoinByPathMap() : %s -> %s", path, destination.getDisplayText() ); } fromElementsByPath.put( path, destination ); }
private static boolean areTablesToBeUpdated(ExecutableList<?> actions, @SuppressWarnings("rawtypes") Set tableSpaces) { if ( actions == null || actions.isEmpty() ) { return false; } for ( Serializable actionSpace : actions.getQuerySpaces() ) { if ( tableSpaces.contains( actionSpace ) ) { LOG.debugf( "Changes must be flushed to space: %s", actionSpace ); return true; } } return false; }
private static boolean areTablesToBeUpdated(UnresolvedEntityInsertActions actions, @SuppressWarnings("rawtypes") Set tableSpaces) { for ( Executable action : actions.getDependentEntityInsertActions() ) { final Serializable[] spaces = action.getPropertySpaces(); for ( Serializable space : spaces ) { if ( tableSpaces.contains( space ) ) { LOG.debugf( "Changes must be flushed to space: %s", space ); return true; } } } return false; }
/** * Custom serialization hook defined by Java spec. Used when the factory is directly serialized * * @param out The stream into which the object is being serialized. * * @throws IOException Can be thrown by the stream */ private void writeObject(ObjectOutputStream out) throws IOException { LOG.debugf( "Serializing: %s", getUuid() ); out.defaultWriteObject(); LOG.trace( "Serialized" ); }
public MetamodelImplementor scope(SessionFactoryImplementor sessionFactory) { log.debugf( "Scoping TypeConfiguration [%s] to SessionFactoryImpl [%s]", this, sessionFactory ); for ( Map.Entry<String, String> importEntry : scope.metadataBuildingContext.getMetadataCollector().getImports().entrySet() ) { if ( importMap.containsKey( importEntry.getKey() ) ) { continue; } importMap.put( importEntry.getKey(), importEntry.getValue() ); } scope.setSessionFactory( sessionFactory ); sessionFactory.addObserver( this ); return new MetamodelImpl( sessionFactory, this ); }
private PooledConnections( Builder builder) { log.debugf( "Initializing Connection pool with %s Connections", builder.initialSize ); connectionCreator = builder.connectionCreator; autoCommit = builder.autoCommit; maxSize = builder.maxSize; minSize = builder.minSize; log.hibernateConnectionPoolSize( maxSize, minSize ); addConnections( builder.initialSize ); }
public void setResolved() { this.resolved = true; if ( LOG.isDebugEnabled() ) { LOG.debugf( "Resolved : %s -> %s", this.getPath(), this.getText() ); } }
private void evictEntityData(NavigableRole navigableRole, EntityDataAccess cacheAccess) { if ( cacheAccess == null ) { return; } if ( LOG.isDebugEnabled() ) { LOG.debugf( "Evicting entity cache: %s", navigableRole.getFullPath() ); } cacheAccess.evictAll(); }
@Override public void reassociateProxy(Object value, Serializable id) throws MappingException { if ( value instanceof HibernateProxy ) { LOG.debugf( "Setting proxy identifier: %s", id ); final HibernateProxy proxy = (HibernateProxy) value; final LazyInitializer li = proxy.getHibernateLazyInitializer(); li.setIdentifier( id ); reassociateProxy( li, proxy ); } }
private void processLiteral(AST constant) { String replacement = (String) walker.getTokenReplacements().get( constant.getText() ); if ( replacement != null ) { if ( LOG.isDebugEnabled() ) { LOG.debugf( "processConstant() : Replacing '%s' with '%s'", constant.getText(), replacement ); } constant.setText( replacement ); } }
private void evictQueryResultRegion(QueryResultsCache cache) { if ( cache == null ) { return; } if ( LOG.isDebugEnabled() ) { LOG.debugf( "Evicting query cache, region: %s", cache.getRegion().getName() ); } cache.clear(); }
private static void bindAnyMetaDef(AnyMetaDef defAnn, MetadataBuildingContext context) { if ( isEmptyAnnotationValue( defAnn.name() ) ) { //don't map not named definitions return; } if ( LOG.isDebugEnabled() ) { LOG.debugf( "Binding Any Meta definition: %s", defAnn.name() ); } context.getMetadataCollector().addAnyMetaDef( defAnn ); }
private static void bindFilterDef(FilterDef defAnn, MetadataBuildingContext context) { Map<String, org.hibernate.type.Type> params = new HashMap<>(); for ( ParamDef param : defAnn.parameters() ) { params.put( param.name(), context.getMetadataCollector().getTypeResolver().heuristicType( param.type() ) ); } FilterDefinition def = new FilterDefinition( defAnn.name(), defAnn.defaultCondition(), params ); LOG.debugf( "Binding filter definition: %s", def.getFilterName() ); context.getMetadataCollector().addFilterDefinition( def ); }