com.sri.emo.wizard.creation.model
Class CreationPartsBean

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

public class CreationPartsBean
extends Object
implements Serializable, Comparable

Metadata for each completion part.

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

Constructor Summary
CreationPartsBean(CreationBean 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 getBrowseText()
           
 String getCreateText()
           
 String getDirective()
           
 FieldCompletion getFieldCompletion()
           
 String getHelpText()
           
 Integer getMaxEntries()
           
 Integer getMinEntries()
           
 CreationBean getOwner()
           
 Part getPart()
           
 String getSearchText()
           
 int hashCode()
          Returns a hash code value for the object.
 boolean isBrowse()
           
 boolean isCreate()
           
 boolean isFreeTextAllowed()
           
 boolean isFreeTextEntry()
           
 boolean isMinMaxAllowed()
           
 boolean isRequired()
           
 boolean isSearch()
           
 boolean isSingleEntry()
           
 void setBrowse(boolean browse)
           
 void setBrowseText(String browseText)
           
 void setCreate(boolean create)
           
 void setCreateText(String createText)
           
 void setDirective(String directive)
           
 void setFieldCompletion(FieldCompletion fieldCompletion)
           
 void setHelpText(String helpText)
           
 void setMaxEntries(int maxEntries)
           
 void setMinEntries(int minEntries)
           
 void setRequired(boolean required)
           
 void setSearch(boolean search)
           
 void setSearchText(String searchText)
           
 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

CreationPartsBean

public CreationPartsBean(CreationBean 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 CreationBean 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)

setBrowse

public void setBrowse(boolean browse)

setCreate

public void setCreate(boolean create)

setRequired

public void setRequired(boolean required)

setSearch

public void setSearch(boolean search)

setBrowseText

public void setBrowseText(String browseText)

setCreateText

public void setCreateText(String createText)

setSearchText

public void setSearchText(String searchText)

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()

isBrowse

public boolean isBrowse()

isCreate

public boolean isCreate()

isRequired

public boolean isRequired()

isSearch

public boolean isSearch()

getBrowseText

public String getBrowseText()

getCreateText

public String getCreateText()

getSearchText

public String getSearchText()

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.