public class RecordPageElement<T extends DBRecord> extends PageElement
Modifier and Type | Field and Description |
---|---|
protected T |
record |
protected DBRowSet |
rowset |
Constructor and Description |
---|
RecordPageElement(Page page,
DBRowSet rowset,
T record,
String propertyName) |
Modifier and Type | Method and Description |
---|---|
boolean |
canReloadRecord(boolean newRecord)
return true if the record can be restored from the session.
|
void |
closeRecord()
closes a record
|
void |
createRecord()
creates a new record
|
void |
deleteRecord()
deletes a record
|
T |
getRecord() |
String |
getRecordIdParam() |
DBRowSet |
getRowSet() |
void |
loadRecord(Object[] recKey)
loads the record identified by the supplied key from the database
|
void |
loadRecord(String idParam)
loads an existing record
|
protected void |
onInitPage() |
void |
reloadRecord()
loads the record identified by the supplied key from the database
|
boolean |
updateRecord()
updates or inserts the record in the database
|
getConnection, getConnection, getPage, getPropertyName, getSessionObject, onRefreshPage, removeSessionObject, setSessionObject
public T getRecord()
public DBRowSet getRowSet()
public String getRecordIdParam()
protected void onInitPage()
onInitPage
in class PageElement
public boolean canReloadRecord(boolean newRecord)
newRecord
- flag to detect session data for a new reaord otherwise for an existing recordpublic void reloadRecord()
public void loadRecord(Object[] recKey)
public void loadRecord(String idParam)
idParam
- public void createRecord()
public boolean updateRecord()
public void deleteRecord()
public void closeRecord()
Copyright © 2008–2015 Apache Software Foundation. All rights reserved.