org.caleigo.core
Interface ICalculatedFieldDescriptor

All Superinterfaces:
IFieldDescriptor, java.io.Serializable
All Known Implementing Classes:
AbstractCalculatedFieldDescriptor

public interface ICalculatedFieldDescriptor
extends IFieldDescriptor

Interface for calculated fields. The two action methods (getFieldDataFrom and setFieldDataTo) are called by entity-objects when one wants to get/set data for a field that implements ICalculatedFieldDescriptor.

Version:
1.00
Author:
Dennis Zikovic

Field Summary
 
Fields inherited from interface org.caleigo.core.IFieldDescriptor
AUTOGEN, HIDDEN_FIELD, HINT_FIELD, IDENTITY_FIELD, INDEXED, NAME_FIELD, NATURAL_ORDER, OVERVIEW_FIELD, READ_ONLY_FIELD, REQUIRED
 
Method Summary
 java.lang.Object getFieldDataFrom(IEntity entity)
           
 IFieldDescriptor[] getRequiredFields()
          Should return an array of the field descriptors required for the "calculation" of the descriptors value.
 boolean isValidFor(IEntityDescriptor entityDescriptor)
          should Returns true if the descriptor is "valid for" = can be a part of and calculate its value based on the data defined by the submited entity descriptor.
 void setFieldDataTo(IEntity entity, java.lang.Object data)
           
 
Methods inherited from interface org.caleigo.core.IFieldDescriptor
canValidate, getCodeName, getDataType, getDefaultValue, getDisplayName, getEntityDescriptor, getFieldRelations, getLength, getReferenceFieldRelation, getSourceName, isAutoGenerated, isHiddenField, isHintField, isIdentityField, isIndexed, isNameField, isNaturalOrder, isOverviewField, isReadOnly, isReferenceField, isRequired, validateData
 

Method Detail

getFieldDataFrom

public java.lang.Object getFieldDataFrom(IEntity entity)

setFieldDataTo

public void setFieldDataTo(IEntity entity,
                           java.lang.Object data)

isValidFor

public boolean isValidFor(IEntityDescriptor entityDescriptor)
should Returns true if the descriptor is "valid for" = can be a part of and calculate its value based on the data defined by the submited entity descriptor.


getRequiredFields

public IFieldDescriptor[] getRequiredFields()
Should return an array of the field descriptors required for the "calculation" of the descriptors value.



Copyright © 2005 Caleigo. All Rights Reserved.