Package ome.model.internal
Class GraphHolder
- java.lang.Object
 - 
- ome.model.internal.GraphHolder
 
 
- 
public final class GraphHolder extends java.lang.Objectholds information regarding the graph to which anIObjectbelongs.hasToken(),tokenMatches(Token), andsetToken(Token, Token)are final so that subclasses cannot intercept tokens.- Since:
 - 3.0
 
 
- 
- 
Constructor Summary
Constructors Constructor Description GraphHolder() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IObjectgetReplacement()a replacement is a managed entity instance which has the same primary key as this instance.booleanhasToken()tests if thisGraphHoldercontains aTokenreference.voidsetReplacement(IObject replacement)used mostly byome.api.IUpdate.voidsetToken(Token previousToken, Token newToken)booleantokenMatches(Token token) 
 - 
 
- 
- 
Method Detail
- 
getReplacement
public IObject getReplacement()
a replacement is a managed entity instance which has the same primary key as this instance. Storing this value here allows for several optimizations.- Returns:
 - entity
 
 
- 
setReplacement
public void setReplacement(IObject replacement)
used mostly byome.api.IUpdate. Improper use of this method may cause erratic behavior.- Parameters:
 replacement-
 
- 
hasToken
public final boolean hasToken()
tests if thisGraphHoldercontains aTokenreference. 
- 
tokenMatches
public final boolean tokenMatches(Token token)
check theTokenfor theIObjectrepresented by thisGraphHolder. This can be seen to approximate "ownership" of this Object within the JVM.- Returns:
 - true only if the two instances are identical.
 
 
- 
setToken
public final void setToken(Token previousToken, Token newToken)
set theTokenfor thisGraphHolderbut only if you posses the currentToken. The first call tosetToken(Token, Token)will succeed whentokenis null.- Parameters:
 previousToken-newToken-
 
 - 
 
 -