@Override public boolean isReadable(long txTimestamp) { if ( DEBUG_ENABLED ) { log.debugf( "Checking readability of read-write cache item [timestamp=`%s`, version=`%s`] : txTimestamp=`%s`", (Object) timestamp, version, txTimestamp ); } return txTimestamp > timestamp; }
@Override public boolean afterUpdate( SharedSessionContractImplementor session, Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock) { log.debugf( "Illegal attempt to update item cached as read-only [%s]", key ); throw new UnsupportedOperationException( "Can't write to a readonly object" ); } }
@Override public boolean update( SharedSessionContractImplementor session, Object key, Object value, Object currentVersion, Object previousVersion) { log.debugf( "Illegal attempt to update item cached as read-only [%s]", key ); throw new UnsupportedOperationException( "Can't update readonly object" ); }
public static void registerCascadeStyle(String name, BaseCascadeStyle cascadeStyle) { log.tracef( "Registering external cascade style [%s : %s]", name, cascadeStyle ); final CascadeStyle old = STYLES.put( name, cascadeStyle ); if ( old != null ) { log.debugf( "External cascade style registration [%s : %s] overrode base registration [%s]", name, cascadeStyle, old ); } }
@Override public void setBindValue(T value, Type clarifiedType) { internalSetValue( value ); this.hibernateType = clarifiedType; log.debugf( "Using explicit type [%s] as `bindType`", hibernateType, value ); }
public synchronized void registerNamedProcedureCallMemento(String name, ProcedureCallMemento memento) { final Map<String, ProcedureCallMemento> copy = CollectionHelper.makeCopy( procedureCallMementoMap ); final ProcedureCallMemento previous = copy.put( name, memento ); if ( previous != null ) { log.debugf( "registering named procedure call definition [%s] overriding previously registered definition [%s]", name, previous ); } this.procedureCallMementoMap = Collections.unmodifiableMap( copy ); }
@SuppressWarnings({"WeakerAccess", "unchecked"}) protected <S extends J> void internalAddKeySubGraph(Class<S> subType, SubGraph<S> subGraph) { log.tracef( "Adding key sub-graph : ( (%s) %s )", subType.getName(), getAttributeName() ); if ( keySubGraphMap == null ) { keySubGraphMap = new HashMap<>(); } final SubGraphImplementor<? extends J> previous = keySubGraphMap.put( subType, (SubGraphImplementor) subGraph ); if ( previous != null ) { log.debugf( "Adding key sub-graph [%s] over-wrote existing [%]", subGraph, previous ); } }
@Override public JtaPlatformResolver initiateService(Map configurationValues, ServiceRegistryImplementor registry) { final Object setting = configurationValues.get( AvailableSettings.JTA_PLATFORM_RESOLVER ); final JtaPlatformResolver resolver = registry.getService( StrategySelector.class ) .resolveStrategy( JtaPlatformResolver.class, setting ); if ( resolver == null ) { log.debugf( "No JtaPlatformResolver was specified, using default [%s]", StandardJtaPlatformResolver.class.getName() ); return StandardJtaPlatformResolver.INSTANCE; } return resolver; }
public void addDescriptor(JavaTypeDescriptor descriptor) { JavaTypeDescriptor old = descriptorsByClass.put( descriptor.getJavaType(), descriptor ); if ( old != null ) { log.debugf( "JavaTypeDescriptorRegistry entry replaced : %s -> %s (was %s)", descriptor.getJavaType(), descriptor, old ); } } }
public void deregisterTypeConfiguration(TypeConfiguration typeConfiguration) { final TypeConfiguration existing = configurationMap.remove( typeConfiguration.getUuid() ); if ( existing != typeConfiguration ) { LOG.debugf( "Different TypeConfiguration [%s] passed to #deregisterTypeConfiguration than previously registered [%s] under that UUID [%s]", typeConfiguration, existing, typeConfiguration.getUuid() ); } } }
@SuppressWarnings({"WeakerAccess", "unchecked"}) protected <S extends J> void internalAddSubGraph(Class<S> subType, SubGraphImplementor<S> subGraph) { log.tracef( "Adding sub-graph : ( (%s) %s )", subGraph.getGraphedType().getName(), getAttributeName() ); if ( subGraphMap == null ) { subGraphMap = new HashMap<>(); } final SubGraphImplementor<? extends J> previous = subGraphMap.put( subType, (SubGraphImplementor) subGraph ); if ( previous != null ) { log.debugf( "Adding sub-graph [%s] over-wrote existing [%]", subGraph, previous ); } }
@Override public void remove(SharedSessionContractImplementor session, Object key) { if ( getStorageAccess().getFromCache( key, session ) instanceof SoftLock ) { log.debugf( "Skipping #remove call in read-write access to maintain SoftLock : %s", key ); // don'tm do anything... we want the SoftLock to remain in place } else { super.remove( session, key ); } }
public Binding bind(URL url) { final String urlExternalForm = url.toExternalForm(); LOG.debugf( "Reading mapping document from URL : %s", urlExternalForm ); final Origin origin = new Origin( SourceType.URL, urlExternalForm ); return new UrlXmlSource( origin, url ).doBind( getMappingBinder() ); } }
@Override public void setBindValue(T value) { internalSetValue( value ); if ( value != null && hibernateType == null ) { hibernateType = procedureParamBindings.getProcedureCall() .getSession() .getFactory() .getTypeResolver() .heuristicType( value.getClass().getName() ); log.debugf( "Using heuristic type [%s] based on bind value [%s] as `bindType`", hibernateType, value ); } }
public CollectionLoader( QueryableCollection collectionPersister, QueryBuildingParameters buildingParameters) { super( collectionPersister, buildingParameters ); if ( log.isDebugEnabled() ) { log.debugf( "Static select for collection %s: %s", collectionPersister.getRole(), getStaticLoadQuery().getSqlStatement() ); } }
private void collectionProperty(AST path, AST name) throws SemanticException { if ( path == null ) { throw new SemanticException( "Collection function " + name.getText() + " has no path!" ); } SqlNode expr = (SqlNode) path; Type type = expr.getDataType(); LOG.debugf( "collectionProperty() : name=%s type=%s", name, type ); resolveCollectionProperty( expr ); }
private <S extends J> SubGraphImplementor<S> internalMakeSubgraph(ManagedTypeDescriptor<S> type) { assert type != null; log.debugf( "Making sub-graph : ( (%s) %s )", type.getName(), getAttributeName() ); final SubGraphImplementor<S> subGraph = type.makeSubGraph(); internalAddSubGraph( type.getJavaType(), subGraph ); return subGraph; }
public static void processIdentifierGeneratorDefinition( HbmLocalMetadataBuildingContext context, JaxbHbmIdentifierGeneratorDefinitionType identifierGenerator) { log.debugf( "Processing <identifier-generator/> : %s", identifierGenerator.getName() ); context.getMetadataCollector().addIdentifierGenerator( new IdentifierGeneratorDefinition( identifierGenerator.getName(), identifierGenerator.getClazz() ) ); } }
@Override protected void finishSubGraph() { final GraphImplementor<?> popped = graphStack.pop(); if ( PARSING_LOGGER.isDebugEnabled() ) { PARSING_LOGGER.debugf( "%s Finished graph : %s", StringHelper.repeat( "<<", attributeNodeStack.depth() + 2 ), popped.getGraphedType().getName() ); } } }
private void handleElements(FromReferenceNode collectionNode, String propertyName) { FromElement collectionFromElement = collectionNode.getFromElement(); QueryableCollection queryableCollection = collectionFromElement.getQueryableCollection(); String path = collectionNode.getPath() + "[]." + propertyName; LOG.debugf( "Creating elements for %s", path ); fromElement = collectionFromElement; if ( !collectionFromElement.isCollectionOfValuesOrComponents() ) { getWalker().addQuerySpaces( queryableCollection.getElementPersister().getQuerySpaces() ); } setDataType( queryableCollection.getElementType() ); selectColumns = collectionFromElement.toColumns( fromElement.getTableAlias(), propertyName, inSelect ); }