net.sf.farrago.namespace.impl
Class MedAbstractLocalDataServer

java.lang.Object
  extended by net.sf.farrago.plugin.FarragoAbstractPluginBase
      extended by net.sf.farrago.namespace.impl.MedAbstractBase
          extended by net.sf.farrago.namespace.impl.MedAbstractDataServer
              extended by net.sf.farrago.namespace.impl.MedAbstractLocalDataServer
All Implemented Interfaces:
FarragoMedDataServer, FarragoMedLocalDataServer, FarragoAllocation, ClosableAllocation
Direct Known Subclasses:
MedAbstractFennelDataServer

public abstract class MedAbstractLocalDataServer
extends MedAbstractDataServer
implements FarragoMedLocalDataServer

MedAbstractLocalDataServer is an abstract base class for implementations of the FarragoMedLocalDataServer interface.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/namespace/impl/MedAbstractLocalDataServer.java#15 $
Author:
John V. Sichi

Field Summary
private  FennelDbHandle fennelDbHandle
           
 
Fields inherited from class net.sf.farrago.plugin.FarragoAbstractPluginBase
BOOLEAN_CHOICES_DEFAULT_FALSE, BOOLEAN_CHOICES_DEFAULT_TRUE, EMPTY_DRIVER_PROPERTIES
 
Fields inherited from interface net.sf.farrago.namespace.FarragoMedDataServer
PROP_SERVER_NAME, PROP_SERVER_TYPE, PROP_SERVER_VERSION
 
Constructor Summary
protected MedAbstractLocalDataServer(String serverMofId, Properties props)
           
 
Method Summary
 FennelDbHandle getFennelDbHandle()
           
 FarragoMedNameDirectory getNameDirectory()
          Gets a FarragoMedNameDirectory corresponding to this server.
 void setFennelDbHandle(FennelDbHandle fennelDbHandle)
          Sets the Fennel database handle to use for accessing local storage.
 boolean supportsAlterTableAddColumn()
          Checks whether ALTER TABLE ADD COLUMN is implemented for tables stored by this local data server.
 void validateTableDefinition(FemLocalTable table, FemLocalIndex generatedPrimaryKeyIndex)
          Validates the definition of a table being created.
 void validateTableDefinition(FemLocalTable table, FemLocalIndex generatedPrimaryKeyIndex, boolean creation)
          Validates the definition of a table being created.
 
Methods inherited from class net.sf.farrago.namespace.impl.MedAbstractDataServer
closeAllocation, getLoopbackDataSource, getProperties, getRuntimeSupport, getServerMofId, registerRelMetadataProviders, registerRules, releaseResources, setLoopbackDataSource
 
Methods inherited from class net.sf.farrago.plugin.FarragoAbstractPluginBase
getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getShortProperty, requireProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.farrago.namespace.FarragoMedLocalDataServer
computeIndexStats, constructIndexBuildPlan, createIndex, dropIndex, versionIndexRoot
 
Methods inherited from interface net.sf.farrago.namespace.FarragoMedDataServer
getRuntimeSupport, newColumnSet, registerRelMetadataProviders, registerRules, releaseResources, setLoopbackDataSource
 
Methods inherited from interface org.eigenbase.util.ClosableAllocation
closeAllocation
 

Field Detail

fennelDbHandle

private FennelDbHandle fennelDbHandle
Constructor Detail

MedAbstractLocalDataServer

protected MedAbstractLocalDataServer(String serverMofId,
                                     Properties props)
Method Detail

getFennelDbHandle

public FennelDbHandle getFennelDbHandle()
Returns:
the Fennel database handle to use for accessing local storage

getNameDirectory

public FarragoMedNameDirectory getNameDirectory()
                                         throws SQLException
Description copied from interface: FarragoMedDataServer
Gets a FarragoMedNameDirectory corresponding to this server.

Specified by:
getNameDirectory in interface FarragoMedDataServer
Overrides:
getNameDirectory in class MedAbstractDataServer
Returns:
directory, or null if this server does not have the required metadata capability
Throws:
SQLException - if directory access is unsuccessful (but not if directory access is unsupported)

setFennelDbHandle

public void setFennelDbHandle(FennelDbHandle fennelDbHandle)
Description copied from interface: FarragoMedLocalDataServer
Sets the Fennel database handle to use for accessing local storage.

Specified by:
setFennelDbHandle in interface FarragoMedLocalDataServer
Parameters:
fennelDbHandle - the handle to use

validateTableDefinition

public void validateTableDefinition(FemLocalTable table,
                                    FemLocalIndex generatedPrimaryKeyIndex)
                             throws SQLException
Description copied from interface: FarragoMedLocalDataServer
Validates the definition of a table being created. May have side-effects such as creating additional system-maintained indexes.

Specified by:
validateTableDefinition in interface FarragoMedLocalDataServer
Parameters:
table - definition of the table being created
generatedPrimaryKeyIndex - if non-null, a reference to an index generated by the system to enforce the primary key
Throws:
SQLException

validateTableDefinition

public void validateTableDefinition(FemLocalTable table,
                                    FemLocalIndex generatedPrimaryKeyIndex,
                                    boolean creation)
                             throws SQLException
Description copied from interface: FarragoMedLocalDataServer
Validates the definition of a table being created. May have side-effects such as creating additional system-maintained indexes.

Specified by:
validateTableDefinition in interface FarragoMedLocalDataServer
Parameters:
table - definition of the table being created
generatedPrimaryKeyIndex - if non-null, a reference to an index generated by the system to enforce the primary key
creation - true if the table being validated is being newly created
Throws:
SQLException

supportsAlterTableAddColumn

public boolean supportsAlterTableAddColumn()
Description copied from interface: FarragoMedLocalDataServer
Checks whether ALTER TABLE ADD COLUMN is implemented for tables stored by this local data server.

Specified by:
supportsAlterTableAddColumn in interface FarragoMedLocalDataServer
Returns:
whether ALTER TABLE ADD COLUMN can be executed