uk.ac.ic.doc.automed.wrappers
Class QueryCacheWrapperFactory

java.lang.Object
  extended by uk.ac.ic.doc.automed.wrappers.AutoMedWrapperFactory
      extended by uk.ac.ic.doc.automed.wrappers.QueryCacheWrapperFactory

public class QueryCacheWrapperFactory
extends AutoMedWrapperFactory

A high-level wrapper factory for creating QueryCacheWrapper instances. We consider a query cache as an SQL data source.

Version:
1.0
Department of Computing, Imperial College
Author:
Duc M Le dmle@doc.ic.ac.uk

Field Summary
private  Model cacheModel
           
private  Construct citem
           
 
Fields inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapperFactory
modelDef
 
Constructor Summary
QueryCacheWrapperFactory()
           
 
Method Summary
 Schema createAutoMedSchema(AutoMedWrapper wrapper, java.lang.String schemaName)
          Create a new AutoMed-oriented schema for the cache by summarising the BAV rules of all distinct schema objects used in the materialised views
 Model getAutoMedModel()
          Return the AutoMed oriented Model used to represent the Schema of the datasource.
 Model getModel()
          Return the source oriented Model used to represent the Schema of the datasource.
protected  AutoMedWrapper newAutoMedWrapper()
          Return a new instance of the QueryCacheWrapper
protected  void populateSchema(AutoMedWrapper wrapper)
          Nothing done here
 
Methods inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapperFactory
createSchema, getAttributeDomains, getModelDefinition, safeIQL, setAttributeDomains, setModelDefinition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cacheModel

private Model cacheModel

citem

private Construct citem
Constructor Detail

QueryCacheWrapperFactory

public QueryCacheWrapperFactory()
Method Detail

populateSchema

protected void populateSchema(AutoMedWrapper wrapper)
                       throws DataSourceException
Nothing done here

Specified by:
populateSchema in class AutoMedWrapperFactory
Throws:
DataSourceException

createAutoMedSchema

public Schema createAutoMedSchema(AutoMedWrapper wrapper,
                                  java.lang.String schemaName)
                           throws IntegrityException,
                                  NotFoundException
Create a new AutoMed-oriented schema for the cache by summarising the BAV rules of all distinct schema objects used in the materialised views

Specified by:
createAutoMedSchema in class AutoMedWrapperFactory
Parameters:
wrapper - A wrapper containing the source oriented Schema from which the AutoMed oriented Schema should be produced.
schemaName - name of the new AutoMed construct oriented schema that is to be created from the source oriented schema. This schema must not yet exist.
Throws:
IntegrityException - if schemaName already exists.
NotFoundException - if you have not previously wrapped the datasource as a source oriented schema, using either #AutoMedWrapper.getSchema(String) or #AutoMedWrapper.selectNewAutoMedWrapper

newAutoMedWrapper

protected AutoMedWrapper newAutoMedWrapper()
Return a new instance of the QueryCacheWrapper

Specified by:
newAutoMedWrapper in class AutoMedWrapperFactory

getModel

public Model getModel()
Return the source oriented Model used to represent the Schema of the datasource. For some wrappers, this may be the same as AutoMed oriented Model returned by getAutoMedModel()

Specified by:
getModel in class AutoMedWrapperFactory

getAutoMedModel

public Model getAutoMedModel()
Return the AutoMed oriented Model used to represent the Schema of the datasource.

Specified by:
getAutoMedModel in class AutoMedWrapperFactory