Class Context.Model

java.lang.Object
org.eclipse.emf.cdo.server.db.evolution.phased.Context.Model
Enclosing class:
Context

public static final class Context.Model extends Object
A model stored in the DB store.

Includes its ID, original type, timestamp, old and new EPackages, and whether it has changed.

Since:
4.14
Author:
Eike Stepper
No Implement
This package is currently considered provisional.
No Extend
This package is currently considered provisional.
No Reference
This package is currently considered provisional.
  • Constructor Details

    • Model

      public Model(String id, CDOPackageUnit.Type originalType, long timeStamp, EPackage oldPackage, EPackage newPackage)
      Creates a model with the given ID, original type, timestamp, old and new EPackages.
  • Method Details

    • getID

      public String getID()
      Returns the ID of this model. The ID corresponds to the nsURI of the root EPackage.
    • getOriginalType

      public CDOPackageUnit.Type getOriginalType()
      Returns the original type of this model.
    • getTimeStamp

      public long getTimeStamp()
      Returns the timestamp of this model.
    • getOldPackage

      public EPackage getOldPackage()
      Returns the old root EPackage of this model.
    • getNewPackage

      public EPackage getNewPackage()
      Returns the new root EPackage of this model, or null if the model has been removed.
    • getOldXMI

      public String getOldXMI()
      Returns the XMI serialization of the old EPackage of this model.
    • getNewXMI

      public String getNewXMI()
      Returns the XMI serialization of the new EPackage of this model, or null if the model has been removed.
    • isRemoved

      public boolean isRemoved()
      Returns whether this model has been removed.

      A model is considered removed if its new EPackage is null.

    • hashCode

      public int hashCode()
      Returns the hash code of this model based on its ID.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Returns whether this model is equal to the given object based on its ID.
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Returns a string representation of this model for logging purposes.
      Overrides:
      toString in class Object