net.datacrow.core.modules
Class MappingModule

java.lang.Object
  extended by net.datacrow.core.modules.DcModule
      extended by net.datacrow.core.modules.MappingModule
All Implemented Interfaces:
java.lang.Comparable<DcModule>

public class MappingModule
extends DcModule

A mapping module creates a link between two modules. Used for many to many relationships.

Author:
Robert Jan van der Waals

Field Summary
 
Fields inherited from class net.datacrow.core.modules.DcModule
_TYPE_ASSOCIATE_MODULE, _TYPE_EXTERNALREFERENCE_MODULE, _TYPE_MAPPING_MODULE, _TYPE_MEDIA_MODULE, _TYPE_MODULE, _TYPE_PROPERTY_MODULE, _TYPE_TEMPLATE_MODULE, insertView, searchView
 
Constructor Summary
MappingModule(DcModule parentMod, DcModule referencedMod, int fieldIdx)
          Creates a new mapping module to link the specified modules.
 
Method Summary
 DcObject createItem()
          Creates a new instance of a mapping item.
 boolean equals(java.lang.Object o)
           
 java.util.Collection<DcObject> getDefaultData()
          A mapping module does not have any default data.
 int[] getMinimalFields(java.util.Collection<java.lang.Integer> include)
           
 int getParentModIdx()
          The parent module index.
 int getReferencedModIdx()
          The referenced module index.
 boolean hasInsertView()
          A mapping module does not have any views.
 boolean hasSearchView()
          A mapping module does not have any views.
protected  void initializeFields()
          Creates the default fields.
protected  void initializeUI()
          This module does not have any views and therefore this method has not having to do.
 
Methods inherited from class net.datacrow.core.modules.DcModule
addField, addValueEnhancer, applySettings, canBeLend, compareTo, delete, deliversOnlineService, getChartPanel, getChild, getCurrentInsertView, getCurrentSearchView, getDefaultSortFieldIdx, getDescription, getDisplayFieldIdx, getDisplayIndex, getField, getField, getFieldCount, getFieldDefinitions, getFieldIndices, getFields, getFileField, getFileRenamerDialog, getFilterForm, getIcon16, getIcon16Filename, getIcon32, getIcon32Filename, getIconField, getImporter, getImporterClass, getIndex, getInsertView, getItem, getItemForm, getItemPluralResourceKey, getItemResourceKey, getKeyStroke, getLabel, getMenuBar, getModuleResourceKey, getName, getNameFieldIdx, getObjectName, getObjectNamePlural, getOnlineServices, getParent, getParentReferenceFieldIndex, getPersistentField, getPropertyModule, getQuickView, getQuickViewFieldDefinitions, getSearchView, getSetting, getSettings, getSupportedViews, getSynchronizer, getSystemDisplayFieldIdx, getSystemField, getSystemObjectName, getSystemObjectNamePlural, getTableName, getTableShortName, getTemplateModule, getType, getViews, getWebFieldDefinitions, getXmlModule, hasActualReferenceTo, hasDependingModules, hashCode, hasReferenceTo, hasReports, initializeMultiReferenceFields, initializeSettings, initializeSystemFields, isAbstract, isChildModule, isContainerManaged, isCustomFieldsAllowed, isCustomModule, isDefaultDataLoaded, isEditingAllowed, isEnabled, isEnabled, isFileBacked, isHasImages, isHasReferences, isNew, isParentModule, isSearchViewInitialized, isSelectableInUI, isServingMultipleModules, isTopModule, isValid, release, removeEnhancers, setChild, setDefaultDataLoaded, setIcon16, setIcon32, setNew, setServingMultipleModules, setSetting, setValid, setXmlModule, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MappingModule

public MappingModule(DcModule parentMod,
                     DcModule referencedMod,
                     int fieldIdx)
Creates a new mapping module to link the specified modules. The table is named / formed as follows: X_main module_fieldname

Parameters:
parentMod - The parent module.
referencedMod - The child/referenced module.
Method Detail

createItem

public DcObject createItem()
Creates a new instance of a mapping item.

Overrides:
createItem in class DcModule
See Also:
DcMapping

getReferencedModIdx

public int getReferencedModIdx()
The referenced module index.

Returns:

initializeUI

protected void initializeUI()
This module does not have any views and therefore this method has not having to do.

Overrides:
initializeUI in class DcModule

getParentModIdx

public int getParentModIdx()
The parent module index.


getMinimalFields

public int[] getMinimalFields(java.util.Collection<java.lang.Integer> include)
Overrides:
getMinimalFields in class DcModule

hasInsertView

public boolean hasInsertView()
A mapping module does not have any views.

Overrides:
hasInsertView in class DcModule
Returns:
Always false

hasSearchView

public boolean hasSearchView()
A mapping module does not have any views.

Overrides:
hasSearchView in class DcModule
Returns:
Always false

initializeFields

protected void initializeFields()
Creates the default fields.

Overrides:
initializeFields in class DcModule

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class DcModule

getDefaultData

public java.util.Collection<DcObject> getDefaultData()
                                              throws java.lang.Exception
A mapping module does not have any default data.

Overrides:
getDefaultData in class DcModule
Returns:
Always null.
Throws:
java.lang.Exception
See Also:
DcModule.getDefaultData()