net.datacrow.core.objects
Class DcMapping

java.lang.Object
  extended by net.datacrow.core.objects.DcObject
      extended by net.datacrow.core.objects.DcMapping
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DcObject>

public class DcMapping
extends DcObject

A mapping represents a many to many relationship. Mappings are stored in cross reference database tables.

Author:
Robert Jan van der Waals
See Also:
Serialized Form

Field Summary
static int _A_PARENT_ID
           
static int _B_REFERENCED_ID
           
 
Fields inherited from class net.datacrow.core.objects.DcObject
_ID, _SYS_AVAILABLE, _SYS_CONTAINER, _SYS_CREATED, _SYS_DISPLAYVALUE, _SYS_EXTERNAL_REFERENCES, _SYS_FILEHASH, _SYS_FILEHASHTYPE, _SYS_FILENAME, _SYS_FILESIZE, _SYS_LENDBY, _SYS_LOANDAYSTILLOVERDUE, _SYS_LOANDUEDATE, _SYS_LOANDURATION, _SYS_MODIFIED, _SYS_MODULE, _SYS_SERVICE, _SYS_SERVICEURL, _VALUE, children
 
Constructor Summary
DcMapping(int module)
          Creates a new instance.
 
Method Summary
 DcObject clone()
          Clones this objects.
 void copy(DcObject dco, boolean overwrite, boolean allowDeletes)
          Copies all values from the specified Data Crow object.
 void destroy()
           
 java.lang.String getFilename()
          The filename to which this module is stored.
 DcImageIcon getIcon()
           
 java.lang.String getParentId()
          The object ID of the parent.
 int getParentModuleIdx()
          The parent module index.
 java.lang.String getReferencedID()
          The object ID of the referenced item.
 int getReferencedModuleIdx()
          The referenced module index.
 DcObject getReferencedObject()
          Retrieves the referenced object.
 boolean hasPrimaryKey()
          Is this object capable of storing IDs? In most cases the answer should be yes.
 void initializeImages()
          Loads the actual image / picture information.
 void initializeReferences()
          Loads the actual reference information.
 void setReference(DcObject dco)
           
 java.lang.String toString()
           
 
Methods inherited from class net.datacrow.core.objects.DcObject
addChild, addExternalReference, addRequest, applyEnhancers, applyTemplate, applyTemplate, beforeDelete, beforeSave, checkIntegrity, clearValues, compareTo, copyImage, createIcon, delete, equals, executeRequests, finalize, flushImages, getChildren, getCurrentChildren, getDatabaseFieldCount, getDatabaseFieldName, getDefaultSortFieldIdx, getDisplayFieldIdx, getDisplayString, getExternalReference, getField, getFieldIndices, getFields, getFieldType, getFileField, getID, getLabel, getMaxFieldLength, getModule, getName, getNormalizedString, getNotSearchableFields, getParentID, getParentReferenceFieldIndex, getRequests, getSystemDisplayFieldIdx, getTableName, getTableShortName, getValue, getValueDef, getValues, hashCode, initializeReferences, isChanged, isChanged, isDestroyed, isEnabled, isFilled, isLastInLine, isLoaded, isNew, isRequired, isSearchable, isUnique, isUpdateGUI, load, loadChildren, markAsChanged, markAsUnchanged, merge, release, reload, removeChildren, removeRequests, saveNew, saveUpdate, saveUpdate, setChanged, setChildren, setIDs, setLastInLine, setLoanInformation, setLoanInformation, setNew, setUpdateGUI, setValidate, setValue, setValueForColumn, setValueForName, setValueLowLevel, validateRequiredFields
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_A_PARENT_ID

public static final int _A_PARENT_ID
See Also:
Constant Field Values

_B_REFERENCED_ID

public static final int _B_REFERENCED_ID
See Also:
Constant Field Values
Constructor Detail

DcMapping

public DcMapping(int module)
Creates a new instance.

Parameters:
module -
Method Detail

getFilename

public java.lang.String getFilename()
The filename to which this module is stored.

Overrides:
getFilename in class DcObject
Returns:
Always returns null.

initializeImages

public void initializeImages()
Description copied from class: DcObject
Loads the actual image / picture information. Changes are overwritten. Useful when reloading an object.

Overrides:
initializeImages in class DcObject

hasPrimaryKey

public boolean hasPrimaryKey()
Description copied from class: DcObject
Is this object capable of storing IDs? In most cases the answer should be yes.

Overrides:
hasPrimaryKey in class DcObject

initializeReferences

public void initializeReferences()
Description copied from class: DcObject
Loads the actual reference information. Uses the Data Manager to retrieve the references and stores them in this object.

Overrides:
initializeReferences in class DcObject

destroy

public void destroy()
Overrides:
destroy in class DcObject

setReference

public void setReference(DcObject dco)

getReferencedObject

public DcObject getReferencedObject()
Retrieves the referenced object.


getParentModuleIdx

public int getParentModuleIdx()
The parent module index.


getReferencedModuleIdx

public int getReferencedModuleIdx()
The referenced module index.


getParentId

public java.lang.String getParentId()
The object ID of the parent.


getReferencedID

public java.lang.String getReferencedID()
The object ID of the referenced item.


getIcon

public DcImageIcon getIcon()
Overrides:
getIcon in class DcObject

toString

public java.lang.String toString()
Overrides:
toString in class DcObject

clone

public DcObject clone()
Description copied from class: DcObject
Clones this objects. All values are copies as well as its children. The clone operates on copies of the pictures and the children and can be used entirely in parallel with its clone(s). Note; this is not a shallow copy and costs just as much resources as its original. After using the clone it is best to discard it by calling the destroy method.

Overrides:
clone in class DcObject

copy

public void copy(DcObject dco,
                 boolean overwrite,
                 boolean allowDeletes)
Description copied from class: DcObject
Copies all values from the specified Data Crow object.

Overrides:
copy in class DcObject
Parameters:
dco - Source item.
overwrite - Indicates whether existing values should be overwritten.
allowDeletes - Allows existing values to be cleared.