Package org.drools.base.factmodel
Class FieldDefinition
java.lang.Object
org.drools.base.factmodel.FieldDefinition
- All Implemented Interfaces:
Externalizable,Serializable,Comparable<FieldDefinition>,FactField
Declares a field to be dynamically generated.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFieldDefinition(String name, String type) FieldDefinition(String name, String type, boolean key) FieldDefinition(String name, GenericTypeDefinition type) FieldDefinition(String name, GenericTypeDefinition type, boolean key) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(AnnotationDefinition annotationDefinition) voidaddMetaData(String key, Object value) intcompareTo(FieldDefinition other) booleangetAlias()intbooleanbytechardoublefloatintlongshortintgetIndex()getName()intCreates the String name for the get method for a field with the given name and typeClass<?>getType()Returns the value of this attribute in the target bean instanceCreates the String name for the set method for a field with the given name and typebooleanhasAlias()inthashCode()booleanbooleanbooleanisKey()booleanvoidvoidvoidsetDeclIndex(int declIndex) voidsetGetterName(String getterName) voidsetIndex(int index) voidsetInherited(boolean inherited) voidsetInitExpr(String initExpr) voidsetKey(boolean key) voidvoidsetOverriding(String overriding) voidsetPriority(int priority) voidsetReadWriteAccessor(FieldAccessor accessor) voidsetRecursive(boolean recursive) voidsetSetterName(String setterName) voidsetTypeName(String type) voidSets the value of this attribute in the target bean instancetoString()void
-
Constructor Details
-
FieldDefinition
public FieldDefinition() -
FieldDefinition
-
FieldDefinition
-
FieldDefinition
-
FieldDefinition
-
-
Method Details
-
setReadWriteAccessor
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
getName
-
setName
- Parameters:
name- The name to set.
-
getGenericType
-
getTypeName
- Returns:
- Returns the fully qualified type.
-
setTypeName
- Parameters:
type- The fully qualified type to set.
-
getType
-
isKey
public boolean isKey() -
setKey
public void setKey(boolean key) - Parameters:
key- The key to set.
-
getReadMethod
Creates the String name for the get method for a field with the given name and type- Returns:
-
getWriteMethod
Creates the String name for the set method for a field with the given name and type- Returns:
-
equals
-
getFieldAccessor
- Returns:
- Returns the field extractor
-
hashCode
public int hashCode() -
setValue
Sets the value of this attribute in the target bean instance- Parameters:
bean- the target bean instance where the attribute shall be setvalue- the value to set the attribute to
-
getValue
Returns the value of this attribute in the target bean instance- Parameters:
bean- the target bean instance- Returns:
- target bean instance attribute value
-
get
-
set
-
isInherited
public boolean isInherited() -
setInherited
public void setInherited(boolean inherited) -
getIndex
public int getIndex() -
setIndex
public void setIndex(int index) -
getDeclIndex
public int getDeclIndex() -
setDeclIndex
public void setDeclIndex(int declIndex) -
getPriority
public int getPriority() -
setPriority
public void setPriority(int priority) -
getInitExpr
-
setInitExpr
-
compareTo
- Specified by:
compareToin interfaceComparable<FieldDefinition>
-
addAnnotation
-
getAnnotations
-
getFieldAnnotations
- Specified by:
getFieldAnnotationsin interfaceFactField
-
getMetaData
- Specified by:
getMetaDatain interfaceFactField
-
addMetaData
-
getDefaultValueAsString
-
getDefaultValueAsBoolean
-
getDefaultValueAsByte
-
getDefaultValueAsChar
-
getDefaultValueAsDouble
-
getDefaultValueAsFloat
-
getDefaultValueAsInt
-
getDefaultValueAsLong
-
getDefaultValueAsShort
-
getDefaultValueAs_boolean
public boolean getDefaultValueAs_boolean() -
getDefaultValueAs_byte
public byte getDefaultValueAs_byte() -
getDefaultValueAs_char
public char getDefaultValueAs_char() -
getDefaultValueAs_double
public double getDefaultValueAs_double() -
getDefaultValueAs_float
public float getDefaultValueAs_float() -
getDefaultValueAs_int
public int getDefaultValueAs_int() -
getDefaultValueAs_long
public long getDefaultValueAs_long() -
getDefaultValueAs_short
public short getDefaultValueAs_short() -
toString
-
resolveAlias
-
getAlias
-
hasAlias
public boolean hasAlias() -
isRecursive
public boolean isRecursive() -
setRecursive
public void setRecursive(boolean recursive) -
hasOverride
public boolean hasOverride() -
getOverriding
-
setOverriding
-
getGetterName
-
setGetterName
-
getSetterName
-
setSetterName
-