net.datacrow.core.modules
Class DcPropertyModule

java.lang.Object
  extended by net.datacrow.core.modules.DcModule
      extended by net.datacrow.core.modules.DcPropertyModule
All Implemented Interfaces:
java.lang.Comparable<DcModule>
Direct Known Subclasses:
ExternalReferenceModule, TabModule

public class DcPropertyModule
extends DcModule

A property module is the simplest module type.
Examples of property modules are the movie and music genres, the software category, the storage media and the platforms. A property module will never show up in the module bar. In fact it will not show up anywhere until used within another module. Its existence depends on other modules.
Property modules are solely used by reference fields.

Author:
Robert Jan van der Waals
See Also:
DcReferencesField, DcComboBox

Field Summary
protected  DcMinimalisticItemView form
           
 
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
DcPropertyModule(int index, java.lang.String name, java.lang.String tableName, java.lang.String tableShortName, java.lang.String objectName, java.lang.String objectNamePlural)
          Creates a new instance.
DcPropertyModule(XmlModule xmlModule)
          Creates a new module based on a XML definition.
 
Method Summary
 DcObject createItem()
          Creates a new instance of an item belonging to this module.
 boolean equals(java.lang.Object o)
           
 int getDefaultSortFieldIdx()
          Retrieves the index of the field on which is sorted by default.
 DcMinimalisticItemView getForm()
          Creates (if needed) the simple item view.
 DcImageIcon getIcon16()
          The small icon used to represent the module.
 DcImageIcon getIcon32()
          The large icon used to represent the module.
 DcPropertyModule getInstance(int index, java.lang.String name, java.lang.String tableName, java.lang.String tableShortName, java.lang.String objectName, java.lang.String objectNamePlural)
           
 int[] getMinimalFields(java.util.Collection<java.lang.Integer> include)
           
 int[] getSupportedViews()
           
 TemplateModule getTemplateModule()
          Returns the template module.
 boolean hasDependingModules()
          Indicates if other modules depend on this module.
 boolean hasInsertView()
          Indicates if this module has an insert view available.
 boolean hasSearchView()
          Indicates if this module has a search view available.
protected  void initializeFields()
          Initializes the default fields.
 void initializeUI()
          Initializes the simple item view.
 boolean isCustomFieldsAllowed()
          Indicates if this module is allowed to be customized.
 boolean isTopModule()
          Indicates if this module is a top module.
 
Methods inherited from class net.datacrow.core.modules.DcModule
addField, addValueEnhancer, applySettings, canBeLend, compareTo, delete, deliversOnlineService, getChartPanel, getChild, getCurrentInsertView, getCurrentSearchView, getDefaultData, getDescription, getDisplayFieldIdx, getDisplayIndex, getField, getField, getFieldCount, getFieldDefinitions, getFieldIndices, getFields, getFileField, getFileRenamerDialog, getFilterForm, getIcon16Filename, 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, getSynchronizer, getSystemDisplayFieldIdx, getSystemField, getSystemObjectName, getSystemObjectNamePlural, getTableName, getTableShortName, getType, getViews, getWebFieldDefinitions, getXmlModule, hasActualReferenceTo, hashCode, hasReferenceTo, hasReports, initializeMultiReferenceFields, initializeSettings, initializeSystemFields, isAbstract, isChildModule, isContainerManaged, isCustomModule, isDefaultDataLoaded, isEditingAllowed, isEnabled, isEnabled, isFileBacked, isHasImages, isHasReferences, isNew, isParentModule, isSearchViewInitialized, isSelectableInUI, isServingMultipleModules, 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
 

Field Detail

form

protected DcMinimalisticItemView form
Constructor Detail

DcPropertyModule

public DcPropertyModule(XmlModule xmlModule)
Creates a new module based on a XML definition.

Parameters:
module -

DcPropertyModule

public DcPropertyModule(int index,
                        java.lang.String name,
                        java.lang.String tableName,
                        java.lang.String tableShortName,
                        java.lang.String objectName,
                        java.lang.String objectNamePlural)
Creates a new instance.

Parameters:
index - The module index.
topModule - Indicates if the module is a top module. Top modules are allowed to be displayed in the module bar and can be enabled or disabled.
name - The internal unique name of the module.
description - The module description
objectName - The name of the items belonging to this module.
objectNamePlural - The plural name of the items belonging to this module.
tableName - The database table name for this module.
tableShortName - The database table short name for this module.
Method Detail

getInstance

public DcPropertyModule getInstance(int index,
                                    java.lang.String name,
                                    java.lang.String tableName,
                                    java.lang.String tableShortName,
                                    java.lang.String objectName,
                                    java.lang.String objectNamePlural)

getForm

public DcMinimalisticItemView getForm()
Creates (if needed) the simple item view.


isTopModule

public boolean isTopModule()
Description copied from class: DcModule
Indicates if this module is a top module. Top modules are allowed to be displayed in the module bar and can be enabled or disabled.

Overrides:
isTopModule in class DcModule

hasInsertView

public boolean hasInsertView()
Description copied from class: DcModule
Indicates if this module has an insert view available.

Overrides:
hasInsertView in class DcModule

hasSearchView

public boolean hasSearchView()
Description copied from class: DcModule
Indicates if this module has a search view available.

Overrides:
hasSearchView in class DcModule

hasDependingModules

public boolean hasDependingModules()
Description copied from class: DcModule
Indicates if other modules depend on this module.

Overrides:
hasDependingModules in class DcModule

getDefaultSortFieldIdx

public int getDefaultSortFieldIdx()
Retrieves the index of the field on which is sorted by default. Always returns the name field.

Overrides:
getDefaultSortFieldIdx in class DcModule
See Also:
DcProperty._A_NAME

initializeUI

public void initializeUI()
Initializes the simple item view.

Overrides:
initializeUI in class DcModule

getSupportedViews

public int[] getSupportedViews()
Overrides:
getSupportedViews in class DcModule

createItem

public DcObject createItem()
Creates a new instance of an item belonging to this module.

Overrides:
createItem in class DcModule

isCustomFieldsAllowed

public boolean isCustomFieldsAllowed()
Indicates if this module is allowed to be customized. Always returns false.

Overrides:
isCustomFieldsAllowed in class DcModule

getMinimalFields

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

initializeFields

protected void initializeFields()
Initializes the default fields.

Overrides:
initializeFields in class DcModule

getIcon16

public DcImageIcon getIcon16()
Description copied from class: DcModule
The small icon used to represent the module.

Overrides:
getIcon16 in class DcModule

getIcon32

public DcImageIcon getIcon32()
Description copied from class: DcModule
The large icon used to represent the module.

Overrides:
getIcon32 in class DcModule

getTemplateModule

public TemplateModule getTemplateModule()
Returns the template module.

Overrides:
getTemplateModule in class DcModule
Returns:
Always returns null.

equals

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