|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object velosurf.model.Action
public class Action
This class corresponds to custom update, delete and insert queries.
Field Summary | |
---|---|
protected Database |
db
The database connection. |
private Entity |
entity
The entity this action belongs to. |
private java.lang.String |
name
The name of this action. |
protected java.util.List<java.lang.String> |
paramNames
Parameter names of this action. |
private java.lang.String |
query
Query. |
Constructor Summary | |
---|---|
Action(java.lang.String name,
Entity entity)
Constructor. |
Method Summary | |
---|---|
void |
addParamName(java.lang.String paramName)
Add a parameter name. |
java.util.List<java.lang.Object> |
buildArrayList(java.util.Map<java.lang.String,java.lang.Object> source)
Get the list of values for all parameters. |
Database |
getDB()
Get the database connection. |
Entity |
getEntity()
Gets the parent entity |
java.lang.String |
getName()
Get the name of the action. |
int |
perform(java.util.Map<java.lang.String,java.lang.Object> source)
Executes this action. |
void |
setQuery(java.lang.String query)
Sets the query. |
java.lang.String |
toString()
For debugging purposes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Database db
private Entity entity
private java.lang.String name
protected java.util.List<java.lang.String> paramNames
private java.lang.String query
Constructor Detail |
---|
public Action(java.lang.String name, Entity entity)
name
- nameentity
- entityMethod Detail |
---|
public Entity getEntity()
public void addParamName(java.lang.String paramName)
paramName
- public void setQuery(java.lang.String query)
query
- querypublic int perform(java.util.Map<java.lang.String,java.lang.Object> source) throws java.sql.SQLException
source
- the object on which apply the action
java.sql.SQLException
- an SQL problem occurspublic java.util.List<java.lang.Object> buildArrayList(java.util.Map<java.lang.String,java.lang.Object> source) throws java.sql.SQLException
source
- the ReadOnlyMap
java.sql.SQLException
- thrown by the ReadOnlyMappublic java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Object
public Database getDB()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |