net.sf.farrago.catalog
Class FarragoMdrReposImpl

java.lang.Object
  extended by net.sf.farrago.FarragoMetadataFactoryImpl
      extended by net.sf.farrago.catalog.FarragoReposImpl
          extended by net.sf.farrago.catalog.FarragoMdrReposImpl
All Implemented Interfaces:
FarragoRepos, FarragoMetadataFactory, FarragoAllocation, ClosableAllocation

public class FarragoMdrReposImpl
extends FarragoReposImpl

Implementation of FarragoRepos using a MDR repository.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/catalog/FarragoMdrReposImpl.java#22 $
Author:
John V. Sichi

Nested Class Summary
private  class FarragoMdrReposImpl.FactoryImpl
           
protected  class FarragoMdrReposImpl.FarragoMemFactory
           
 
Field Summary
private  String currentConfigMofId
          MofId for current instance of FemFarragoConfig.
private  FennelPackage fennelPackage
          Fennel package in repository.
private  EnkiMDRepository mdrRepository
          The underlying MDR repository.
protected  FarragoMdrReposImpl.FarragoMemFactory memFactory
           
private  FarragoModelLoader modelLoader
          The loader for the underlying MDR repository.
private static Logger tracer
           
private  FarragoPackage transientFarragoPackage
          Root package in transient repository.
 
Fields inherited from class net.sf.farrago.catalog.FarragoReposImpl
allocations
 
Constructor Summary
FarragoMdrReposImpl(FarragoAllocationOwner owner, FarragoModelLoader modelLoader, boolean userRepos)
          Opens a Farrago repository.
 
Method Summary
 void beginReposSession()
          Begins a session on the metadata repository.
 void beginReposTxn(boolean writable)
          Begins a metadata transaction on the repository.
private  void checkModelTimestamp(String extentName)
           
 void closeAllocation()
          Closes this object.
 void endReposSession()
          Ends a session on the metadata repository.
 void endReposTxn(boolean rollback)
          Ends a metadata transaction on the repository.
 FemFarragoConfig getCurrentConfig()
           
 EnkiMDRepository getEnkiMdrRepos()
          Returns an EnkiMDRepository storing this Farrago repository.
 FennelPackage getFennelPackage()
           
 MDRepository getMdrRepos()
           
 FarragoModelLoader getModelLoader()
          Returns the FarragoModelLoader for this repos.
 FarragoPackage getTransientFarragoPackage()
           
 
Methods inherited from class net.sf.farrago.catalog.FarragoReposImpl
addResourceBundles, allOfClass, allOfType, beginExclusiveAccess, endExclusiveAccess, expandProperties, getCatalog, getDefaultCharsetName, getDefaultCollationName, getDefaultConfig, getIdentifierPrecision, getLocalizedClassKey, getLocalizedClassName, getLocalizedObjectName, getLocalizedObjectName, getLocalizedObjectName, getLocalizedObjectName, getMetadataFactory, getModelGraph, getModelView, getSelfAsCatalog, getSequenceAccessor, getTag, getTagAnnotation, getTagAnnotationValue, getTagValue, initGraph, initGraphOnly, isFennelEnabled, lockRepos, newTxnContext, newTxnContext, setTagAnnotationValue, setTagValue, unlockRepos, verifyIntegrity
 
Methods inherited from class net.sf.farrago.FarragoMetadataFactoryImpl
getBehavioralPackage, getCompiledModelTimestamp, getConfigPackage, getCorePackage, getCwmPackage, getDataTypesPackage, getEnumerationsPackage, getFarragoPackage, getFemPackage, getInstancePackage, getKeysIndexesPackage, getMedPackage, getPrimitiveTypesPackage, getRelationalPackage, getRootPackage, getSecurityPackage, getSql2003Package, newCwmArgument, newCwmAttribute, newCwmBooleanExpression, newCwmCallAction, newCwmCatalog, newCwmCheckConstraint, newCwmClass, newCwmColumn, newCwmColumnSet, newCwmColumnValue, newCwmConstraint, newCwmDataType, newCwmDataValue, newCwmDependency, newCwmEnumeration, newCwmEnumerationLiteral, newCwmEvent, newCwmExpression, newCwmExtent, newCwmForeignKey, newCwmIndex, newCwmIndexedFeature, newCwmInterface, newCwmKeyRelationship, newCwmMethod, newCwmModel, newCwmMultiplicity, newCwmMultiplicityRange, newCwmNamedColumnSet, newCwmObject, newCwmOperation, newCwmPackage, newCwmParameter, newCwmPrimaryKey, newCwmProcedure, newCwmProcedureExpression, newCwmQueryColumnSet, newCwmQueryExpression, newCwmRow, newCwmRowSet, newCwmSchema, newCwmSlot, newCwmSqldistinctType, newCwmSqlindex, newCwmSqlindexColumn, newCwmSqlparameter, newCwmSqlsimpleType, newCwmSqlstructuredType, newCwmStereotype, newCwmSubsystem, newCwmTable, newCwmTaggedValue, newCwmTrigger, newCwmTypeAlias, newCwmUnion, newCwmUnionMember, newCwmUniqueConstraint, newCwmUniqueKey, newCwmView, newFemAggInvocation, newFemAggStreamDef, newFemBarrierStreamDef, newFemBeginTxnCmd, newFemBernoulliSamplingStreamDef, newFemBufferingTupleStreamDef, newFemBufferReaderStreamDef, newFemBufferWriterStreamDef, newFemCalcTupleStreamDef, newFemCartesianProductStreamDef, newFemCmdAbandonBackup, newFemCmdAlterSystemDeallocate, newFemCmdBeginTxn, newFemCmdBeginTxnWithCsn, newFemCmdCheckpoint, newFemCmdCloseDatabase, newFemCmdCommit, newFemCmdCompleteBackup, newFemCmdCreateExecutionStreamGraph, newFemCmdCreateIndex, newFemCmdCreateStreamHandle, newFemCmdDropIndex, newFemCmdGetLastCommittedTxnId, newFemCmdGetTxnCsn, newFemCmdInitiateBackup, newFemCmdOpenDatabase, newFemCmdPrepareExecutionStreamGraph, newFemCmdRestoreFromBackup, newFemCmdRollback, newFemCmdSavepoint, newFemCmdSetParam, newFemCmdTruncateIndex, newFemCmdVerifyIndex, newFemCmdVersionIndexRoot, newFemCollectTupleStreamDef, newFemColumnHistogram, newFemColumnHistogramBar, newFemColumnListRoutineParameter, newFemColumnName, newFemCorrelation, newFemCorrelationJoinStreamDef, newFemCsnHandle, newFemCsnHandleReturningCmd, newFemDatabaseParam, newFemDataServer, newFemDataWrapper, newFemDbHandle, newFemDynamicParameter, newFemDynamicParamUse, newFemElementWithStorageOptions, newFemExecStreamDataFlow, newFemFarragoConfig, newFemFennelConfig, newFemFlatFileTupleStreamDef, newFemForeignTable, newFemGenericStreamDef, newFemGrant, newFemIndexLoaderDef, newFemIndexScanDef, newFemIndexSearchDef, newFemIndexStatistics, newFemIndexWriterDef, newFemJar, newFemJavaSinkStreamDef, newFemJavaTransformStreamDef, newFemKeyComponent, newFemLabel, newFemLbmBitOpStreamDef, newFemLbmChopperStreamDef, newFemLbmGeneratorStreamDef, newFemLbmIntersectStreamDef, newFemLbmMinusStreamDef, newFemLbmNormalizerStreamDef, newFemLbmSearchStreamDef, newFemLbmSortedAggStreamDef, newFemLbmSplicerStreamDef, newFemLbmUnionStreamDef, newFemLcsClusterAppendStreamDef, newFemLcsClusterReplaceStreamDef, newFemLcsClusterScanDef, newFemLcsRowScanStreamDef, newFemLhxAggStreamDef, newFemLhxJoinStreamDef, newFemLocalCatalog, newFemLocalIndex, newFemLocalIndexColumn, newFemLocalSchema, newFemLocalTable, newFemLocalView, newFemMergeStreamDef, newFemMockTupleStreamDef, newFemMultiUseBufferingStreamDef, newFemNestedLoopJoinStreamDef, newFemPrimaryKeyConstraint, newFemRecoveryReference, newFemReshapeParameter, newFemReshapeStreamDef, newFemRole, newFemRoutine, newFemRoutineParameter, newFemRowCountStatistics, newFemSampleDataset, newFemSequenceGenerator, newFemSortedAggStreamDef, newFemSortingStreamDef, newFemSplicerIndexAccessorDef, newFemSplitterStreamDef, newFemSqlarrayType, newFemSqldistinguishedType, newFemSqlmultisetType, newFemSqlobjectType, newFemSqlpathElement, newFemSqlrowType, newFemSqltypeAttribute, newFemStorageOption, newFemStoredColumn, newFemStreamGraphHandle, newFemStreamHandle, newFemSvptHandle, newFemSystemBackup, newFemTableDeleterDef, newFemTableInserterDef, newFemTableUpdaterDef, newFemTagAnnotation, newFemTimestamp, newFemTupleAccessor, newFemTupleAttrAccessor, newFemTupleAttrDescriptor, newFemTupleAttrProjection, newFemTupleDescriptor, newFemTupleProjection, newFemTxnHandle, newFemUncollectTupleStreamDef, newFemUniqueKeyConstraint, newFemUser, newFemUserDefinedOrdering, newFemUserDefinedType, newFemValuesStreamDef, newFemViewColumn, newFemWindowDef, newFemWindowPartitionDef, newFemWindowStreamDef, setRootPackage
 
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.FarragoMetadataFactory
getBehavioralPackage, getCompiledModelTimestamp, getConfigPackage, getCorePackage, getCwmPackage, getDataTypesPackage, getEnumerationsPackage, getFarragoPackage, getFemPackage, getInstancePackage, getKeysIndexesPackage, getMedPackage, getPrimitiveTypesPackage, getRelationalPackage, getRootPackage, getSecurityPackage, getSql2003Package, newCwmArgument, newCwmAttribute, newCwmBooleanExpression, newCwmCallAction, newCwmCatalog, newCwmCheckConstraint, newCwmClass, newCwmColumn, newCwmColumnSet, newCwmColumnValue, newCwmConstraint, newCwmDataType, newCwmDataValue, newCwmDependency, newCwmEnumeration, newCwmEnumerationLiteral, newCwmEvent, newCwmExpression, newCwmExtent, newCwmForeignKey, newCwmIndex, newCwmIndexedFeature, newCwmInterface, newCwmKeyRelationship, newCwmMethod, newCwmModel, newCwmMultiplicity, newCwmMultiplicityRange, newCwmNamedColumnSet, newCwmObject, newCwmOperation, newCwmPackage, newCwmParameter, newCwmPrimaryKey, newCwmProcedure, newCwmProcedureExpression, newCwmQueryColumnSet, newCwmQueryExpression, newCwmRow, newCwmRowSet, newCwmSchema, newCwmSlot, newCwmSqldistinctType, newCwmSqlindex, newCwmSqlindexColumn, newCwmSqlparameter, newCwmSqlsimpleType, newCwmSqlstructuredType, newCwmStereotype, newCwmSubsystem, newCwmTable, newCwmTaggedValue, newCwmTrigger, newCwmTypeAlias, newCwmUnion, newCwmUnionMember, newCwmUniqueConstraint, newCwmUniqueKey, newCwmView, newFemAggInvocation, newFemAggStreamDef, newFemBarrierStreamDef, newFemBeginTxnCmd, newFemBernoulliSamplingStreamDef, newFemBufferingTupleStreamDef, newFemBufferReaderStreamDef, newFemBufferWriterStreamDef, newFemCalcTupleStreamDef, newFemCartesianProductStreamDef, newFemCmdAbandonBackup, newFemCmdAlterSystemDeallocate, newFemCmdBeginTxn, newFemCmdBeginTxnWithCsn, newFemCmdCheckpoint, newFemCmdCloseDatabase, newFemCmdCommit, newFemCmdCompleteBackup, newFemCmdCreateExecutionStreamGraph, newFemCmdCreateIndex, newFemCmdCreateStreamHandle, newFemCmdDropIndex, newFemCmdGetLastCommittedTxnId, newFemCmdGetTxnCsn, newFemCmdInitiateBackup, newFemCmdOpenDatabase, newFemCmdPrepareExecutionStreamGraph, newFemCmdRestoreFromBackup, newFemCmdRollback, newFemCmdSavepoint, newFemCmdSetParam, newFemCmdTruncateIndex, newFemCmdVerifyIndex, newFemCmdVersionIndexRoot, newFemCollectTupleStreamDef, newFemColumnHistogram, newFemColumnHistogramBar, newFemColumnListRoutineParameter, newFemColumnName, newFemCorrelation, newFemCorrelationJoinStreamDef, newFemCsnHandle, newFemCsnHandleReturningCmd, newFemDatabaseParam, newFemDataServer, newFemDataWrapper, newFemDbHandle, newFemDynamicParameter, newFemDynamicParamUse, newFemElementWithStorageOptions, newFemExecStreamDataFlow, newFemFarragoConfig, newFemFennelConfig, newFemFlatFileTupleStreamDef, newFemForeignTable, newFemGenericStreamDef, newFemGrant, newFemIndexLoaderDef, newFemIndexScanDef, newFemIndexSearchDef, newFemIndexStatistics, newFemIndexWriterDef, newFemJar, newFemJavaSinkStreamDef, newFemJavaTransformStreamDef, newFemKeyComponent, newFemLabel, newFemLbmBitOpStreamDef, newFemLbmChopperStreamDef, newFemLbmGeneratorStreamDef, newFemLbmIntersectStreamDef, newFemLbmMinusStreamDef, newFemLbmNormalizerStreamDef, newFemLbmSearchStreamDef, newFemLbmSortedAggStreamDef, newFemLbmSplicerStreamDef, newFemLbmUnionStreamDef, newFemLcsClusterAppendStreamDef, newFemLcsClusterReplaceStreamDef, newFemLcsClusterScanDef, newFemLcsRowScanStreamDef, newFemLhxAggStreamDef, newFemLhxJoinStreamDef, newFemLocalCatalog, newFemLocalIndex, newFemLocalIndexColumn, newFemLocalSchema, newFemLocalTable, newFemLocalView, newFemMergeStreamDef, newFemMockTupleStreamDef, newFemMultiUseBufferingStreamDef, newFemNestedLoopJoinStreamDef, newFemPrimaryKeyConstraint, newFemRecoveryReference, newFemReshapeParameter, newFemReshapeStreamDef, newFemRole, newFemRoutine, newFemRoutineParameter, newFemRowCountStatistics, newFemSampleDataset, newFemSequenceGenerator, newFemSortedAggStreamDef, newFemSortingStreamDef, newFemSplicerIndexAccessorDef, newFemSplitterStreamDef, newFemSqlarrayType, newFemSqldistinguishedType, newFemSqlmultisetType, newFemSqlobjectType, newFemSqlpathElement, newFemSqlrowType, newFemSqltypeAttribute, newFemStorageOption, newFemStoredColumn, newFemStreamGraphHandle, newFemStreamHandle, newFemSvptHandle, newFemSystemBackup, newFemTableDeleterDef, newFemTableInserterDef, newFemTableUpdaterDef, newFemTagAnnotation, newFemTimestamp, newFemTupleAccessor, newFemTupleAttrAccessor, newFemTupleAttrDescriptor, newFemTupleAttrProjection, newFemTupleDescriptor, newFemTupleProjection, newFemTxnHandle, newFemUncollectTupleStreamDef, newFemUniqueKeyConstraint, newFemUser, newFemUserDefinedOrdering, newFemUserDefinedType, newFemValuesStreamDef, newFemViewColumn, newFemWindowDef, newFemWindowPartitionDef, newFemWindowStreamDef, setRootPackage
 

Field Detail

tracer

private static final Logger tracer

transientFarragoPackage

private final FarragoPackage transientFarragoPackage
Root package in transient repository.


fennelPackage

private final FennelPackage fennelPackage
Fennel package in repository.


modelLoader

private FarragoModelLoader modelLoader
The loader for the underlying MDR repository.


mdrRepository

private final EnkiMDRepository mdrRepository
The underlying MDR repository.


currentConfigMofId

private final String currentConfigMofId
MofId for current instance of FemFarragoConfig.


memFactory

protected FarragoMdrReposImpl.FarragoMemFactory memFactory
Constructor Detail

FarragoMdrReposImpl

public FarragoMdrReposImpl(FarragoAllocationOwner owner,
                           FarragoModelLoader modelLoader,
                           boolean userRepos)
Opens a Farrago repository.

Method Detail

checkModelTimestamp

private void checkModelTimestamp(String extentName)

getMdrRepos

public MDRepository getMdrRepos()
Returns:
MDRepository storing this Farrago repository

getEnkiMdrRepos

public EnkiMDRepository getEnkiMdrRepos()
Description copied from interface: FarragoRepos
Returns an EnkiMDRepository storing this Farrago repository. This method returns the same instance of FarragoRepos.getMdrRepos().

Specified by:
getEnkiMdrRepos in interface FarragoRepos
Overrides:
getEnkiMdrRepos in class FarragoReposImpl
Returns:
EnkiMDRepository storing this Farrago repository

getTransientFarragoPackage

public FarragoPackage getTransientFarragoPackage()
Returns:
root package for transient metadata

getFennelPackage

public FennelPackage getFennelPackage()
Specified by:
getFennelPackage in interface FarragoMetadataFactory
Overrides:
getFennelPackage in class FarragoMetadataFactoryImpl

getCurrentConfig

public FemFarragoConfig getCurrentConfig()
Returns:
element describing the configuration parameters

closeAllocation

public void closeAllocation()
Description copied from interface: ClosableAllocation
Closes this object.


beginReposSession

public void beginReposSession()
Description copied from interface: FarragoRepos
Begins a session on the metadata repository.

Specified by:
beginReposSession in interface FarragoRepos
Overrides:
beginReposSession in class FarragoReposImpl
See Also:
FarragoRepos.newTxnContext(boolean)

beginReposTxn

public void beginReposTxn(boolean writable)
Description copied from interface: FarragoRepos
Begins a metadata transaction on the repository. In most cases, this should be done by creating and manipulating an instance of FarragoReposTxnContext instead.

Parameters:
writable - true for read/write; false for read-only

endReposTxn

public void endReposTxn(boolean rollback)
Description copied from interface: FarragoRepos
Ends a metadata transaction on the repository.

Parameters:
rollback - true to rollback; false to commit

endReposSession

public void endReposSession()
Description copied from interface: FarragoRepos
Ends a session on the metadata repository.

Specified by:
endReposSession in interface FarragoRepos
Overrides:
endReposSession in class FarragoReposImpl
See Also:
FarragoRepos.newTxnContext(boolean)

getModelLoader

public FarragoModelLoader getModelLoader()
Description copied from interface: FarragoRepos
Returns the FarragoModelLoader for this repos. May return null if not supported by implementation.

Specified by:
getModelLoader in interface FarragoRepos
Overrides:
getModelLoader in class FarragoReposImpl