phenote.dataadapter
Class AbstractCommitConstraint

java.lang.Object
  extended by phenote.dataadapter.AbstractCommitConstraint
All Implemented Interfaces:
Constraint
Direct Known Subclasses:
RequiredFieldConstraint, WormConstraint, WormInteractionConstraint

public abstract class AbstractCommitConstraint
extends java.lang.Object
implements Constraint


Constructor Summary
AbstractCommitConstraint()
           
 
Method Summary
protected abstract  ConstraintStatus checkCharCommit(CharacterI chr)
          Check char and return ConstraintStatus
 ConstraintStatus checkCommit()
          do constraint check for commit time - should char list be passed in? return ConstraintStatus indication if constraint passed and error msg should only be called if isCommitConstraint is true
protected  ConstraintStatus checkEachChar()
          Checks all "non-blank" chars.
 ConstraintStatus checkEdit()
          do constraint check after user edit - should char list be passed in? return ConstraintStatus indication if constraint passed and error msg should only be called if isEditConstraint is true
 boolean isCommitConstraint()
          Return true if constraint should be checked at commit time to dataadapter
 boolean isEditConstraint()
          false - its just a commit constraint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCommitConstraint

public AbstractCommitConstraint()
Method Detail

isCommitConstraint

public boolean isCommitConstraint()
Return true if constraint should be checked at commit time to dataadapter

Specified by:
isCommitConstraint in interface Constraint

checkCommit

public ConstraintStatus checkCommit()
do constraint check for commit time - should char list be passed in? return ConstraintStatus indication if constraint passed and error msg should only be called if isCommitConstraint is true

Specified by:
checkCommit in interface Constraint

checkEachChar

protected ConstraintStatus checkEachChar()
Checks all "non-blank" chars. blanks are just an artifact of the gui and should be filtered out before committing. auto-gen fields (date_created) dont factor into blankness.


checkCharCommit

protected abstract ConstraintStatus checkCharCommit(CharacterI chr)
Check char and return ConstraintStatus


isEditConstraint

public boolean isEditConstraint()
false - its just a commit constraint

Specified by:
isEditConstraint in interface Constraint

checkEdit

public ConstraintStatus checkEdit()
Description copied from interface: Constraint
do constraint check after user edit - should char list be passed in? return ConstraintStatus indication if constraint passed and error msg should only be called if isEditConstraint is true

Specified by:
checkEdit in interface Constraint