public abstract class SQLEntity extends UnicastRemoteObject implements DirectSQLQueryEntity
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTION_EXECUTE_SQL_QUERY
Parameter to set the execute sql permissions in the xml server permission
definition
|
protected DatabaseConnectionManager |
connectionsManager |
protected EntityReferenceLocator |
locator |
ref| Constructor and Description |
|---|
SQLEntity(EntityReferenceLocator locator,
DatabaseConnectionManager dbManager,
int port)
SQL Entity constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkPermissions(int sessionId,
String action) |
EntityResult |
createEntityResultForSessionId(int sessionId) |
EntityResult |
delete(Hashtable keys,
int sessionId)
This method is not allowed in this entity.
|
EntityResult |
execute(String sql,
int sessionId)
Execute the specified sql statement against the database
|
String |
getEntityName() |
EntityResult |
insert(Hashtable values,
int sessionId)
This method is not allowed in this entity.
|
EntityResult |
query(Hashtable keys,
Vector attributes,
int sessionId)
This method is not allowed in this entity.
|
EntityResult |
update(Hashtable values,
Hashtable keys,
int sessionId)
This method is not allowed in this entity.
|
clone, exportObject, exportObject, exportObject, unexportObjectgetClientHost, getLog, setLogpublic static final String ACTION_EXECUTE_SQL_QUERY
protected DatabaseConnectionManager connectionsManager
protected EntityReferenceLocator locator
public SQLEntity(EntityReferenceLocator locator, DatabaseConnectionManager dbManager, int port) throws Exception
locator - Entity reference locator objectdbManager - Database managerport - Port numberExceptionpublic EntityResult query(Hashtable keys, Vector attributes, int sessionId) throws Exception
query in interface Entitykeys - 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 occurspublic EntityResult update(Hashtable values, Hashtable keys, int sessionId) throws Exception
update in interface Entityvalues - the data for updating the records to. The keys specify the
attributes (or columns) and the values, the values for these
columns.keys - 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 occurspublic EntityResult insert(Hashtable values, int sessionId) throws Exception
insert in interface Entityvalues - 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 occurspublic EntityResult delete(Hashtable keys, int sessionId) throws Exception
delete in interface Entitykeys - 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 occurspublic EntityResult createEntityResultForSessionId(int sessionId)
public void checkPermissions(int sessionId,
String action)
throws NotInPeriodException,
GeneralSecurityException,
SessionNotFoundException
public String getEntityName()
public EntityResult execute(String sql, int sessionId) throws Exception
DirectSQLQueryEntityexecute in interface DirectSQLQueryEntitysql - SQL to executesessionId - User session identifierExceptionCopyright © 2016 Imatia Innovation S.L.. All rights reserved.