Package mc.core.model.channel
Class ChannelMapField
java.lang.Object
mc.core.model.channel.ChannelMapField
- All Implemented Interfaces:
Serializable,IBaseEntity,ICoreEntity
Entity representing the mapping of a property of the main entity to a cell in table or flat file.
Properties:
ChannelMapFieldTypes (entity can be either be the main entity or the referenced entity):
Properties:
mapIndex: column header label (if hasHeader=true in ChannelMapBase)fieldLength: must be given for ChannelMapType.FIXED_LENGTH, ignored for other mapTypesfieldPosition: column number, gives the ordering of the fieldsfieldHandlerClassName: provide a handler class if special transformation need to be done to data.
Handler class must implement IFieldHandler for export and IFieldParser for importidField: 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
attributefor the main entity or in fielddepAattributefor 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,
parentNodeTypegives the level of ancestory,depMapFieldType must be given, currently only NAME, DESCRIPTION, EXTERNALKEY and ATTRIBUTE supported fordepMapFieldType. - RELATION: a property of a related Node is to be ex- or imported,
relatedNodeTypegives the NodeType of this Node,relationTypedefines the relation,depMapFieldTypemust be given, currently only NAME, DESCRIPTION, EXTERNALKEY and ATTRIBUTE supported fordepMapFieldType. - CLASSIFICATION: a property of an assigned classification is to be ex- or imported,
classificationHrcmust be given,depMapFieldTypemust be given, currently only NAME and EXTERNALKEY supported fordepMapFieldType. - CUSTOM: a FieldHandler must be given that exports/imports the data
- See Also:
-
CalendarUtils.toString(Calendar)mc.core.system.channel.flatfile.IFieldHandlermc.core.system.channel.flatfile.IFieldParser- Serialized Form
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumstatic classstatic enumno property fields, used as parameter constant and label key -
Constructor Summary
ConstructorsConstructorDescriptionChannelMapField(String index) ChannelMapField(String mapIndex, int fieldPosition, int fieldLength) creates an ImportMapField for fixed lenghtChannelMapField(ChannelMapField source) ChannelMapField(Attribute attribute) create an ChannelMapField for given attributeChannelMapField(AttributeType attType) ChannelMapField(ClassificationHrc classificationHrc) ChannelMapField(NodeType parentNodeType, Attribute attribute) create an ChannelMapField for given attribute of parentNodeType -
Method Summary
Modifier and TypeMethodDescriptionbooleanintintlonggetId()booleaninthashCode()booleanbooleanbooleanvoidsetAppendMultiValues(boolean appendMultiValues) voidsetAttribute(Attribute attribute) voidsetAttributeType(AttributeType attributeType) voidsetClassificationHrc(ClassificationHrc classifHrc) voidsetCreateStdValues(boolean createStdValues) voidsetDepAttribute(Attribute depAttribute) voidsetDepMapFieldType(ChannelMapField.ChannelMapFieldType depMapFieldType) voidsetFieldHandlerClassName(String fieldParserClassName) voidsetFieldLength(int length) voidsetFieldPosition(int position) voidsetId(long id) voidsetIdField(boolean keyField) voidsetMapFieldType(ChannelMapField.ChannelMapFieldType mapFieldType) voidsetMapIndex(String index) voidsetParameter(String parameter) voidsetParentNodeType(NodeType parentNodeType) voidsetRelatedNodeType(NodeType relatedNodeType) voidsetRelationType(RelationType relationType) toString()testing/debugging
-
Constructor Details
-
ChannelMapField
public ChannelMapField() -
ChannelMapField
-
ChannelMapField
-
ChannelMapField
creates an ImportMapField for fixed lenght -
ChannelMapField
create an ChannelMapField for given attribute- Parameters:
attribute-
-
ChannelMapField
create an ChannelMapField for given attribute of parentNodeType- Parameters:
attribute-
-
ChannelMapField
-
ChannelMapField
-
ChannelMapField
-
-
Method Details
-
getId
public long getId()- Specified by:
getIdin interfaceIBaseEntity
-
setId
public void setId(long id) - Specified by:
setIdin interfaceIBaseEntity
-
getMapIndex
-
setMapIndex
-
getFieldLength
public int getFieldLength() -
setFieldLength
public void setFieldLength(int length) -
getFieldHandlerClassName
-
setFieldHandlerClassName
-
getFieldPosition
public int getFieldPosition() -
setFieldPosition
public void setFieldPosition(int position) -
isIdField
public boolean isIdField() -
setIdField
public void setIdField(boolean keyField) -
getAttribute
-
getMapFieldType
-
getRelatedNodeType
-
getRelationType
-
setAttribute
-
setMapFieldType
-
setRelatedNodeType
-
setRelationType
-
getDepAttribute
-
setDepAttribute
-
getDepMapFieldType
-
setDepMapFieldType
-
getClassificationHrc
-
setClassificationHrc
-
getParentNodeType
-
setParentNodeType
-
getAttributeType
-
setAttributeType
-
isCreateStdValues
public boolean isCreateStdValues() -
setCreateStdValues
public void setCreateStdValues(boolean createStdValues) -
isAppendMultiValues
public boolean isAppendMultiValues() -
setAppendMultiValues
public void setAppendMultiValues(boolean appendMultiValues) -
getParameter
-
setParameter
-
hasDependentObject
public boolean hasDependentObject() -
getDependentObjectType
-
equals
-
hashCode
public int hashCode() -
toString
testing/debugging
-