org.castor.cpa.persistence.sql.query.visitor
Class SQLServerQueryVisitor

java.lang.Object
  extended by org.castor.cpa.persistence.sql.query.visitor.DefaultQueryVisitor
      extended by org.castor.cpa.persistence.sql.query.visitor.DefaultDoubleQuoteNameQueryVisitor
          extended by org.castor.cpa.persistence.sql.query.visitor.SQLServerQueryVisitor
All Implemented Interfaces:
Visitor

public final class SQLServerQueryVisitor
extends DefaultDoubleQuoteNameQueryVisitor

Visitor defining special behavior of query building for SQLServer database.

Version:
$Revision: 8994 $ $Date: 2011-08-02 01:40:59 +0200 (Di, 02 Aug 2011) $
Author:
Dennis Butterstein, Ralf Joachim

Field Summary
 
Fields inherited from class org.castor.cpa.persistence.sql.query.visitor.DefaultQueryVisitor
_queryString, LOG
 
Constructor Summary
SQLServerQueryVisitor()
           
 
Method Summary
protected  void addTableNames(Qualifier qualifier)
          Method adding table-names in case of joins.
protected  String quoteName(String name)
          Method returning prepared string to match requirements of specific databases if needed.
 void visit(Select select)
          Visit method to handle select elements.
 
Methods inherited from class org.castor.cpa.persistence.sql.query.visitor.DefaultDoubleQuoteNameQueryVisitor
doubleQuoteName
 
Methods inherited from class org.castor.cpa.persistence.sql.query.visitor.DefaultQueryVisitor
getSequenceNextValString, handleJoinConstruction, handleLock, toString, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLServerQueryVisitor

public SQLServerQueryVisitor()
Method Detail

visit

public void visit(Select select)
Visit method to handle select elements.

Specified by:
visit in interface Visitor
Overrides:
visit in class DefaultQueryVisitor
Parameters:
select - Select object to be handled.

addTableNames

protected void addTableNames(Qualifier qualifier)
Method adding table-names in case of joins. Normal table => Adding table name only, Aliased table => adding table name SPACE table alias.

Overrides:
addTableNames in class DefaultQueryVisitor
Parameters:
qualifier - Qualifier to add names from

quoteName

protected String quoteName(String name)
Method returning prepared string to match requirements of specific databases if needed.

Overrides:
quoteName in class DefaultQueryVisitor
Parameters:
name - String to be prepared.
Returns:
Prepared string.


Copyright © 2012. All Rights Reserved.