org.pm4j.core.pm.impl
Class PmDataInputBase

java.lang.Object
  extended by org.pm4j.core.pm.impl.PmObjectBase
      extended by org.pm4j.core.pm.impl.PmDataInputBase
All Implemented Interfaces:
java.lang.Comparable<PmObject>, PmDataInput, PmObject
Direct Known Subclasses:
PmElementBase, PmTableImpl

public abstract class PmDataInputBase
extends PmObjectBase
implements PmDataInput


Nested Class Summary
 
Nested classes/interfaces inherited from class org.pm4j.core.pm.impl.PmObjectBase
PmObjectBase.MetaData, PmObjectBase.NameBuilder, PmObjectBase.NameBuilderAbsoluteName, PmObjectBase.NameBuilderShortName, PmObjectBase.NameBuilderTitle
 
Field Summary
 
Fields inherited from class org.pm4j.core.pm.impl.PmObjectBase
pmCacheLog
 
Fields inherited from interface org.pm4j.core.pm.PmObject
STYLE_CLASS_DISABLED, STYLE_CLASS_ERROR, STYLE_CLASS_INFO, STYLE_CLASS_REQUIRED, STYLE_CLASS_WARN
 
Constructor Summary
PmDataInputBase(PmObject parentPm)
           
 
Method Summary
 void commitBufferedPmChanges()
          Commits all changed values to the data store behind the presentation model.
 boolean isBufferedPmValueMode()
           
 boolean isPmValueChanged()
          Indicates a value change.
 void pmValidate()
          The default implementation validates the attributes.
 void resetPmValues()
          Resets the values of editable attributes to their default value.
 void rollbackBufferedPmChanges()
          Clears all uncommitted changes.
 
Methods inherited from class org.pm4j.core.pm.impl.PmObjectBase
accept, addToPmComposite, canSetPmTitle, clearCachedPmValues, clearPmInvalidValues, compareTo, ensurePmMetaDataInitialization, findAnnotationsInPmHierarchy, getPmConversation, getPmConversationImpl, getPmIconPath, getPmMetaData, getPmMetaDataWithoutPmInitCall, getPmName, getPmParent, getPmProperty, getPmRelativeName, getPmResKey, getPmResKeyBase, getPmResLoaderCtxtClasses, getPmShortTitle, getPmStyleClasses, getPmStyleClassesImpl, getPmTitle, getPmTitleDef, getPmTitleImpl, getPmTooltip, getPmTooltipImpl, getVisiblePmCommands, getVisiblePmCommands, initMetaData, isMetaDataInitialized, isPmEnabled, isPmEnabledImpl, isPmReadonly, isPmReadonlyImpl, isPmValid, isPmVisible, isPmVisibleImpl, makeMetaData, onPmChildStateChange, onPmInit, onPmValueChange, readCacheStrategy, removePmChild, setPmEnabled, setPmParent, setPmProperty, setPmTitle, setPmVisible, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.pm4j.core.pm.PmObject
accept, canSetPmTitle, compareTo, getPmConversation, getPmIconPath, getPmName, getPmParent, getPmProperty, getPmRelativeName, getPmShortTitle, getPmStyleClasses, getPmTitle, getPmTooltip, isPmEnabled, isPmReadonly, isPmValid, isPmVisible, setPmEnabled, setPmParent, setPmProperty, setPmTitle, setPmVisible
 

Constructor Detail

PmDataInputBase

public PmDataInputBase(PmObject parentPm)
Method Detail

isPmValueChanged

public boolean isPmValueChanged()
Description copied from interface: PmDataInput
Indicates a value change. E.g. a value was entered, but not yet saved by the user.

The changed state usually gets cleared on execution of a PmCommand that required valid values.

Specified by:
isPmValueChanged in interface PmDataInput
Returns:
true if the value of this PM or one of its composite children was changed.

resetPmValues

public void resetPmValues()
Description copied from interface: PmDataInput
Resets the values of editable attributes to their default value.

Specified by:
resetPmValues in interface PmDataInput

pmValidate

public void pmValidate()
The default implementation validates the attributes.

Subclasses may override this to provide some more specific logic.

Important for overriding: Don't forget to call super.pmValidate() to ensure attribute validation.

Specified by:
pmValidate in interface PmDataInput

isBufferedPmValueMode

public boolean isBufferedPmValueMode()
Specified by:
isBufferedPmValueMode in interface PmDataInput
Returns:
true when each pm value modification will be applied to an edit buffer only. Changed values will be applied when PmDataInput.commitBufferedPmChanges() is called.

rollbackBufferedPmChanges

public void rollbackBufferedPmChanges()
Description copied from interface: PmDataInput
Clears all uncommitted changes.

Does not change values of the data store behind the presentation model.

Specified by:
rollbackBufferedPmChanges in interface PmDataInput

commitBufferedPmChanges

public void commitBufferedPmChanges()
Description copied from interface: PmDataInput
Commits all changed values to the data store behind the presentation model.

Specified by:
commitBufferedPmChanges in interface PmDataInput