|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.ontimize.db.SQLEntity
This entity allows to execute a SQL statement directly against a database.
If the application has permissions this entity must have permission for the
action 'Sql_execute_query'
| Field Summary | |
static java.lang.String |
ACTION_EXECUTE_SQL_QUERY
Parameter to set the execute sql permissions in the xml server permission definition |
protected DatabaseConnectionManager |
connectionsManager
|
protected EntityReferenceLocator |
locator
|
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
SQLEntity(EntityReferenceLocator locator,
DatabaseConnectionManager dbManager,
int port)
SQL Entity constructor. |
|
| Method Summary | |
void |
checkPermissions(int sessionId,
java.lang.String action)
|
EntityResult |
createEntityResultForSessionId(int sessionId)
|
EntityResult |
delete(java.util.Hashtable keys,
int sessionId)
This method is not allowed in this entity. |
EntityResult |
execute(java.lang.String sql,
int sessionId)
Execute the specified sql statement against the database |
java.lang.String |
getEntityName()
|
EntityResult |
insert(java.util.Hashtable values,
int sessionId)
This method is not allowed in this entity. |
EntityResult |
query(java.util.Hashtable keys,
java.util.Vector attributes,
int sessionId)
This method is not allowed in this entity. |
EntityResult |
update(java.util.Hashtable values,
java.util.Hashtable keys,
int sessionId)
This method is not allowed in this entity. |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String ACTION_EXECUTE_SQL_QUERY
protected DatabaseConnectionManager connectionsManager
protected EntityReferenceLocator locator
| Constructor Detail |
public SQLEntity(EntityReferenceLocator locator,
DatabaseConnectionManager dbManager,
int port)
throws java.lang.Exception
locator - Entity reference locator objectdbManager - Database managerport - Port number
java.lang.Exception| Method Detail |
public EntityResult query(java.util.Hashtable keys,
java.util.Vector attributes,
int sessionId)
throws java.lang.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.
java.lang.Exception - if any exception occurs
public EntityResult update(java.util.Hashtable values,
java.util.Hashtable keys,
int sessionId)
throws java.lang.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.
java.lang.Exception - if any exception occurs
public EntityResult insert(java.util.Hashtable values,
int sessionId)
throws java.lang.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.
java.lang.Exception - if any exception occurs
public EntityResult delete(java.util.Hashtable keys,
int sessionId)
throws java.lang.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.
java.lang.Exception - if any exception occurspublic EntityResult createEntityResultForSessionId(int sessionId)
public void checkPermissions(int sessionId,
java.lang.String action)
throws NotInPeriodException,
GeneralSecurityException,
SessionNotFoundException
NotInPeriodException
GeneralSecurityException
SessionNotFoundExceptionpublic java.lang.String getEntityName()
public EntityResult execute(java.lang.String sql,
int sessionId)
throws java.lang.Exception
DirectSQLQueryEntity
execute in interface DirectSQLQueryEntitysql - SQL to executesessionId - User session identifier
java.lang.Exception
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||