public interface Entity extends Remote
Defines four methods corresponding to the basic operations that generally can
be done when managing data:
Classes that implement these methods must ensure that the argument objects passed to the methods are not modified. This interface extends java.rmi.Remote so that methods of this interface can be called using RMI, but this is not required, and instances of objects can be used locally.
| Modifier and Type | Method and Description |
|---|---|
EntityResult |
delete(Hashtable keysValues,
int sessionId)
This method must implement a standard delete operation over the set of
records defined by
keysValues. |
EntityResult |
insert(Hashtable attributesValues,
int sessionId)
This method must implement a standard insert operation with the data
contained in
attributesValues parameter. |
EntityResult |
query(Hashtable keysValues,
Vector attributes,
int sessionId)
This method must implement a standard query operation returning the set
of data that matches the conditions specified by the
keysValues parameter. |
EntityResult |
update(Hashtable attributesValues,
Hashtable keysValues,
int sessionId)
This method must implement a standard update operation with the data
specified in
attributesValues over the set of records
defined by keysValues. |
EntityResult query(Hashtable keysValues, Vector attributes, int sessionId) throws Exception
keysValues parameter. The attributes defines
which attributes (or columns if data is obtained from a database) must be
recovered, and keysValues specifies which set of records
must be recovered.
keysValues - a Hashtable specifying conditions that must comply the set of
records returned. Cannot be null.attributes - a list of columns or attributes that must be recovered for
each record returned. Cannot be null. If empty, all attributes
should be returned.sessionId - a integer identifying the user or session that performs the
action.Exception - if any exception occursEntityResult insert(Hashtable attributesValues, int sessionId) throws Exception
attributesValues parameter.attributesValues - a Hashtable specifying pairs of key-value corresponding to the
attribute (or column of a table in a database) and the value
that must be stored.sessionId - a integer identifying the user or session that performs the
action.Exception - if any exception occursEntityResult update(Hashtable attributesValues, Hashtable keysValues, int sessionId) throws Exception
attributesValues over the set of records
defined by keysValues. So, only the records that comply with
the conditions specified by keysValues will be updated to
the new values specified by attributesValues.
attributesValues - the data for updating the records to. The keys specify the
attributes (or columns) and the values, the values for these
columns.keysValues - the conditions that the records to be updated must fulfill.
The keys specify the attributes (or columns) and the values,
the values for these columns.sessionId - a integer identifying the user or session that performs the
action.Exception - if any exception occursEntityResult delete(Hashtable keysValues, int sessionId) throws Exception
keysValues. So, only the records that
comply with the conditions specified by keysValues will be
deleted.
keysValues - the conditions that the records to be deleted must fulfill.
The keys specify the attributes (or columns) and the values,
the values for these columns.sessionId - a integer identifying the user or session that performs the
action.Exception - if any exception occursCopyright © 2016 Imatia Innovation S.L.. All rights reserved.