|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcds.sql.SQLRepository
Objects of this class manage parameterized lists of SQL commands,
which are easily available for building complete queries.
Such a repository is kept in a Parameters file, with the following
conventions :
Field Summary | |
static char |
PARAM_CHAR
|
private Parameters |
sqlList
|
Constructor Summary | |
SQLRepository(java.lang.String pname)
Constructor. |
Method Summary | |
java.lang.String |
generate(java.lang.String commandName,
java.util.Hashtable params)
Generates an SQL command. |
java.lang.String |
generate(java.lang.String commandName,
java.lang.String[] params)
Generates an SQL command. |
java.lang.String |
getDescription(java.lang.String commandName)
Returns the description of a command |
java.lang.String |
getParameterAttributes(java.lang.String commandName,
java.lang.String parameter)
Returns the attributes of a particular parameter |
java.lang.String |
getParameterDetail(java.lang.String commandName,
java.lang.String parameter,
java.lang.String attribute)
Valeur d'un attribut du parametre |
java.lang.String[] |
getParameters(java.lang.String commandName)
Returns the list of the parameters |
java.util.ArrayList |
getTablesName(java.lang.String commandName,
java.lang.String paramName)
Liste des tables figurant dans l'attribut type d'un parametre liste de champs |
java.util.Iterator |
interator()
Get an iterator on the commands |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final char PARAM_CHAR
private Parameters sqlList
Constructor Detail |
public SQLRepository(java.lang.String pname)
pname
- file name of a Parameters fileMethod Detail |
public java.lang.String generate(java.lang.String commandName, java.lang.String[] params)
commandName
- name of the sql command in the repositoryparams
- array of the parameters. Each parameter occupies
two consecutive strings containing the parameter name and its value.
The array size must be an even number
public java.lang.String generate(java.lang.String commandName, java.util.Hashtable params)
commandName
- name of the sql command in the repositoryparams
- Hashtable containing the parameters
public java.lang.String getDescription(java.lang.String commandName)
commandName
- name of the sql command in the repository
public java.lang.String[] getParameters(java.lang.String commandName)
commandName
- name of the sql command in the repository
public java.lang.String getParameterAttributes(java.lang.String commandName, java.lang.String parameter)
commandName
- name of the sql template in the repositoryparameter
- a parameter existing in the sql template
public java.util.Iterator interator()
public java.lang.String getParameterDetail(java.lang.String commandName, java.lang.String parameter, java.lang.String attribute)
commandName
- nom de la commandeparameter
- nom du parametreattribute
- attribut du parametre
public java.util.ArrayList getTablesName(java.lang.String commandName, java.lang.String paramName)
commandName
- nom de la commandeparamName
- nom du parametre
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |