com.jpattern.orm.crud
Interface CRUDQuery

All Known Implementing Classes:
OrmCRUDQuery

public interface CRUDQuery

Author:
Francesco Cina 22/mag/2011

Method Summary
 String getBaseFromClause()
          Return the name of the table (with the schema name if exists)
 String getBaseSelectClause()
          Return the ordered names of the columns used as alias for the table with the complete table name (with the schema name if exists).
 String getBaseSelectClause(String rowNamePrefix)
          It works like getBaseSelectClause() but instead of using the complete table name as alias it uses a custom prefix to prepend to the column names
 String getBeanVersionQuery()
          If the bean has a version field, it will return the query to retrieve the updated version of the record
 String getDeleteQuery()
          The pregenerated query to delete an entity
 String getExistQuery()
          The pregenerated count query to check if an entity exists
 String getLoadQuery()
          The pregenerated query to load an entity
 String getSaveQuery()
          The pregenerated query to save an entity
 String getSaveQueryWithoutGenerators()
          The pregenerated query to save an entity ignoring the generators if needed
 String getUpdateQuery()
          The pregenerated query to update an entity
 

Method Detail

getLoadQuery

String getLoadQuery()
The pregenerated query to load an entity

Returns:

getSaveQuery

String getSaveQuery()
The pregenerated query to save an entity

Returns:

getSaveQueryWithoutGenerators

String getSaveQueryWithoutGenerators()
The pregenerated query to save an entity ignoring the generators if needed

Returns:

getDeleteQuery

String getDeleteQuery()
The pregenerated query to delete an entity

Returns:

getUpdateQuery

String getUpdateQuery()
The pregenerated query to update an entity

Returns:

getExistQuery

String getExistQuery()
The pregenerated count query to check if an entity exists

Returns:

getBaseSelectClause

String getBaseSelectClause()
Return the ordered names of the columns used as alias for the table with the complete table name (with the schema name if exists). This is used to create custom select query

Returns:

getBaseSelectClause

String getBaseSelectClause(String rowNamePrefix)
It works like getBaseSelectClause() but instead of using the complete table name as alias it uses a custom prefix to prepend to the column names

Parameters:
rowNamePrefix -
Returns:

getBaseFromClause

String getBaseFromClause()
Return the name of the table (with the schema name if exists)

Returns:

getBeanVersionQuery

String getBeanVersionQuery()
If the bean has a version field, it will return the query to retrieve the updated version of the record

Returns:


Copyright © 2013. All Rights Reserved.