|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--MonitoredEntities.Persistence
Store and restore the state of entity, entity type and parameter objects on persistent storage. Encapsultes all the code necessary for storing and restoring the state of entity, entity type and parameters objects on persistent storage. This version uses jdbc to connect to mm, a driver to my_sql database.
Constructor Summary | |
Persistence(java.lang.String dbmachine)
Store the machine where the database must be running and conects to it. |
Method Summary | |
void |
connect()
Establish connection with database adaptacao .
|
void |
EDeleteState(java.lang.String meid)
Deletes the state of entity object identified by meid from
persistent storage. |
boolean |
EExist(java.lang.String meid)
Check if the state of entity identified by meid
is stored on database adaptacao . |
java.lang.String |
EGetRef(java.lang.String meid)
Returns the stringified ior of the entity identified by meid . |
java.util.Vector |
ELoadState(java.lang.String meid)
Returns the state of the entity identified by meid
from database adaptacao . |
void |
ESaveState(java.lang.String meid,
java.lang.String ior,
java.lang.String metid,
java.lang.String description,
java.lang.String[] attributes)
Saves the state of a entity object to database adaptacao .
|
void |
ETDeleteState(java.lang.String metid)
Deletes the state of entity type object identified by metid from
persistent storage. |
boolean |
ETExist(java.lang.String metid)
Check if the state of entity type identified by metid
is stored on database adaptacao . |
java.lang.String |
ETGetRef(java.lang.String metid)
Returns the stringified ior of the entity type identified by metid . |
java.lang.Object[] |
ETLoadState(java.lang.String metid)
Returns the state of the entity type identified by metid
from database adaptacao . |
boolean |
ETRIViolate(java.lang.String metid)
Checks if there is entity or parameter objects related to entity type metid .
|
void |
ETSaveState(java.lang.String metid,
java.lang.String ior,
java.lang.String description)
Saves the state of a entity type object to database adaptacao .
|
void |
PDeleteState(java.lang.String pid)
Deletes the state of parameter object identified by pid from
persistent storage. |
boolean |
PExist(java.lang.String pid)
Check if the state of the parameter identified by pid
is stored on database adaptacao . |
java.lang.String |
PGetRef(java.lang.String pid)
Returns the stringified ior of the parameter identified by pid . |
java.util.Vector |
PLoadState(java.lang.String pid)
Returns the state of the parameter identified by pid
from database adaptacao . |
void |
PSaveState(java.lang.String pid,
java.lang.String ior,
java.lang.String metid,
java.lang.String description,
MonitoredEntities.range[] range_list)
Saves the state of a parameter object to database adaptacao .
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Persistence(java.lang.String dbmachine)
adaptacao
that stores the state of resource
event objectsdbmachine
- the name of the machine where database adaptacao
residesMethod Detail |
public void connect()
adaptacao
.
Database adaptacao
must reside on the machine specified
by dbmachine
variable. This database must have a defined user
called fssilva
, password AdAptA
with
access rights to READ, UPDATE, DELETE and ADD tuples to the database tables.public void ETSaveState(java.lang.String metid, java.lang.String ior, java.lang.String description)
adaptacao
.
The state of entity type objects are saved to a table called
entity_type
.public boolean ETRIViolate(java.lang.String metid)
metid
.
This method is used to verify if there will be an relational integrity violation
if entity type identified by metid
is deleted. This is done
by verifying if there is entity or parameter objects related to entity type
meid
.metid
- the identification of the entity type objecttrue
, if there is entity or parameter objects related
to entity type metid
, false
otherwise.public void ETDeleteState(java.lang.String metid)
metid
from
persistent storage.metid
- identification of the entity type object to be deletedpublic boolean ETExist(java.lang.String metid)
metid
is stored on database adaptacao
.metid
- identification of the entity typetrue
if metid
is found and
false
otherwise.public java.lang.String ETGetRef(java.lang.String metid)
metid
.metid
- identification of the entity typepublic java.lang.Object[] ETLoadState(java.lang.String metid)
metid
from database adaptacao
.metid
- identification of the entity typepublic void ESaveState(java.lang.String meid, java.lang.String ior, java.lang.String metid, java.lang.String description, java.lang.String[] attributes)
adaptacao
.
The state of entity objects are saved to a table called
entity
.public void EDeleteState(java.lang.String meid)
meid
from
persistent storage.meid
- identification of the entity object to be deletedpublic boolean EExist(java.lang.String meid)
meid
is stored on database adaptacao
.meid
- identification of the entitytrue
if meid
is found and
false
otherwise.public java.lang.String EGetRef(java.lang.String meid)
meid
.meid
- identification of the entitypublic java.util.Vector ELoadState(java.lang.String meid)
meid
from database adaptacao
.meid
- identification of the entitypublic void PSaveState(java.lang.String pid, java.lang.String ior, java.lang.String metid, java.lang.String description, MonitoredEntities.range[] range_list)
adaptacao
.
The state of parameter objects are saved to a table called
parameter
.public void PDeleteState(java.lang.String pid)
pid
from
persistent storage.pid
- identification of the parameter object to be deletedpublic boolean PExist(java.lang.String pid)
pid
is stored on database adaptacao
.pid
- identification of the parametertrue
if pid
is found and
false
otherwise.public java.lang.String PGetRef(java.lang.String pid)
pid
.pid
- identification of the parameterpublic java.util.Vector PLoadState(java.lang.String pid)
pid
from database adaptacao
.pid
- identification of the parameter
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |