| java.lang.Object org.drools.facttemplates.FactTemplateImpl
FactTemplateImpl | public class FactTemplateImpl implements FactTemplate(Code) | | author: Peter Lin author: Deftemplate is equivalent to CLIPS deftemplate
author: Some general design notes about the current implementation. In the author: case where a class is declared to create the deftemplate, the order author: of the slots are based on java Introspection. In the case where an author: user declares the deftemplate from console or directly, the order author: is the same as the string equivalent. author: The current implementation does not address redeclaring a deftemplate author: for a couple of reasons. The primary one is how does it affect the author: existing RETE nodes. One possible approach is to always add new slots author: to the end of the deftemplate and ignore the explicit order. Another author: is to recompute the deftemplate, binds and all nodes. The second author: approach is very costly and would make redeclaring a deftemplate author: undesirable. |
createFact | public Fact createFact(long id)(Code) | | Method takes a list of Slots and creates a deffact from it.
Parameters: data - Parameters: id - |
getFieldTemplate | public FieldTemplate getFieldTemplate(String name)(Code) | | A convienance method for finding the slot matching
the String name.
Parameters: name - |
getFieldTemplate | public FieldTemplate getFieldTemplate(int index)(Code) | | get the Slot at the given pattern id
Parameters: id - |
getFieldTemplateIndex | public int getFieldTemplateIndex(String name)(Code) | | Look up the pattern index of the slot
Parameters: name - |
getName | public String getName()(Code) | | the template name is an alias for an object
Parameters: name - |
getNumberOfFields | public int getNumberOfFields()(Code) | | Return the number of slots in the deftemplate
|
hashCode | public int hashCode()(Code) | | |
toString | public String toString()(Code) | | Method will return a string format with the int type code
for the slot type
|
|
|