|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.irisel.sv.faces.mgdbeans.BaseMB
public abstract class BaseMB
Constructor Summary | |
---|---|
BaseMB()
If clbrowser is null, initializes it as new CLGuiomBrowser. |
|
BaseMB(CLBrowser clbrowser,
java.lang.String classname)
Sets the clbrowser and does the initializations: Initializes logger, instance, and if there is a FacesContext, request and session. |
Method Summary | |
---|---|
void |
delete(boolean soft)
Deletes this instance from the database |
java.lang.Object |
get(java.lang.String key)
Returns the value for an attribute of this object's instance |
long |
getId()
|
Instance |
getInstance()
|
java.lang.String |
getName()
|
void |
load(JSONObject obj)
Loads from the given JSON to this object for the class given by getClassname(), each property is read and copied from the json obj. |
void |
load(long oid)
Loads the instance from database into this object, uses the classname associated to the object which is implemented by the abstract getClassname(). |
void |
load(java.lang.String name)
Loads from the database to this object, the record given by "name" for the class given by getClassname() |
void |
logout()
|
static void |
main(java.lang.String[] args)
|
void |
save()
Saves this object to database. |
void |
set(java.lang.String key,
java.lang.Object value)
Sets the value for the given attribute |
void |
setInstance(Instance inst)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseMB() throws java.lang.Exception
java.lang.Exception
public BaseMB(CLBrowser clbrowser, java.lang.String classname) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public Instance getInstance()
public void setInstance(Instance inst)
public void logout()
public void load(long oid) throws java.rmi.RemoteException, java.sql.SQLException, DataException
oid
- is the primary key of the instance
java.rmi.RemoteException
java.sql.SQLException
DataException
public void load(java.lang.String name) throws java.rmi.RemoteException, java.sql.SQLException, DataException
name
-
java.rmi.RemoteException
java.sql.SQLException
DataException
public void load(JSONObject obj) throws java.lang.Exception
obj
- is the JSON representation of the object
java.rmi.RemoteException
java.sql.SQLException
DataException
java.lang.Exception
public long getId()
public java.lang.String getName()
public void save() throws QuerySaveException, java.rmi.RemoteException, java.sql.SQLException, DataException
QuerySaveException
java.rmi.RemoteException
java.sql.SQLException
DataException
public java.lang.Object get(java.lang.String key)
key
- the name of the attribute
public void set(java.lang.String key, java.lang.Object value)
key
- name of the attributevalue
- public static void main(java.lang.String[] args)
args
- public void delete(boolean soft) throws java.rmi.RemoteException, java.sql.SQLException, DataException
soft
- will flag the record as deleted, without actually deleting it
java.rmi.RemoteException
java.sql.SQLException
DataException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |