net.datacrow.core.objects
Class DcTemplate

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

public class DcTemplate
extends DcObject

A template can be applied on new items.

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

Field Summary
static int _SYS_DEFAULT
           
static int _SYS_TEMPLATENAME
           
 
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_LOANDUEDATE, _SYS_LOANDURATION, _SYS_LOANENDDATE, _SYS_LOANSTARTDATE, _SYS_LOANSTATUS, _SYS_LOANSTATUSDAYS, _SYS_MODIFIED, _SYS_MODULE, _SYS_SERVICE, _SYS_SERVICEURL, _VALUE, children
 
Constructor Summary
DcTemplate(int module, int parent)
          Creates a new instance.
 
Method Summary
protected  void beforeSave()
          Actions to be performed before saving the object.
 void checkIntegrity()
          Checks the integrity of the item.
 int getParentModule()
          The module which uses the template.
 java.lang.String getTemplateName()
          The name of the template _SYS_TEMPLATENAME
 boolean isDefault()
          Indicates if this is the default template.
 java.lang.String toString()
           
 
Methods inherited from class net.datacrow.core.objects.DcObject
addChild, addExternalReference, addRequest, applyEnhancers, applyTemplate, applyTemplate, beforeDelete, clearValues, clone, compareTo, copy, copyImage, createIcon, delete, destroy, equals, executeRequests, finalize, flushImages, getChildren, getCurrentChildren, getDatabaseFieldCount, getDatabaseFieldName, getDefaultSortFieldIdx, getDisplayFieldIdx, getDisplayString, getExternalReference, getField, getFieldIndices, getFields, getFieldType, getFileField, getFilename, getIcon, getID, getLabel, getMaxFieldLength, getModule, getName, getNormalizedString, getNotSearchableFields, getParentID, getParentReferenceFieldIndex, getRequests, getSystemDisplayFieldIdx, getTableName, getTableShortName, getValue, getValueDef, getValues, hashCode, hasPrimaryKey, initializeImages, initializeReferences, initializeReferences, isChanged, isChanged, isDestroyed, isEnabled, isFilled, isLastInLine, isLoaded, isNew, isRequired, isSearchable, isUnique, isUpdateGUI, load, 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

_SYS_TEMPLATENAME

public static final int _SYS_TEMPLATENAME
See Also:
Constant Field Values

_SYS_DEFAULT

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

DcTemplate

public DcTemplate(int module,
                  int parent)
Creates a new instance.

Parameters:
module - The index of its module.
parent - The module by which the template will be used.
Method Detail

getTemplateName

public java.lang.String getTemplateName()
The name of the template _SYS_TEMPLATENAME


isDefault

public boolean isDefault()
Indicates if this is the default template. Only one template can be the default.


beforeSave

protected void beforeSave()
                   throws ValidationException
Description copied from class: DcObject
Actions to be performed before saving the object.

Overrides:
beforeSave in class DcObject
Throws:
ValidationException

getParentModule

public int getParentModule()
The module which uses the template.


toString

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

checkIntegrity

public void checkIntegrity()
                    throws ValidationException
Description copied from class: DcObject
Checks the integrity of the item.

Overrides:
checkIntegrity in class DcObject
Throws:
ValidationException