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)
Creates a record page element for the given Table or View
|
RecordPageElement(Page page,
DBRowSet rowset,
T record,
String propertyName)
Creates a record page element for the given Table or View
|
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(PageDefinition page,
String idParam)
loads an existing record the the specified page
|
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, getDefaultPropertyName, getPage, getPropertyName, getSessionObject, onRefreshPage, removeSessionObject, setSessionObject
public RecordPageElement(Page page, DBRowSet rowset, T record, String propertyName)
page
- the page elementrowset
- Table or Viewrecord
- the record object for this page elementpropertyName
- the property name which is used to get and retrieve session informationpublic 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 loadRecord(PageDefinition page, String idParam)
page
- idParam
- public void createRecord()
public boolean updateRecord()
public void deleteRecord()
public void closeRecord()
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.