Knowledge API Legacy5 Adapter 6.0.0.Beta3

org.drools.impl.adapters
Class FactFieldAdapter

java.lang.Object
  extended by org.drools.impl.adapters.FactFieldAdapter
All Implemented Interfaces:
Externalizable, Serializable, FactField

public class FactFieldAdapter
extends Object
implements FactField

See Also:
Serialized Form

Constructor Summary
FactFieldAdapter(org.kie.api.definition.type.FactField delegate)
           
 
Method Summary
static List<FactField> adaptFactFields(Collection<org.kie.api.definition.type.FactField> factFields)
           
 Object get(Object bean)
          Returns the value of this field in the given fact.
 List<Annotation> getFieldAnnotations()
          Returns the list of field-level annotations used in this field definition
 int getIndex()
          Returns the index of this field in the field list for the defining fact type.
 Map<String,Object> getMetaData()
          Returns the annotations of this field definition as key-value pairs.
 String getName()
          Returns the name of this field.
 Class<?> getType()
          Returns the type of this field.
 boolean isKey()
          Returns true if this field is a key field.
 void readExternal(ObjectInput in)
           
 void set(Object bean, Object value)
          Sets the value of this field in the given fact.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FactFieldAdapter

public FactFieldAdapter(org.kie.api.definition.type.FactField delegate)
Method Detail

getType

public Class<?> getType()
Description copied from interface: FactField
Returns the type of this field.

Specified by:
getType in interface FactField
Returns:

getName

public String getName()
Description copied from interface: FactField
Returns the name of this field.

Specified by:
getName in interface FactField
Returns:

isKey

public boolean isKey()
Description copied from interface: FactField
Returns true if this field is a key field. A key field is included in hashcode() calculation and on the equals() method evaluation. Non-key fields are not checked in this methods.

Specified by:
isKey in interface FactField
Returns:

set

public void set(Object bean,
                Object value)
Description copied from interface: FactField
Sets the value of this field in the given fact.

Specified by:
set in interface FactField
Parameters:
bean - fact on which to set the field.
value - the value to set on the field.

get

public Object get(Object bean)
Description copied from interface: FactField
Returns the value of this field in the given fact.

Specified by:
get in interface FactField
Parameters:
bean - the fact from which the field will be read.
Returns:
the value of the field on the given fact.

getIndex

public int getIndex()
Description copied from interface: FactField
Returns the index of this field in the field list for the defining fact type. The list (and thus the index) takes into account the fields inherited from the parent class, if any.

Specified by:
getIndex in interface FactField
Returns:
the index of this field in the defining type

getFieldAnnotations

public List<Annotation> getFieldAnnotations()
Description copied from interface: FactField
Returns the list of field-level annotations used in this field definition

Specified by:
getFieldAnnotations in interface FactField
Returns:
the list of field-level annotations

getMetaData

public Map<String,Object> getMetaData()
Description copied from interface: FactField
Returns the annotations of this field definition as key-value pairs.

Specified by:
getMetaData in interface FactField
Returns:
a key-value map of the field-level annotations

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

adaptFactFields

public static List<FactField> adaptFactFields(Collection<org.kie.api.definition.type.FactField> factFields)

Knowledge API Legacy5 Adapter 6.0.0.Beta3

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