Drools :: Core 6.0.0.Beta5

org.drools.core.common
Class DefaultFactHandle

java.lang.Object
  extended by org.drools.core.util.AbstractBaseLinkedListNode<DefaultFactHandle>
      extended by org.drools.core.common.DefaultFactHandle
All Implemented Interfaces:
Cloneable, InternalFactHandle, Entry<DefaultFactHandle>, LinkedListNode<DefaultFactHandle>, org.kie.api.runtime.rule.FactHandle
Direct Known Subclasses:
EventFactHandle, TraitFactHandle

public class DefaultFactHandle
extends AbstractBaseLinkedListNode<DefaultFactHandle>
implements InternalFactHandle

Implementation of FactHandle.


Constructor Summary
DefaultFactHandle()
           
DefaultFactHandle(int id, int identityHashCode, Object object, long recency, org.kie.api.runtime.rule.SessionEntryPoint wmEntryPoint)
           
DefaultFactHandle(int id, Object object)
           
DefaultFactHandle(int id, Object object, long recency, org.kie.api.runtime.rule.SessionEntryPoint wmEntryPoint)
          Construct.
DefaultFactHandle(int id, String wmEntryPointId, int identityHashCode, int objectHashCode, long recency, Object object)
           
DefaultFactHandle(String externalFormat)
           
 
Method Summary
 void addFirstLeftTuple(LeftTuple leftTuple)
           
 void addFirstRightTuple(RightTuple rightTuple)
           
 void addLastLeftTuple(LeftTuple leftTuple)
           
 void addLastRightTuple(RightTuple rightTuple)
           
 void addLeftTupleInPosition(LeftTuple leftTuple)
           
 void addRightTupleInPosition(RightTuple rightTuple)
           
 void clearLeftTuples()
           
 void clearRightTuples()
           
 DefaultFactHandle clone()
           
static int determineIdentityHashCode(Object object)
           
 void disconnect()
           
 boolean equals(Object object)
           
 org.kie.api.runtime.rule.SessionEntryPoint getEntryPoint()
           
 EqualityKey getEqualityKey()
           
 String getExternalForm()
           
 LeftTuple getFirstLeftTuple()
           
 RightTuple getFirstRightTuple()
           
 int getId()
           
 int getIdentityHashCode()
           
 LeftTuple getLastLeftTuple()
           
 RightTuple getLastRightTuple()
           
 Object getObject()
           
 int getObjectHashCode()
           
 long getRecency()
           
 int hashCode()
           
 void invalidate()
           
 boolean isDisconnected()
           
 boolean isEvent()
          Always returns false, since the DefaultFactHandle is only used for regular Facts, and not for Events
 boolean isTrait()
           
 boolean isValid()
           
 DefaultFactHandle quickClone()
           
 void quickCloneUpdate(DefaultFactHandle clone)
           
 void removeLeftTuple(LeftTuple leftTuple)
           
 void removeRightTuple(RightTuple rightTuple)
           
 void setEntryPoint(org.kie.api.runtime.rule.SessionEntryPoint sourceNode)
           
 void setEqualityKey(EqualityKey key)
           
 void setExternalForm(String externalForm)
           
 void setFirstLeftTuple(LeftTuple firstLeftTuple)
           
protected  void setFirstRightTuple(RightTuple firstRightTuple)
           
 void setLastLeftTuple(LeftTuple lastLeftTuple)
           
protected  void setLastRightTuple(RightTuple lastRightTuple)
           
 void setObject(Object object)
           
protected  void setObjectHashCode(int hashCode)
           
 void setRecency(long recency)
           
 String toExternalForm()
          format_version:id:identity:hashcode:recency
 String toString()
           
 String toTupleTree(int indent)
           
 
Methods inherited from class org.drools.core.util.AbstractBaseLinkedListNode
getNext, getPrevious, setNext, setPrevious
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultFactHandle

public DefaultFactHandle()

DefaultFactHandle

public DefaultFactHandle(int id,
                         Object object)

DefaultFactHandle

public DefaultFactHandle(int id,
                         Object object,
                         long recency,
                         org.kie.api.runtime.rule.SessionEntryPoint wmEntryPoint)
Construct.

Parameters:
id - Handle id.

DefaultFactHandle

public DefaultFactHandle(int id,
                         int identityHashCode,
                         Object object,
                         long recency,
                         org.kie.api.runtime.rule.SessionEntryPoint wmEntryPoint)

DefaultFactHandle

public DefaultFactHandle(int id,
                         String wmEntryPointId,
                         int identityHashCode,
                         int objectHashCode,
                         long recency,
                         Object object)

DefaultFactHandle

public DefaultFactHandle(String externalFormat)
Method Detail

equals

public boolean equals(Object object)
Overrides:
equals in class Object
See Also:
Object

disconnect

public void disconnect()
Specified by:
disconnect in interface InternalFactHandle

isDisconnected

public boolean isDisconnected()
Specified by:
isDisconnected in interface InternalFactHandle

getObjectHashCode

public int getObjectHashCode()
Specified by:
getObjectHashCode in interface InternalFactHandle

getIdentityHashCode

public int getIdentityHashCode()
Specified by:
getIdentityHashCode in interface InternalFactHandle

determineIdentityHashCode

public static int determineIdentityHashCode(Object object)

setObjectHashCode

protected void setObjectHashCode(int hashCode)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object

toExternalForm

public String toExternalForm()
format_version:id:identity:hashcode:recency

Specified by:
toExternalForm in interface InternalFactHandle
Specified by:
toExternalForm in interface org.kie.api.runtime.rule.FactHandle
See Also:
FactHandle

getExternalForm

public String getExternalForm()

setExternalForm

public void setExternalForm(String externalForm)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object

getRecency

public long getRecency()
Specified by:
getRecency in interface InternalFactHandle

setRecency

public void setRecency(long recency)
Specified by:
setRecency in interface InternalFactHandle

getId

public int getId()
Specified by:
getId in interface InternalFactHandle

invalidate

public void invalidate()
Specified by:
invalidate in interface InternalFactHandle

isValid

public boolean isValid()
Specified by:
isValid in interface InternalFactHandle

getObject

public Object getObject()
Specified by:
getObject in interface InternalFactHandle

setObject

public void setObject(Object object)
Specified by:
setObject in interface InternalFactHandle

getEqualityKey

public EqualityKey getEqualityKey()
Specified by:
getEqualityKey in interface InternalFactHandle
Returns:
the key

setEqualityKey

public void setEqualityKey(EqualityKey key)
Specified by:
setEqualityKey in interface InternalFactHandle
Parameters:
key - the key to set

isEvent

public boolean isEvent()
Always returns false, since the DefaultFactHandle is only used for regular Facts, and not for Events

Specified by:
isEvent in interface InternalFactHandle
Returns:

isTrait

public boolean isTrait()
Specified by:
isTrait in interface InternalFactHandle

getFirstRightTuple

public RightTuple getFirstRightTuple()
Specified by:
getFirstRightTuple in interface InternalFactHandle

setFirstRightTuple

protected void setFirstRightTuple(RightTuple firstRightTuple)

getLastRightTuple

public RightTuple getLastRightTuple()
Specified by:
getLastRightTuple in interface InternalFactHandle

setLastRightTuple

protected void setLastRightTuple(RightTuple lastRightTuple)

setFirstLeftTuple

public void setFirstLeftTuple(LeftTuple firstLeftTuple)
Specified by:
setFirstLeftTuple in interface InternalFactHandle

getFirstLeftTuple

public LeftTuple getFirstLeftTuple()
Specified by:
getFirstLeftTuple in interface InternalFactHandle

setLastLeftTuple

public void setLastLeftTuple(LeftTuple lastLeftTuple)
Specified by:
setLastLeftTuple in interface InternalFactHandle

getLastLeftTuple

public LeftTuple getLastLeftTuple()
Specified by:
getLastLeftTuple in interface InternalFactHandle

getEntryPoint

public org.kie.api.runtime.rule.SessionEntryPoint getEntryPoint()
Specified by:
getEntryPoint in interface InternalFactHandle

setEntryPoint

public void setEntryPoint(org.kie.api.runtime.rule.SessionEntryPoint sourceNode)
Specified by:
setEntryPoint in interface InternalFactHandle

addFirstLeftTuple

public void addFirstLeftTuple(LeftTuple leftTuple)
Specified by:
addFirstLeftTuple in interface InternalFactHandle

addLastLeftTuple

public void addLastLeftTuple(LeftTuple leftTuple)
Specified by:
addLastLeftTuple in interface InternalFactHandle

addLeftTupleInPosition

public void addLeftTupleInPosition(LeftTuple leftTuple)
Specified by:
addLeftTupleInPosition in interface InternalFactHandle

removeLeftTuple

public void removeLeftTuple(LeftTuple leftTuple)
Specified by:
removeLeftTuple in interface InternalFactHandle

addFirstRightTuple

public void addFirstRightTuple(RightTuple rightTuple)
Specified by:
addFirstRightTuple in interface InternalFactHandle

addLastRightTuple

public void addLastRightTuple(RightTuple rightTuple)
Specified by:
addLastRightTuple in interface InternalFactHandle

addRightTupleInPosition

public void addRightTupleInPosition(RightTuple rightTuple)
Specified by:
addRightTupleInPosition in interface InternalFactHandle

removeRightTuple

public void removeRightTuple(RightTuple rightTuple)
Specified by:
removeRightTuple in interface InternalFactHandle

clearLeftTuples

public void clearLeftTuples()
Specified by:
clearLeftTuples in interface InternalFactHandle

clearRightTuples

public void clearRightTuples()
Specified by:
clearRightTuples in interface InternalFactHandle

quickClone

public DefaultFactHandle quickClone()
Specified by:
quickClone in interface InternalFactHandle

quickCloneUpdate

public void quickCloneUpdate(DefaultFactHandle clone)

clone

public DefaultFactHandle clone()
Specified by:
clone in interface InternalFactHandle
Overrides:
clone in class Object

toTupleTree

public String toTupleTree(int indent)
Specified by:
toTupleTree in interface InternalFactHandle

Drools :: Core 6.0.0.Beta5

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.