Class Context.Model
java.lang.Object
org.eclipse.emf.cdo.server.db.evolution.phased.Context.Model
- Enclosing class:
Context
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 Summary
ConstructorsConstructorDescriptionModel(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 Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this model is equal to the given object based on its ID.getID()Returns the ID of this model.Returns the new root EPackage of this model, ornullif the model has been removed.Returns the XMI serialization of the new EPackage of this model, ornullif the model has been removed.Returns the old root EPackage of this model.Returns the XMI serialization of the old EPackage of this model.Returns the original type of this model.longReturns the timestamp of this model.inthashCode()Returns the hash code of this model based on its ID.booleanReturns whether this model has been removed.toString()Returns a string representation of this model for logging purposes.
-
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
Returns the ID of this model. The ID corresponds to the nsURI of the root EPackage. -
getOriginalType
Returns the original type of this model. -
getTimeStamp
public long getTimeStamp()Returns the timestamp of this model. -
getOldPackage
Returns the old root EPackage of this model. -
getNewPackage
Returns the new root EPackage of this model, ornullif the model has been removed. -
getOldXMI
Returns the XMI serialization of the old EPackage of this model. -
getNewXMI
Returns the XMI serialization of the new EPackage of this model, ornullif 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. -
equals
Returns whether this model is equal to the given object based on its ID. -
toString
Returns a string representation of this model for logging purposes.
-