|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.keel.services.model.StandardModel
org.keel.services.model.StandardLogEnabledModel
org.keel.services.model.SecurableStandardLogEnabledModel
org.keel.apps.crud.models.CrudBase
Base class for all "crud". This class provides the execute() method which all subclasses need to override.
| Field Summary | |
protected static java.lang.String |
ADD |
private boolean |
countRecords |
protected static java.lang.String |
CRUD |
private java.lang.String |
currentDomainName |
private int |
currentPage |
private Persistent |
currentPersistent |
private java.lang.String |
currentPersistentName |
protected static java.lang.String |
DELETE |
private int |
endRecord |
private java.util.Map |
fixedFields |
private java.lang.String |
fixedFieldsParam |
protected static java.lang.String |
LIST |
private Output |
masterDetail |
protected boolean |
noPaging |
protected java.lang.String |
prefix |
protected static java.lang.String |
PROMPT |
protected static java.lang.String |
PROMPT_ADD |
protected static java.lang.String |
PROMPT_QUERY |
protected static java.lang.String |
PROMPT_UPDATE |
protected static java.lang.String |
QUERY |
protected static java.lang.String |
SELECT_PERSISTENT |
private boolean |
showNext |
private boolean |
showPrev |
private java.lang.String |
sortFieldsParam |
private int |
startRecord |
protected java.lang.String |
suffix |
protected static java.lang.String |
UPDATE |
| Fields inherited from class org.keel.services.model.SecurableStandardLogEnabledModel |
|
| Fields inherited from class org.keel.services.model.StandardLogEnabledModel |
log |
| Fields inherited from class org.keel.services.model.StandardModel |
configuration |
| Fields inherited from interface org.keel.services.model.Model |
ROLE |
| Constructor Summary | |
CrudBase() |
|
| Method Summary | |
protected void |
addCriteria(Command c, ModelRequest req)Fetch the search criteria from the context, and then add each search criteria element to the given command |
protected void |
addParameters(Command c) |
protected boolean |
countRecords()Return true if configuration indicates that we count records. |
protected java.lang.String |
decode(java.lang.String orig)Remove %20 from a string replacing it with spaces |
ModelResponse |
execute(ModelRequest req)All of the sub-classes of this class extend the execute method to perform their functionality. |
protected int |
getCurrentPage(ModelRequest req)Returns the currentPage. |
protected int |
getEndRecord()Returns the endRecord. |
protected java.util.Map |
getFixedFields()Returns the fixedFields. |
protected Output |
getMasterDetail()Returns the masterDetail. |
protected int |
getPageNumber(ModelRequest req)Parse out the currently requested page number |
protected Persistent |
getPersistent(ModelRequest req)Given a class name that contains a Persistent, instantiate an instance of the object & return it. |
protected java.lang.String |
getPersistentName() |
protected void |
getPrefixes(ModelRequest req) |
protected java.lang.String |
getSortFieldsParam() |
protected int |
getStartRecord()Returns the startRecord. |
protected boolean |
isShowNext()Returns the showNext. |
protected boolean |
isShowPrev()Returns the showPrev. |
protected void |
saveSettings(ModelRequest req) |
protected void |
setCurrentPage(int currentPage)Sets the currentPage. |
protected void |
setEndRecord(int endRecord)Sets the endRecord. |
private void |
setFixedFields() |
protected void |
setShowNext(boolean showNext)Sets the showNext. |
protected void |
setShowPrev(boolean showPrev)Sets the showPrev. |
protected void |
setStartRecord(int startRecord)Sets the startRecord. |
protected void |
showEditLink(ModelRequest req, ModelResponse res, java.lang.String fieldName, java.lang.String oneFieldValue, Persistent currentRecord, Output myElement)Write a hyperlink command that allows edit of the current key |
protected void |
showOptions(ModelRequest req, ModelResponse res)Display a small table of icons giving the user the option to proceed directly to a search, add, or list function from this form. |
protected void |
showUserName(ModelRequest req, ModelResponse res, java.lang.String theDescrip) |
| Methods inherited from class org.keel.services.model.SecurableStandardLogEnabledModel |
getAuthorizationManager, setAuthorizationManager |
| Methods inherited from class org.keel.services.model.StandardLogEnabledModel |
enableLogging |
| Methods inherited from class org.keel.services.model.StandardModel |
configure, getConfiguration |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static java.lang.String CRUD
protected static java.lang.String QUERY
protected static java.lang.String DELETE
protected static java.lang.String PROMPT
protected static java.lang.String PROMPT_ADD
protected static java.lang.String UPDATE
protected static java.lang.String PROMPT_UPDATE
protected static java.lang.String ADD
protected static java.lang.String LIST
protected static java.lang.String PROMPT_QUERY
protected static java.lang.String SELECT_PERSISTENT
private Persistent currentPersistent
private java.lang.String currentDomainName
private java.lang.String currentPersistentName
private java.lang.String fixedFieldsParam
private java.util.Map fixedFields
private java.lang.String sortFieldsParam
private int currentPage
private int startRecord
private int endRecord
private boolean showPrev
private boolean showNext
private Output masterDetail
private boolean countRecords
protected boolean noPaging
protected java.lang.String prefix
protected java.lang.String suffix
| Constructor Detail |
public CrudBase()
| Method Detail |
protected java.lang.String getSortFieldsParam()
protected int getCurrentPage(ModelRequest req)
protected boolean countRecords()
protected int getEndRecord()
protected java.util.Map getFixedFields()
protected int getStartRecord()
protected void setCurrentPage(int currentPage)
currentPage - The currentPage to setprotected void setEndRecord(int endRecord)
endRecord - The endRecord to setprotected void setStartRecord(int startRecord)
startRecord - The startRecord to setprotected Output getMasterDetail()
protected boolean isShowNext()
protected boolean isShowPrev()
protected void setShowNext(boolean showNext)
showNext - The showNext to setprotected void setShowPrev(boolean showPrev)
showPrev - The showPrev to setprotected java.lang.String decode(java.lang.String orig)
orig - Original stringprotected void getPrefixes(ModelRequest req)
public ModelResponse execute(ModelRequest req)
throws ModelException
ModelException
protected void saveSettings(ModelRequest req)
throws PersistenceException,
ModelException
PersistenceExceptionModelException
protected void showOptions(ModelRequest req,
ModelResponse res)
throws PersistenceException,
ModelException
PersistenceException - If an error occurrs determining what functions this user is allowed to performControllerExceptionModelException
protected void showUserName(ModelRequest req,
ModelResponse res,
java.lang.String theDescrip)
throws ModelException
theDescrip -ControllerExceptionModelExceptionprotected java.lang.String getPersistentName()
protected Persistent getPersistent(ModelRequest req)
throws ModelException,
PersistenceException
req - The ModelRequestPersistenceException - if the object cannot be created or set upModelException
protected int getPageNumber(ModelRequest req)
throws ModelException
ModelException
private void setFixedFields()
throws PersistenceException
PersistenceException
protected void showEditLink(ModelRequest req,
ModelResponse res,
java.lang.String fieldName,
java.lang.String oneFieldValue,
Persistent currentRecord,
Output myElement)
throws PersistenceException,
ModelException
fieldName - The name of the field to have the hyperlinkoneFieldValue - The value of the fieldcurrentRecord - A Persistent of the current recordmyElement - The cell in the table representing the current field of the current recordPersistenceException - If the information to build the link cannot be retrieved from the persistentModelExceptionprotected void addParameters(Command c)
protected void addCriteria(Command c,
ModelRequest req)
|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||