## org.eclipse.emf.cdo.server.db
Interface IMetaDataManager

    public interface IMetaDataManager

Since:
  2.0

Method Summary
`org.eclipse.net4j.db.DBType` `getDBType(org.eclipse.emf.ecore.EClassifier eType)` Get the DB type associated with the given `EClassifier`.
`long` `getMetaID(org.eclipse.emf.ecore.EModelElement modelElement)` Returns the meta ID of the given `EModelElement`.
`org.eclipse.emf.ecore.EModelElement` `getMetaInstance(long id)` Returns the `EModelElement` referred to by the given ID.
`org.eclipse.emf.ecore.EPackage[]` `loadPackageUnit(java.sql.Connection connection, InternalCDOPackageUnit packageUnit)` Loads a package unit from the database.
`java.util.Collection<InternalCDOPackageUnit>` `readPackageUnits(java.sql.Connection connection)` Reads information about package units present in the database.
`void` `writePackageUnits(java.sql.Connection connection, InternalCDOPackageUnit[] packageUnits, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)` Write package units to the database.

Method Detail

### getMetaID

    long getMetaID(org.eclipse.emf.ecore.EModelElement modelElement)

  Returns the meta ID of the given `EModelElement`. `getMetaID(getMetaInstance(x))` yields `x`

  Parameters:
    `modelElement` - the element
  Returns:
    the corresponding ID
  Since:
    2.0

### getMetaInstance

    org.eclipse.emf.ecore.EModelElement getMetaInstance(long id)

  Returns the `EModelElement` referred to by the given ID. `getMetaInstance(getMetaID(m))` yields `m`

  Since:
    2.0

### loadPackageUnit

    org.eclipse.emf.ecore.EPackage[] loadPackageUnit(java.sql.Connection connection,
                                                     InternalCDOPackageUnit packageUnit)

  Loads a package unit from the database.

  Parameters:
    `connection` - the DB connection to read from.
    `packageUnit` - the package unit to load.
  Returns:
    the loaded package unit.
  Since:
    2.0

### readPackageUnits

    java.util.Collection<InternalCDOPackageUnit> readPackageUnits(java.sql.Connection connection)

  Reads information about package units present in the database.

  Parameters:
    `connection` - the DB connection to read from.
  Returns:
    a collection of package unit information records which can be passed to {@link IMetaDataManager#loadPackageUnit(Connection, InternalCDOPackageUnit)) in order to read the EPackage.
  Since:
    2.0

### writePackageUnits

    void writePackageUnits(java.sql.Connection connection,
                           InternalCDOPackageUnit[] packageUnits,
                           org.eclipse.net4j.util.om.monitor.OMMonitor monitor)

  Write package units to the database.

  Parameters:
    `connection` - the DB connection to write to.
    `packageUnits` - the package units to write.
    `monitor` - the monitor to indicate progress.
  Since:
    2.0

### getDBType

    org.eclipse.net4j.db.DBType getDBType(org.eclipse.emf.ecore.EClassifier eType)

  Get the DB type associated with the given `EClassifier`.

  Parameters:
    `eType` - the type to look up.
  Returns:
    the `DBType` of the given `EClassifier`.
  Since:
    2.0

Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others. All Rights Reserved.