se.unlogic.standardutils.dao
Class LowLevelQuery<T>

java.lang.Object
  extended by se.unlogic.standardutils.dao.RelationQuery
      extended by se.unlogic.standardutils.dao.LowLevelQuery<T>

public class LowLevelQuery<T>
extends RelationQuery

This class represents a SQL query and is used together with the AnnotatedDAO class.

A low level query lets you write the SQL and set any parameters in contrast to the HighLevelQuery.

The SQL query is written like a normal prepared statement with '?' chars representing the parameters to be set.

The parameters will be set on the prepared statement using the "class -> method mapping" in the PreparedStatementQueryMethods class.
Basically this means that any parameter that has a set method matching it's type in the PreparedStatement interface will work.

Author:
Robert "Unlogic" Olofsson (unlogic@unlogic.se)

Constructor Summary
LowLevelQuery()
           
 
Method Summary
 void addChainedResultSetPopulator(ChainedResultSetPopulator<T>... chainedPopulators)
           
 void addChainedResultSetPopulator(ChainedResultSetPopulator<T> chainedPopulator)
           
 void addChainedResultSetPopulator(List<ChainedResultSetPopulator<T>> chainedPopulators)
           
 void addGeneratedKeyCollector(GeneratedKeyCollector... keyCollectors)
           
 void addGeneratedKeyCollector(GeneratedKeyCollector keyCollector)
           
 void addGeneratedKeyCollector(List<GeneratedKeyCollector> keyCollectors)
           
 void addParameter(Object parameter)
           
 void addParameters(List<?> parameters)
           
 void addParameters(Object... parameters)
           
 List<ChainedResultSetPopulator<T>> getChainedResultSetPopulators()
           
 List<GeneratedKeyCollector> getGeneratedKeyCollectors()
           
 List<Object> getParameters()
           
 String getSql()
           
 boolean hasChainedBeanResultSetPopulators()
           
 void setParameters(List<Object> parameters)
           
 void setSql(String sql)
           
 
Methods inherited from class se.unlogic.standardutils.dao.RelationQuery
addExcludedRelation, addExcludedRelations, addExcludedRelations, addExcludedRelations, addRelation, addRelations, addRelations, addRelations, containsExcludedRelation, containsRelation, disableAutoRelations, getExcludedRelations, getRelations, hasExcludedRelations, hasExcludedRelations, hasRelations, hasRelations, isDisableAutoRelations, setExcludedRelations, setRelations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LowLevelQuery

public LowLevelQuery()
Method Detail

getSql

public String getSql()

setSql

public void setSql(String sql)

getParameters

public List<Object> getParameters()

setParameters

public void setParameters(List<Object> parameters)

addParameter

public void addParameter(Object parameter)

addParameters

public void addParameters(Object... parameters)

addParameters

public void addParameters(List<?> parameters)

addGeneratedKeyCollector

public void addGeneratedKeyCollector(GeneratedKeyCollector keyCollector)

addGeneratedKeyCollector

public void addGeneratedKeyCollector(List<GeneratedKeyCollector> keyCollectors)

addGeneratedKeyCollector

public void addGeneratedKeyCollector(GeneratedKeyCollector... keyCollectors)

getGeneratedKeyCollectors

public List<GeneratedKeyCollector> getGeneratedKeyCollectors()

addChainedResultSetPopulator

public void addChainedResultSetPopulator(ChainedResultSetPopulator<T> chainedPopulator)

addChainedResultSetPopulator

public void addChainedResultSetPopulator(List<ChainedResultSetPopulator<T>> chainedPopulators)

addChainedResultSetPopulator

public void addChainedResultSetPopulator(ChainedResultSetPopulator<T>... chainedPopulators)

getChainedResultSetPopulators

public List<ChainedResultSetPopulator<T>> getChainedResultSetPopulators()

hasChainedBeanResultSetPopulators

public boolean hasChainedBeanResultSetPopulators()


Copyright © 2011. All Rights Reserved.