|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hardcode.gdbms.engine.strategies.Strategy
com.hardcode.gdbms.engine.data.db.DelegatingStrategy
public class DelegatingStrategy
Strategy that delegates the execution of the select queries on the underlying data base management system. The result of this delegation is a view created on that system so it's necessary call DataSourceFactory.freeResources() to the views to be removed
Constructor Summary | |
---|---|
DelegatingStrategy(DataSourceFactory dataSourceFactory)
|
Method Summary | |
---|---|
Strategy |
getStrategy(CustomAdapter instr)
Gets the only strategy to execute custom queries |
Strategy |
getStrategy(SelectAdapter instr)
Obtiene la estrategia más adecuada en función de la instrucción a ejecutar y de las condiciones actuales del sistema |
Strategy |
getStrategy(UnionAdapter instr)
Obtiene la estrategia óptima para ejecutar la instrucción de union que se pasa como parámetro |
boolean |
isDelegating()
|
void |
registerView(java.lang.String tableName,
java.lang.String viewName)
associates the gdbms name 'tableName' with the underlaying dbms view name 'viewName'. |
DataSource |
select(SelectAdapter instr)
Realiza una select a partir de la instrucción que se pasa como parámetro |
void |
setDelegating(boolean delegating)
|
Methods inherited from class com.hardcode.gdbms.engine.strategies.Strategy |
---|
custom, union |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DelegatingStrategy(DataSourceFactory dataSourceFactory)
Method Detail |
---|
public void registerView(java.lang.String tableName, java.lang.String viewName)
tableName
- gdbms nameviewName
- view namepublic DataSource select(SelectAdapter instr) throws ExecutionException
Strategy
select
in class Strategy
instr
- Objeto con la información sobre las tablas que entran en
juego en la instrucción, campos, expresiones condicionales, ...
ExecutionException
- The query failedpublic Strategy getStrategy(SelectAdapter instr)
StrategyCriterion
getStrategy
in interface StrategyCriterion
instr
- Instrucción que se desea ejecutar
public Strategy getStrategy(UnionAdapter instr)
StrategyCriterion
getStrategy
in interface StrategyCriterion
instr
- instrucción que se quiere ejecutar
public Strategy getStrategy(CustomAdapter instr)
StrategyCriterion
getStrategy
in interface StrategyCriterion
instr
- root node of the custom query to execute
public boolean isDelegating()
public void setDelegating(boolean delegating)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |