org.drools.rule
Class TypeDeclaration
java.lang.Object
org.drools.rule.TypeDeclaration
- All Implemented Interfaces:
- Externalizable, Serializable, org.drools.definition.KnowledgeDefinition
public class TypeDeclaration
- extends Object
- implements org.drools.definition.KnowledgeDefinition, Externalizable
The type declaration class stores all type's metadata
declared in source files.
- See Also:
- Serialized Form
ROLE_BIT
public static final int ROLE_BIT
- See Also:
- Constant Field Values
TYPESAFE_BIT
public static final int TYPESAFE_BIT
- See Also:
- Constant Field Values
FORMAT_BIT
public static final int FORMAT_BIT
- See Also:
- Constant Field Values
ATTR_CLASS
public static final String ATTR_CLASS
- See Also:
- Constant Field Values
ATTR_TEMPLATE
public static final String ATTR_TEMPLATE
- See Also:
- Constant Field Values
ATTR_TYPESAFE
public static final String ATTR_TYPESAFE
- See Also:
- Constant Field Values
ATTR_DURATION
public static final String ATTR_DURATION
- See Also:
- Constant Field Values
ATTR_TIMESTAMP
public static final String ATTR_TIMESTAMP
- See Also:
- Constant Field Values
ATTR_EXPIRE
public static final String ATTR_EXPIRE
- See Also:
- Constant Field Values
ATTR_KEY
public static final String ATTR_KEY
- See Also:
- Constant Field Values
ATTR_FIELD_POSITION
public static final String ATTR_FIELD_POSITION
- See Also:
- Constant Field Values
ATTR_PROP_CHANGE_SUPPORT
public static final String ATTR_PROP_CHANGE_SUPPORT
- See Also:
- Constant Field Values
setMask
public int setMask
TypeDeclaration
public TypeDeclaration()
TypeDeclaration
public TypeDeclaration(String typeName)
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- Specified by:
readExternal
in interface Externalizable
- Throws:
IOException
ClassNotFoundException
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- Specified by:
writeExternal
in interface Externalizable
- Throws:
IOException
getSetMask
public int getSetMask()
getTypeName
public String getTypeName()
- Returns:
- the type
getRole
public TypeDeclaration.Role getRole()
- Returns:
- the category
setRole
public void setRole(TypeDeclaration.Role role)
- Parameters:
role
- the category to set
getFormat
public TypeDeclaration.Format getFormat()
- Returns:
- the format
setFormat
public void setFormat(TypeDeclaration.Format format)
- Parameters:
format
- the format to set
getTimestampAttribute
public String getTimestampAttribute()
- Returns:
- the timestampAttribute
setTimestampAttribute
public void setTimestampAttribute(String timestampAttribute)
- Parameters:
timestampAttribute
- the timestampAttribute to set
getDurationAttribute
public String getDurationAttribute()
- Returns:
- the durationAttribute
setDurationAttribute
public void setDurationAttribute(String durationAttribute)
- Parameters:
durationAttribute
- the durationAttribute to set
getTypeClass
public Class<?> getTypeClass()
- Returns:
- the typeClass
setTypeClass
public void setTypeClass(Class<?> typeClass)
- Parameters:
typeClass
- the typeClass to set
getTypeTemplate
public FactTemplate getTypeTemplate()
- Returns:
- the typeTemplate
setTypeTemplate
public void setTypeTemplate(FactTemplate typeTemplate)
- Parameters:
typeTemplate
- the typeTemplate to set
matches
public boolean matches(Object clazz)
- Returns true if the given parameter matches this type declaration
- Parameters:
clazz
-
- Returns:
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
getDurationExtractor
public InternalReadAccessor getDurationExtractor()
setDurationExtractor
public void setDurationExtractor(InternalReadAccessor durationExtractor)
getTypeClassDef
public ClassDefinition getTypeClassDef()
- Returns:
- the typeClassDef
setTypeClassDef
public void setTypeClassDef(ClassDefinition typeClassDef)
- Parameters:
typeClassDef
- the typeClassDef to set
getTimestampExtractor
public InternalReadAccessor getTimestampExtractor()
setTimestampExtractor
public void setTimestampExtractor(InternalReadAccessor timestampExtractor)
getResource
public org.drools.io.Resource getResource()
setResource
public void setResource(org.drools.io.Resource resource)
getObjectType
public ObjectType getObjectType()
getExpirationOffset
public long getExpirationOffset()
setExpirationOffset
public void setExpirationOffset(long expirationOffset)
getTypeClassName
public String getTypeClassName()
setTypeClassName
public void setTypeClassName(String typeClassName)
isDynamic
public boolean isDynamic()
setDynamic
public void setDynamic(boolean dynamic)
isTypesafe
public boolean isTypesafe()
setTypesafe
public void setTypesafe(boolean typesafe)
isNovel
public boolean isNovel()
setNovel
public void setNovel(boolean novel)
Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.