it.eng.qbe.model
Class HQLStatement

java.lang.Object
  extended by it.eng.qbe.model.BasicStatement
      extended by it.eng.qbe.model.HQLStatement
All Implemented Interfaces:
IStatement

public class HQLStatement
extends BasicStatement

The Class HQLStatement.


Field Summary
static java.lang.String CONTAINS
          The Constant CONTAINS.
static java.lang.String ENDS_WITH
          The Constant ENDS_WITH.
static java.lang.String EQUALS_OR_GREATER_THAN
          The Constant EQUALS_OR_GREATER_THAN.
static java.lang.String EQUALS_OR_LESS_THAN
          The Constant EQUALS_OR_LESS_THAN.
static java.lang.String EQUALS_TO
          The Constant EQUALS_TO.
static java.lang.String GREATER_THAN
          The Constant GREATER_THAN.
static java.lang.String IS_NULL
          The Constant IS_NULL.
static java.lang.String LESS_THAN
          The Constant LESS_THAN.
static java.lang.String NOT_CONTAINS
          The Constant NOT_CONTAINS.
static java.lang.String NOT_ENDS_WITH
          The Constant NOT_ENDS_WITH.
static java.lang.String NOT_EQUALS_TO
          The Constant NOT_EQUALS_TO.
static java.lang.String NOT_NULL
          The Constant NOT_NULL.
static java.lang.String NOT_STARTS_WITH
          The Constant NOT_STARTS_WITH.
static java.lang.String STARTS_WITH
          The Constant STARTS_WITH.
 
Constructor Summary
protected HQLStatement(IDataMartModel dataMartModel)
          Instantiates a new hQL statement.
protected HQLStatement(IDataMartModel dataMartModel, IQuery query)
          Instantiates a new hQL statement.
 
Method Summary
 java.lang.String buildFromClause(IQuery query)
          Builds the from clause.
 java.lang.String buildGroupByClause(IQuery query)
          Builds the group by clause.
 java.lang.String buildOrderByClause(IQuery query)
          Builds the order by clause.
 java.lang.String buildWhereClause(IQuery query)
          Builds the where clause.
 it.eng.spago.base.SourceBean execute()
          Execute.
 it.eng.spago.base.SourceBean execute(int offset)
          Execute.
 it.eng.spago.base.SourceBean execute(int offset, int fetchSize)
          Execute.
 it.eng.spago.base.SourceBean execute(IQuery query, java.util.Map parameters, int offset, int fetchSize, int maxResults)
          Execute.
 it.eng.spago.base.SourceBean executeWithPagination(int pageNumber, int pageSize)
          Execute with pagination.
 it.eng.spago.base.SourceBean executeWithPagination(int offset, int fetchSize, int maxResults)
          Execute with pagination.
 it.eng.spago.base.SourceBean executeWithPagination(IQuery query, java.util.Map parameters, int pageNumber, int pageSize, int maxResults)
          Execute with pagination.
 java.lang.String getQueryString(IQuery query)
          Gets the query string.
 java.lang.String getQueryString(IQuery query, java.util.Map parameters)
          Gets the query string.
 
Methods inherited from class it.eng.qbe.model.BasicStatement
getDataMartModel, getFetchSize, getMaxResults, getOffset, getParameters, getQuery, getQueryString, setFetchSize, setMaxResults, setOffset, setParameters, setQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EQUALS_TO

public static final java.lang.String EQUALS_TO
The Constant EQUALS_TO.

See Also:
Constant Field Values

NOT_EQUALS_TO

public static final java.lang.String NOT_EQUALS_TO
The Constant NOT_EQUALS_TO.

See Also:
Constant Field Values

GREATER_THAN

public static final java.lang.String GREATER_THAN
The Constant GREATER_THAN.

See Also:
Constant Field Values

EQUALS_OR_GREATER_THAN

public static final java.lang.String EQUALS_OR_GREATER_THAN
The Constant EQUALS_OR_GREATER_THAN.

See Also:
Constant Field Values

LESS_THAN

public static final java.lang.String LESS_THAN
The Constant LESS_THAN.

See Also:
Constant Field Values

EQUALS_OR_LESS_THAN

public static final java.lang.String EQUALS_OR_LESS_THAN
The Constant EQUALS_OR_LESS_THAN.

See Also:
Constant Field Values

STARTS_WITH

public static final java.lang.String STARTS_WITH
The Constant STARTS_WITH.

See Also:
Constant Field Values

NOT_STARTS_WITH

public static final java.lang.String NOT_STARTS_WITH
The Constant NOT_STARTS_WITH.

See Also:
Constant Field Values

ENDS_WITH

public static final java.lang.String ENDS_WITH
The Constant ENDS_WITH.

See Also:
Constant Field Values

NOT_ENDS_WITH

public static final java.lang.String NOT_ENDS_WITH
The Constant NOT_ENDS_WITH.

See Also:
Constant Field Values

NOT_NULL

public static final java.lang.String NOT_NULL
The Constant NOT_NULL.

See Also:
Constant Field Values

IS_NULL

public static final java.lang.String IS_NULL
The Constant IS_NULL.

See Also:
Constant Field Values

CONTAINS

public static final java.lang.String CONTAINS
The Constant CONTAINS.

See Also:
Constant Field Values

NOT_CONTAINS

public static final java.lang.String NOT_CONTAINS
The Constant NOT_CONTAINS.

See Also:
Constant Field Values
Constructor Detail

HQLStatement

protected HQLStatement(IDataMartModel dataMartModel)
Instantiates a new hQL statement.

Parameters:
dataMartModel - the data mart model

HQLStatement

protected HQLStatement(IDataMartModel dataMartModel,
                       IQuery query)
Instantiates a new hQL statement.

Parameters:
dataMartModel - the data mart model
query - the query
Method Detail

buildFromClause

public java.lang.String buildFromClause(IQuery query)
Builds the from clause.

Parameters:
query - the query
Returns:
the string

buildWhereClause

public java.lang.String buildWhereClause(IQuery query)
Builds the where clause.

Parameters:
query - the query
Returns:
the string

buildGroupByClause

public java.lang.String buildGroupByClause(IQuery query)
Builds the group by clause.

Parameters:
query - the query
Returns:
the string

buildOrderByClause

public java.lang.String buildOrderByClause(IQuery query)
Builds the order by clause.

Parameters:
query - the query
Returns:
the string

getQueryString

public java.lang.String getQueryString(IQuery query)
Gets the query string.

Parameters:
query - the query
Returns:
the query string

getQueryString

public java.lang.String getQueryString(IQuery query,
                                       java.util.Map parameters)
                                throws java.io.IOException
Description copied from interface: IStatement
Gets the query string.

Parameters:
query - the query
parameters - the parameters
Returns:
the query string
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

execute

public it.eng.spago.base.SourceBean execute(int offset,
                                            int fetchSize)
                                     throws java.lang.Exception
Description copied from interface: IStatement
Execute.

Parameters:
offset - the offset
fetchSize - the fetch size
Returns:
the source bean
Throws:
java.lang.Exception - the exception

execute

public it.eng.spago.base.SourceBean execute(int offset)
                                     throws java.lang.Exception
Description copied from interface: IStatement
Execute.

Parameters:
offset - the offset
Returns:
the source bean
Throws:
java.lang.Exception - the exception

execute

public it.eng.spago.base.SourceBean execute()
                                     throws java.lang.Exception
Description copied from interface: IStatement
Execute.

Returns:
the source bean
Throws:
java.lang.Exception - the exception

execute

public it.eng.spago.base.SourceBean execute(IQuery query,
                                            java.util.Map parameters,
                                            int offset,
                                            int fetchSize,
                                            int maxResults)
                                     throws java.lang.Exception
Description copied from interface: IStatement
Execute.

Parameters:
query - the query
parameters - the parameters
offset - the offset
fetchSize - the fetch size
maxResults - the max results
Returns:
the source bean
Throws:
java.lang.Exception - the exception

executeWithPagination

public it.eng.spago.base.SourceBean executeWithPagination(int offset,
                                                          int fetchSize,
                                                          int maxResults)
                                                   throws java.lang.Exception
Description copied from interface: IStatement
Execute with pagination.

Parameters:
offset - the offset
fetchSize - the fetch size
maxResults - the max results
Returns:
the source bean
Throws:
java.lang.Exception - the exception

executeWithPagination

public it.eng.spago.base.SourceBean executeWithPagination(int pageNumber,
                                                          int pageSize)
                                                   throws java.lang.Exception
Description copied from interface: IStatement
Execute with pagination.

Parameters:
pageNumber - the page number
pageSize - the page size
Returns:
the source bean
Throws:
java.lang.Exception - the exception

executeWithPagination

public it.eng.spago.base.SourceBean executeWithPagination(IQuery query,
                                                          java.util.Map parameters,
                                                          int pageNumber,
                                                          int pageSize,
                                                          int maxResults)
                                                   throws java.lang.Exception
Description copied from interface: IStatement
Execute with pagination.

Parameters:
query - the query
parameters - the parameters
pageNumber - the page number
pageSize - the page size
maxResults - the max results
Returns:
the source bean
Throws:
java.lang.Exception - the exception