org.apache.ojb.broker.accesslayer.sql
Interface SqlGenerator

All Known Implementing Classes:
SqlGeneratorDefaultImpl

public interface SqlGenerator

This interface defines the behaviour of an SqlGenartor component that is responsible for building sql statements.

Version:
$Id: SqlGenerator.java,v 1.1 2007-08-24 22:17:39 ewestfal Exp $
Author:
Thomas Mahler

Method Summary
 String getDeleteMNStatement(String table, String[] pkColumns1, String[] pkColumns2)
          generate a DELETE-Statement for M:N indirection table
 String getInsertMNStatement(String table, String[] pkColumns1, String[] pkColumns2)
          generate an INSERT-Statement for M:N indirection table
 Platform getPlatform()
          Answer the Platform used by the SqlGenerator
 SqlStatement getPreparedDeleteStatement(ClassDescriptor cld)
          generate a prepared DELETE-Statement for the Class described by cld.
 SqlStatement getPreparedDeleteStatement(Query query, ClassDescriptor cld)
          generate a prepared DELETE-Statement according to query
 SqlStatement getPreparedInsertStatement(ClassDescriptor cld)
          generate a prepared INSERT-Statement for the Class described by mif.
 SelectStatement getPreparedSelectByPkStatement(ClassDescriptor cld)
          generate a prepared SELECT-Statement for the Class described by cld
 SelectStatement getPreparedSelectStatement(Query query, ClassDescriptor cld)
          generate a select-Statement according to query
 SqlStatement getPreparedUpdateStatement(ClassDescriptor cld)
          generate a prepared UPDATE-Statement for the Class described by cld
 String getSelectMNStatement(String table, String[] selectColumns, String[] columns)
          generate a SELECT-Statement for M:N indirection table
 SelectStatement getSelectStatementDep(Query query, ClassDescriptor cld)
          generate a select-Statement according to query
 

Method Detail

getInsertMNStatement

String getInsertMNStatement(String table,
                            String[] pkColumns1,
                            String[] pkColumns2)
generate an INSERT-Statement for M:N indirection table

Parameters:
table -
pkColumns1 -
pkColumns2 -
Returns:
String

getSelectMNStatement

String getSelectMNStatement(String table,
                            String[] selectColumns,
                            String[] columns)
generate a SELECT-Statement for M:N indirection table

Parameters:
table - the indirection table
selectColumns - selected columns
columns - for where

getDeleteMNStatement

String getDeleteMNStatement(String table,
                            String[] pkColumns1,
                            String[] pkColumns2)
generate a DELETE-Statement for M:N indirection table

Parameters:
table -
pkColumns1 -
pkColumns2 -
Returns:
String

getPreparedSelectStatement

SelectStatement getPreparedSelectStatement(Query query,
                                           ClassDescriptor cld)
generate a select-Statement according to query

Parameters:
query - the Query
cld - the ClassDescriptor

getSelectStatementDep

SelectStatement getSelectStatementDep(Query query,
                                      ClassDescriptor cld)
generate a select-Statement according to query

Parameters:
query - the Query
cld - the ClassDescriptor

getPreparedDeleteStatement

SqlStatement getPreparedDeleteStatement(Query query,
                                        ClassDescriptor cld)
generate a prepared DELETE-Statement according to query

Parameters:
query - the Query
cld - the ClassDescriptor

getPreparedDeleteStatement

SqlStatement getPreparedDeleteStatement(ClassDescriptor cld)
generate a prepared DELETE-Statement for the Class described by cld.

Parameters:
cld - the ClassDescriptor

getPreparedInsertStatement

SqlStatement getPreparedInsertStatement(ClassDescriptor cld)
generate a prepared INSERT-Statement for the Class described by mif.

Parameters:
cld - the ClassDescriptor

getPreparedSelectByPkStatement

SelectStatement getPreparedSelectByPkStatement(ClassDescriptor cld)
generate a prepared SELECT-Statement for the Class described by cld

Parameters:
cld - the ClassDescriptor

getPreparedUpdateStatement

SqlStatement getPreparedUpdateStatement(ClassDescriptor cld)
generate a prepared UPDATE-Statement for the Class described by cld

Parameters:
cld - the ClassDescriptor

getPlatform

Platform getPlatform()
Answer the Platform used by the SqlGenerator

Returns:
Platform


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.