Package org.eclipse.emf.cdo.common.model

# Schnittstelle CDOPackageUnit

Alle Superschnittstellen:
  `CDOTimeProvider`, `Comparable<CDOPackageUnit>`

Alle bekannten Unterschnittstellen:
  `InternalCDOPackageUnit`

public interface CDOPackageUnit extends Comparable<CDOPackageUnit>, CDOTimeProvider
Represents a tree structure of nested `packages` that are registered with a `package registry` and that can only be serialized as a whole.

A package unit is the granule of committing or lazy loading packages. It contains some overall information like `type`, `state`, `commit time` and nested `package info` objects that describe all the nested packages.

Seit:
  2.0
Autor:
  Eike Stepper
No Implement
  This interface is not intended to be implemented by clients.
No Extend
  This interface is not intended to be extended by clients.

## Verschachtelte Klassen - Übersicht

Verschachtelte Klassen
Modifizierer und Typ
Schnittstelle
Beschreibung
`static enum`
`CDOPackageUnit.State`
Describes the possible states a `package unit` may be in during its lifecycle.
`static enum`
`CDOPackageUnit.Type`
Describes the `instances` of `classes` of a `package unit`.

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`EPackage[]`
`getEPackages(boolean loadOnDemand)`
Returns all `packages` of the nested package tree structure described by this package unit in depth-first traversal order.
`String`
`getID()`
Returns the ID of this package unit.
`CDOPackageUnit.Type`
`getOriginalType()`
Returns the type of this package unit as it was at the time it was originally committed by a client.
`CDOPackageInfo`
`getPackageInfo(String packageURI)`
Returns the `package info` object that describes the `package` with the given namespace URI, or `null` if this package unit does not contain a package with this URI.
`CDOPackageInfo[]`
`getPackageInfos()`
Returns all `package info` objects of the nested package tree structure described by this package unit in depth-first traversal order.
`CDOPackageRegistry`
`getPackageRegistry()`
Returns the package registry this package unit is managed by.
`CDOPackageUnit.State`
`getState()`
Returns the current state of this package unit.
`long`
`getTimeStamp()`
Returns the time this package unit was originally committed.
`CDOPackageInfo`
`getTopLevelPackageInfo()`
Returns the `package info` object that describes the top level `package` of the nested package tree structure described by this package unit.
`CDOPackageUnit.Type`
`getType()`
Returns the current type of this package unit.
`boolean`
`isResource()`
Returns `true` is this package unit describes the model Eresource , `false` otherwise.
`boolean`
`isSystem()`
Returns `true` is this package unit describes one of the models Ecore, Eresource or Etypes, `false` otherwise.

### Von Schnittstelle geerbte Methoden java.lang.Comparable

`compareTo`

## Methodendetails

### getPackageRegistry

CDOPackageRegistry getPackageRegistry()
Returns the package registry this package unit is managed by.

### getID

String getID()
Returns the ID of this package unit.

Same as `getTopLevelPackageInfo()`. `CDOPackageInfo.getPackageURI()`.

### getState

CDOPackageUnit.State getState()
Returns the current state of this package unit.

### getType

CDOPackageUnit.Type getType()
Returns the current type of this package unit.

### getOriginalType

CDOPackageUnit.Type getOriginalType()
Returns the type of this package unit as it was at the time it was originally committed by a client.

### getTimeStamp

long getTimeStamp()
Returns the time this package unit was originally committed.

Angegeben von:
  `getTimeStamp` in Schnittstelle `CDOTimeProvider`

### getTopLevelPackageInfo

CDOPackageInfo getTopLevelPackageInfo()
Returns the `package info` object that describes the top level `package` of the nested package tree structure described by this package unit.

### getPackageInfo

CDOPackageInfo getPackageInfo(String packageURI)
Returns the `package info` object that describes the `package` with the given namespace URI, or `null` if this package unit does not contain a package with this URI.

### getPackageInfos

CDOPackageInfo[] getPackageInfos()
Returns all `package info` objects of the nested package tree structure described by this package unit in depth-first traversal order.

### getEPackages

EPackage[] getEPackages(boolean loadOnDemand)
Returns all `packages` of the nested package tree structure described by this package unit in depth-first traversal order.

Parameter:
  `loadOnDemand` - If `true` and this package unit is not `LOADED` the package unit is implicitely loaded. If `false` and this package unit is not `LOADED` an empty array is returned.

### isSystem

boolean isSystem()
Returns `true` is this package unit describes one of the models Ecore, Eresource or Etypes, `false` otherwise.

Note that the models Ecore, Eresource and Etypes are expected to be present as generated `NATIVE` models in all deployments.

### isResource

boolean isResource()
Returns `true` is this package unit describes the model Eresource , `false` otherwise.

Note that the model Eresource is expected to bepresent as generated `NATIVE` models in all deployments.

Seit:
  4.0