|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.empire.struts2.actionsupport.FormActionSupport
org.apache.empire.struts2.actionsupport.RecordFormActionSupport
org.apache.empire.struts2.actionsupport.RecordActionSupport
public class RecordActionSupport
RecordActionSupport
This class provides functions for form data processing for a given Table or View (DBRowSet).
The record object provided with the constructor will be used to obtain further context specific metadata
such as field options (getFieldOptions) and field accessibility (isFieldReadOnly).
The record object should initially be invalid and not attached to any Table or View (DBRowSet).
Nested Class Summary | |
---|---|
static class |
RecordActionSupport.SessionPersistance
Deprecated. |
Field Summary | |
---|---|
protected static org.slf4j.Logger |
log
|
protected DBRecord |
record
|
protected DBRowSet |
rowset
|
Fields inherited from class org.apache.empire.struts2.actionsupport.RecordFormActionSupport |
---|
persistence |
Fields inherited from class org.apache.empire.struts2.actionsupport.FormActionSupport |
---|
action, propertyName |
Constructor Summary | |
---|---|
RecordActionSupport(ActionBase action,
DBRowSet rowset,
DBRecord record,
RecordActionSupport.SessionPersistance persistence)
Deprecated. |
|
RecordActionSupport(ActionBase action,
DBRowSet rowset,
DBRecord record,
RecordActionSupport.SessionPersistance persistence,
String propertyName)
Deprecated. |
|
RecordActionSupport(ActionBase action,
DBRowSet rowset,
DBRecord record,
SessionPersistence persistence)
|
|
RecordActionSupport(ActionBase action,
DBRowSet rowset,
DBRecord record,
SessionPersistence persistence,
String propertyName)
|
Method Summary | |
---|---|
void |
closeRecord()
Closes the record and releases any allocated session objects |
boolean |
createRecord()
creates a new record. Depending on the persistence setting the record key or the record data will be stored on the session. |
boolean |
deleteRecord()
deletes the current record database. |
boolean |
deleteRecord(Object[] recKey,
boolean newRec)
deletes the record identified by the supplied key from the database. |
DBRecord |
detachRecord()
|
Object[] |
findAnyConflictRecord()
|
List<DBIndex> |
findChangedIndexes()
|
RecordActionSupport.SessionPersistance |
getPersistance()
Deprecated. |
DBRecord |
getRecord()
|
DBRowSet |
getRowset()
|
void |
initReferenceColumns()
sets all required foreign keys for this record. The foreign key values must be supplied with the request. |
boolean |
isLoadBeforeDelete()
|
boolean |
loadFormData()
loads the data from the form into the current record object |
boolean |
loadFormData(Object[] recKey,
boolean insert)
This function load all form date from the request into the record for each record column the following steps are taken 1. |
boolean |
loadRecord()
loads the record either from the supplied item key on the request or from the session. |
void |
loadRecord(Object[] recKey)
loads the record identified by the supplied key from the database |
void |
reloadRecord()
reloads the current record from the session. If persistence is set to Key then the key is obtained from the session and the record is reloaded from the database. |
boolean |
saveChanges()
Updates the record by calling onUpdateRecord and updates the currentKey The update will not be committed, hence the caller must commit or rollback the operation |
void |
setLoadBeforeDelete(boolean loadBeforeDelete)
|
protected boolean |
setRecordFieldValue(int i,
Object value,
boolean verify)
overridable: sets the value of single field |
protected void |
updateRecord(Connection conn)
overridable: onUpdateRecord |
Methods inherited from class org.apache.empire.struts2.actionsupport.RecordFormActionSupport |
---|
compareKey, getActionParamKey, getActionParamNewFlag, getPersistence, getRecordFromSession, getRecordKeyString, getRequestFieldName, hasActionKey, isNewRecord, persistOnSession, removeFromSession, setUpdateFields |
Methods inherited from class org.apache.empire.struts2.actionsupport.FormActionSupport |
---|
addFieldError, getActionParam, getRecordPropertyName, isEnableFieldErrors, setEnableFieldErrors |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.slf4j.Logger log
protected DBRowSet rowset
protected DBRecord record
Constructor Detail |
---|
public RecordActionSupport(ActionBase action, DBRowSet rowset, DBRecord record, SessionPersistence persistence, String propertyName)
public RecordActionSupport(ActionBase action, DBRowSet rowset, DBRecord record, SessionPersistence persistence)
@Deprecated public RecordActionSupport(ActionBase action, DBRowSet rowset, DBRecord record, RecordActionSupport.SessionPersistance persistence, String propertyName)
@Deprecated public RecordActionSupport(ActionBase action, DBRowSet rowset, DBRecord record, RecordActionSupport.SessionPersistance persistence)
Method Detail |
---|
public DBRecord getRecord()
getRecord
in class RecordFormActionSupport
public DBRowSet getRowset()
public boolean isLoadBeforeDelete()
public void setLoadBeforeDelete(boolean loadBeforeDelete)
@Deprecated public RecordActionSupport.SessionPersistance getPersistance()
public boolean createRecord()
public void initReferenceColumns()
public void loadRecord(Object[] recKey)
public boolean loadRecord()
public void reloadRecord()
public boolean deleteRecord(Object[] recKey, boolean newRec)
recKey
- the record keynewRec
- flag indicating whether it is a new unsaved record.
public final boolean deleteRecord()
public boolean loadFormData(Object[] recKey, boolean insert)
public boolean loadFormData()
RecordFormActionSupport
loadFormData
in class RecordFormActionSupport
public boolean saveChanges()
public void closeRecord()
public DBRecord detachRecord()
public final List<DBIndex> findChangedIndexes()
public final Object[] findAnyConflictRecord()
protected void updateRecord(Connection conn)
protected boolean setRecordFieldValue(int i, Object value, boolean verify)
RecordFormActionSupport
setRecordFieldValue
in class RecordFormActionSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |