Package ome.model.internal
Class GraphHolder
- java.lang.Object
-
- ome.model.internal.GraphHolder
-
public final class GraphHolder extends java.lang.Object
holds information regarding the graph to which anIObject
belongs.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 IObject
getReplacement()
a replacement is a managed entity instance which has the same primary key as this instance.boolean
hasToken()
tests if thisGraphHolder
contains aToken
reference.void
setReplacement(IObject replacement)
used mostly byome.api.IUpdate
.void
setToken(Token previousToken, Token newToken)
boolean
tokenMatches(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 thisGraphHolder
contains aToken
reference.
-
tokenMatches
public final boolean tokenMatches(Token token)
check theToken
for theIObject
represented 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 theToken
for thisGraphHolder
but only if you posses the currentToken
. The first call tosetToken(Token, Token)
will succeed whentoken
is null.- Parameters:
previousToken
-newToken
-
-
-