Class ChannelMapField

java.lang.Object
mc.core.model.channel.ChannelMapField
All Implemented Interfaces:
Serializable, IBaseEntity, ICoreEntity

@Entity public class ChannelMapField extends Object implements IBaseEntity
Entity representing the mapping of a property of the main entity to a cell in table or flat file.
Properties:
mapIndex: column header label (if hasHeader=true in ChannelMapBase)
fieldLength: must be given for ChannelMapType.FIXED_LENGTH, ignored for other mapTypes
fieldPosition: column number, gives the ordering of the fields
fieldHandlerClassName: provide a handler class if special transformation need to be done to data. Handler class must implement IFieldHandler for export and IFieldParser for import
idField: set flag to true if given field is the field by which entity should be searched. Only relevant for import. There must only be one field marked as idField in the whole map. mapFieldType determines which property of the main entity is to be ex- or imported. The same enum ChannelMapFieldType is also used in depMapFieldType when the property of the main entity references another entity to give the property of this entity.

ChannelMapFieldTypes (entity can be either be the main entity or the referenced entity):
  • NAME: name-Resource of entity, name in primary or replacement locale
  • DESCRIPTION: description-Resource of entity, description in primary or replacement locale
  • EXTERNALKEY: externalKey of entity
  • DATECREATED: String representation of dateCreated of entity as provided by CalendarUtils.toString( Calendar). Use a fieldHandler if other format is needed.
  • DATEMODIFIED: String representation of dateModified of entity as provided by CalendarUtils.toString( Calendar). Use a fieldHandler if other format is needed.
  • ATTRIBUTE: attribute value of entity. The Attribute must be a type Attribute and is stored in field attribute for the main entity or in field depAattribute for the referenced entity.
  • ATTRIBUTETYPE: only for xml-export: all Attributes of this AttributeType are to be exported with values
  • PARENT: a property of ancestor is to be ex- or imported, parentNodeType gives the level of ancestory, depMapFieldType must be given, currently only NAME, DESCRIPTION, EXTERNALKEY and ATTRIBUTE supported for depMapFieldType .
  • RELATION: a property of a related Node is to be ex- or imported, relatedNodeType gives the NodeType of this Node, relationType defines the relation, depMapFieldType must be given, currently only NAME, DESCRIPTION, EXTERNALKEY and ATTRIBUTE supported for depMapFieldType.
  • CLASSIFICATION: a property of an assigned classification is to be ex- or imported, classificationHrc must be given, depMapFieldType must be given, currently only NAME and EXTERNALKEY supported for depMapFieldType.
  • CUSTOM: a FieldHandler must be given that exports/imports the data
See Also:
  • CalendarUtils.toString(Calendar)
  • mc.core.system.channel.flatfile.IFieldHandler
  • mc.core.system.channel.flatfile.IFieldParser
  • Serialized Form
  • Constructor Details

    • ChannelMapField

      public ChannelMapField()
    • ChannelMapField

      public ChannelMapField(String index)
    • ChannelMapField

      public ChannelMapField(ChannelMapField source)
    • ChannelMapField

      public ChannelMapField(String mapIndex, int fieldPosition, int fieldLength)
      creates an ImportMapField for fixed lenght
    • ChannelMapField

      public ChannelMapField(Attribute attribute)
      create an ChannelMapField for given attribute
      Parameters:
      attribute -
    • ChannelMapField

      public ChannelMapField(NodeType parentNodeType, Attribute attribute)
      create an ChannelMapField for given attribute of parentNodeType
      Parameters:
      attribute -
    • ChannelMapField

      public ChannelMapField(ChannelMapField.ChannelMapFieldType fieldType)
    • ChannelMapField

      public ChannelMapField(ClassificationHrc classificationHrc)
    • ChannelMapField

      public ChannelMapField(AttributeType attType)
  • Method Details

    • getId

      public long getId()
      Specified by:
      getId in interface IBaseEntity
    • setId

      public void setId(long id)
      Specified by:
      setId in interface IBaseEntity
    • getMapIndex

      public String getMapIndex()
    • setMapIndex

      public void setMapIndex(String index)
    • getFieldLength

      public int getFieldLength()
    • setFieldLength

      public void setFieldLength(int length)
    • getFieldHandlerClassName

      public String getFieldHandlerClassName()
    • setFieldHandlerClassName

      public void setFieldHandlerClassName(String fieldParserClassName)
    • getFieldPosition

      public int getFieldPosition()
    • setFieldPosition

      public void setFieldPosition(int position)
    • isIdField

      public boolean isIdField()
    • setIdField

      public void setIdField(boolean keyField)
    • getAttribute

      public Attribute getAttribute()
    • getMapFieldType

      public ChannelMapField.ChannelMapFieldType getMapFieldType()
    • getRelatedNodeType

      public NodeType getRelatedNodeType()
    • getRelationType

      public RelationType getRelationType()
    • setAttribute

      public void setAttribute(Attribute attribute)
    • setMapFieldType

      public void setMapFieldType(ChannelMapField.ChannelMapFieldType mapFieldType)
    • setRelatedNodeType

      public void setRelatedNodeType(NodeType relatedNodeType)
    • setRelationType

      public void setRelationType(RelationType relationType)
    • getDepAttribute

      public Attribute getDepAttribute()
    • setDepAttribute

      public void setDepAttribute(Attribute depAttribute)
    • getDepMapFieldType

      public ChannelMapField.ChannelMapFieldType getDepMapFieldType()
    • setDepMapFieldType

      public void setDepMapFieldType(ChannelMapField.ChannelMapFieldType depMapFieldType)
    • getClassificationHrc

      public ClassificationHrc getClassificationHrc()
    • setClassificationHrc

      public void setClassificationHrc(ClassificationHrc classifHrc)
    • getParentNodeType

      public NodeType getParentNodeType()
    • setParentNodeType

      public void setParentNodeType(NodeType parentNodeType)
    • getAttributeType

      public AttributeType getAttributeType()
    • setAttributeType

      public void setAttributeType(AttributeType attributeType)
    • isCreateStdValues

      public boolean isCreateStdValues()
    • setCreateStdValues

      public void setCreateStdValues(boolean createStdValues)
    • isAppendMultiValues

      public boolean isAppendMultiValues()
    • setAppendMultiValues

      public void setAppendMultiValues(boolean appendMultiValues)
    • getParameter

      public String getParameter()
    • setParameter

      public void setParameter(String parameter)
    • hasDependentObject

      public boolean hasDependentObject()
    • getDependentObjectType

      public TypeEntity getDependentObjectType()
    • equals

      public boolean equals(Object another)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      testing/debugging
      Overrides:
      toString in class Object