com.scooterframework.orm.activerecord
Class IncludeHelper

java.lang.Object
  extended by com.scooterframework.orm.activerecord.IncludeHelper

public class IncludeHelper
extends java.lang.Object

IncludeHelper class has helper methods for SQL queries with include option.


Field Summary
static java.lang.String INCLUDE_LINK
           
static java.lang.String JOIN_TYPE_INNER
           
static java.lang.String JOIN_TYPE_LEFT_OUTER
           
 
Method Summary
 java.lang.String getConstructedJoinQuery()
          Returns join part of select query.
 java.util.Map<java.lang.String,java.lang.Object> getConstructedSqlQuery()
          Constructs a SQL query for the include case.
 java.util.List<ActiveRecord> organizeData(TableData retrievedTableData)
          Organizes raw data retrieved from database into a list of associated ActiveRecord instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JOIN_TYPE_INNER

public static final java.lang.String JOIN_TYPE_INNER
See Also:
Constant Field Values

JOIN_TYPE_LEFT_OUTER

public static final java.lang.String JOIN_TYPE_LEFT_OUTER
See Also:
Constant Field Values

INCLUDE_LINK

public static final java.lang.String INCLUDE_LINK
See Also:
Constant Field Values
Method Detail

getConstructedSqlQuery

public java.util.Map<java.lang.String,java.lang.Object> getConstructedSqlQuery()
Constructs a SQL query for the include case.

Returns:
a Map containing both the SQL and input data

getConstructedJoinQuery

public java.lang.String getConstructedJoinQuery()
Returns join part of select query.

Returns:
a SQL fragment for join

organizeData

public java.util.List<ActiveRecord> organizeData(TableData retrievedTableData)
Organizes raw data retrieved from database into a list of associated ActiveRecord instances.

Parameters:
retrievedTableData - TableData from database
Returns:
List of associated records.