com.sri.emo.wizard.completion.model
Class CompletionPartsBean

java.lang.Object
  extended by com.sri.emo.wizard.completion.model.CompletionPartsBean
All Implemented Interfaces:
Serializable, Comparable

public class CompletionPartsBean
extends Object
implements Serializable, Comparable

Metadata for each completion part.

Version:
1.0
Author:
Michael Rimov
See Also:
Serialized Form

Constructor Summary
CompletionPartsBean(CompletionBean myOwner, Part myPart)
          Constructor that takes the parent bean and an associated Part object.
 
Method Summary
 int compareTo(Object o)
          Compares this object with the specified object for order.
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 String getDirective()
           
 FieldCompletion getFieldCompletion()
           
 String getHelpText()
           
 Integer getMaxEntries()
           
 Integer getMinEntries()
           
 CompletionBean getOwner()
           
 Part getPart()
           
 int hashCode()
          Returns a hash code value for the object.
 boolean isFreeTextAllowed()
           
 boolean isFreeTextEntry()
           
 boolean isMinMaxAllowed()
           
 boolean isSingleEntry()
           
 void setDirective(String directive)
           
 void setFieldCompletion(FieldCompletion fieldCompletion)
           
 void setHelpText(String helpText)
           
 void setMaxEntries(int maxEntries)
           
 void setMinEntries(int minEntries)
           
 void setSingleEntry(boolean singleEntry)
           
 String toString()
          Returns a string representation of the object.
 ErrorCollection validateAndAdjust(ErrorCollection toPopulate)
          Validate the properties that have been set for this HTTP request, and return an ActionErrors object that encapsulates any validation errors that have been found.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompletionPartsBean

public CompletionPartsBean(CompletionBean myOwner,
                           Part myPart)
                    throws DBException
Constructor that takes the parent bean and an associated Part object.

Parameters:
myOwner - CompletionBean the parent bean.
myPart - Part the associated part.
Throws:
DBException - upon Part query error.
Method Detail

getOwner

public CompletionBean getOwner()

getPart

public Part getPart()

setFieldCompletion

public void setFieldCompletion(FieldCompletion fieldCompletion)

setDirective

public void setDirective(String directive)

setHelpText

public void setHelpText(String helpText)

setSingleEntry

public void setSingleEntry(boolean singleEntry)

setMinEntries

public void setMinEntries(int minEntries)

setMaxEntries

public void setMaxEntries(int maxEntries)

getFieldCompletion

public FieldCompletion getFieldCompletion()

isFreeTextEntry

public boolean isFreeTextEntry()

getMinEntries

public Integer getMinEntries()

getMaxEntries

public Integer getMaxEntries()

getDirective

public String getDirective()

getHelpText

public String getHelpText()

isSingleEntry

public boolean isSingleEntry()

isFreeTextAllowed

public boolean isFreeTextAllowed()
                          throws DBException
Throws:
DBException

isMinMaxAllowed

public boolean isMinMaxAllowed()
                        throws DBException
Throws:
DBException

compareTo

public int compareTo(Object o)
Compares this object with the specified object for order. This implementation relies on the underlying parts for comparison.

Specified by:
compareTo in interface Comparable
Parameters:
o - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
a string representation of the object.

validateAndAdjust

public ErrorCollection validateAndAdjust(ErrorCollection toPopulate)
Validate the properties that have been set for this HTTP request, and return an ActionErrors object that encapsulates any validation errors that have been found.

Parameters:
toPopulate - The ErrorCollection we are using to populate with errors upon validation errors.
Returns:
ActionErrors
To Do:
This is not a side-effect free function. Redesign so that 'fixing' logic is centralized in the DBObject Converter.

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.