org.objectweb.speedo.query.lib
Class SpeedoQueryManager

java.lang.Object
  extended byorg.objectweb.speedo.query.lib.SpeedoQueryManager
All Implemented Interfaces:
org.objectweb.fractal.api.control.AttributeController, org.objectweb.fractal.api.control.BindingController, org.objectweb.perseus.cache.api.CacheEntryFactory, org.objectweb.perseus.cache.api.CacheEventListener, QueryManager, QueryManagerAttribute

public class SpeedoQueryManager
extends java.lang.Object
implements QueryManager, org.objectweb.perseus.cache.api.CacheEntryFactory, org.objectweb.perseus.cache.api.CacheEventListener, org.objectweb.fractal.api.control.BindingController, QueryManagerAttribute

SpeedoQueryManager manages the association between SpeedoQuery and the the compiled query: SpeedoCompiledQuery.

Author:
S.Chassande-Barrioz

Field Summary
static java.lang.String COMPILED_QUERY_CACHE_BINDING
           
static java.lang.String JORM_FACTORY_BINDING
           
static java.lang.String MAPPER_BINDING
           
 
Constructor Summary
SpeedoQueryManager()
          creates a new SpeedoQueryManager object.
 
Method Summary
 void bindFc(java.lang.String s, java.lang.Object o)
           
 org.objectweb.perseus.cache.api.FixableCacheEntry create(java.lang.Object id, java.lang.Object obj)
           
 void entryBound(org.objectweb.perseus.cache.api.CacheEvent event)
          An entry has been added in the cache.
 void entryUnbound(org.objectweb.perseus.cache.api.CacheEvent event)
          An entry has been evicted from the cache.
 boolean getPrefetchActivatedOnExtent()
          Indicates of the prefetching mode on extent
 boolean getPrefetchActivatedOnQuery()
          Indicates of the prefetching mode on query
 CompiledQuery getQueryCompiler(QueryDefinition qd)
          returns a CompiledQuery implementation, creates it if it does not exists, or just returns an existing one.
 java.lang.String[] listFc()
           
 java.lang.Object lookupFc(java.lang.String s)
           
 void setPrefetchActivatedOnExtent(boolean prefetch)
          Assignes of the prefetching mode on extent
 void setPrefetchActivatedOnQuery(boolean prefetch)
          Assignes of the prefetching mode on query
 void unbindFc(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAPPER_BINDING

public static final java.lang.String MAPPER_BINDING
See Also:
Constant Field Values

JORM_FACTORY_BINDING

public static final java.lang.String JORM_FACTORY_BINDING
See Also:
Constant Field Values

COMPILED_QUERY_CACHE_BINDING

public static final java.lang.String COMPILED_QUERY_CACHE_BINDING
See Also:
Constant Field Values
Constructor Detail

SpeedoQueryManager

public SpeedoQueryManager()
creates a new SpeedoQueryManager object.

Method Detail

create

public org.objectweb.perseus.cache.api.FixableCacheEntry create(java.lang.Object id,
                                                                java.lang.Object obj)
Specified by:
create in interface org.objectweb.perseus.cache.api.CacheEntryFactory

getPrefetchActivatedOnQuery

public boolean getPrefetchActivatedOnQuery()
Description copied from interface: QueryManagerAttribute
Indicates of the prefetching mode on query

Specified by:
getPrefetchActivatedOnQuery in interface QueryManagerAttribute

setPrefetchActivatedOnQuery

public void setPrefetchActivatedOnQuery(boolean prefetch)
Description copied from interface: QueryManagerAttribute
Assignes of the prefetching mode on query

Specified by:
setPrefetchActivatedOnQuery in interface QueryManagerAttribute

getPrefetchActivatedOnExtent

public boolean getPrefetchActivatedOnExtent()
Description copied from interface: QueryManagerAttribute
Indicates of the prefetching mode on extent

Specified by:
getPrefetchActivatedOnExtent in interface QueryManagerAttribute

setPrefetchActivatedOnExtent

public void setPrefetchActivatedOnExtent(boolean prefetch)
Description copied from interface: QueryManagerAttribute
Assignes of the prefetching mode on extent

Specified by:
setPrefetchActivatedOnExtent in interface QueryManagerAttribute

listFc

public java.lang.String[] listFc()
Specified by:
listFc in interface org.objectweb.fractal.api.control.BindingController

lookupFc

public java.lang.Object lookupFc(java.lang.String s)
Specified by:
lookupFc in interface org.objectweb.fractal.api.control.BindingController

bindFc

public void bindFc(java.lang.String s,
                   java.lang.Object o)
Specified by:
bindFc in interface org.objectweb.fractal.api.control.BindingController

unbindFc

public void unbindFc(java.lang.String s)
Specified by:
unbindFc in interface org.objectweb.fractal.api.control.BindingController

entryBound

public void entryBound(org.objectweb.perseus.cache.api.CacheEvent event)
An entry has been added in the cache.

Specified by:
entryBound in interface org.objectweb.perseus.cache.api.CacheEventListener
Parameters:
event - describes the added entry

entryUnbound

public void entryUnbound(org.objectweb.perseus.cache.api.CacheEvent event)
An entry has been evicted from the cache.

Specified by:
entryUnbound in interface org.objectweb.perseus.cache.api.CacheEventListener
Parameters:
event - describes the evicted entry

getQueryCompiler

public CompiledQuery getQueryCompiler(QueryDefinition qd)
returns a CompiledQuery implementation, creates it if it does not exists, or just returns an existing one.

Specified by:
getQueryCompiler in interface QueryManager
Parameters:
qd - a QueryDefinition
Returns:
a (new/existing) CompiledQuery instance.