coldbox.system.orm.hibernate

Class CriteriaBuilder

WEB-INF.cftags.component
        extended by coldbox.system.orm.hibernate.BaseBuilder
            extended by coldbox.system.orm.hibernate.CriteriaBuilder
Class Attributes:
  • accessors : true
  •  
    Property Summary
    type property default serializable required
    array criterias


    true false
    string queryCacheRegion


    criterias.{entityName} true false
    boolean useQueryCaching


    false true false
    Constructor Summary
    init(string entityName, [boolean useQueryCaching='false'], [string queryCacheRegion=''], any ORMService)
    Method Summary
    array GETCRITERIAS()
    string GETQUERYCACHEREGION()
    boolean GETUSEQUERYCACHING()
    CriteriaBuilder SETCRITERIAS(array criterias)
    CriteriaBuilder SETQUERYCACHEREGION(string queryCacheRegion)
    CriteriaBuilder SETUSEQUERYCACHING(boolean useQueryCaching)
    any cache(boolean cache='true', [string cacheRegion])
    any cacheRegion(string cacheRegion)
    numeric count([any propertyName=''])
         Get the record count using hibernate projections for the given criterias.
    any createSubcriteria(string entityName, [string alias=''])
    any fetchSize(numeric fetchSize)
    any firstResult(numeric firstResult)
    any get()
    private any getORMUtil()
         Get ORM Util.
    any list([numeric offset='0'], [numeric max='0'], [numeric timeout='0'], [string sortOrder=''], [boolean ignoreCase='false'], [boolean asQuery='false'])
         Execute the criteria queries you have defined and return the results, you can pass optional parameters or define them via our methods.
    any maxResults(numeric maxResults)
    any onMissingMethod(string missingMethodName, struct missingMethodArguments)
    any readOnly([boolean readOnly='true'])
    any timeout(numeric timeout)
     
    Methods inherited from class coldbox.system.orm.hibernate.BaseBuilder
    GETENTITYNAME, GETEVENTMANAGER, GETNATIVECRITERIA, GETSQLLOGGERACTIVE, SETEVENTMANAGER, SETSQLLOGGERACTIVE, add, addProjection, canLogSql, convertIDValueToJavaType, convertValueToJavaType, createAlias, createCriteria, createRestriction, getPositionalSQLParameterTypes, getPositionalSQLParameterValues, getPositionalSQLParameters, getSQL, getSQLLog, hasProjection, logSQL, normalizeOrder, order, prepareSQLProjection, resultTransformer, setEntityName, setNativeCriteria, setProjection, startSqlLog, stopSqlLog, withProjections
     
    Methods inherited from class WEB-INF.cftags.component
    None

    Constructor Detail

    init

    public init(string entityName, [boolean useQueryCaching='false'], [string queryCacheRegion=''], any ORMService)

    Parameters:
    entityName
    useQueryCaching
    queryCacheRegion
    ORMService

    Property Detail

    criterias

    property array criterias

    Attributes:
    serializable - true
    required - false

    queryCacheRegion

    property string queryCacheRegion = [criterias.{entityName}]

    Attributes:
    serializable - true
    required - false

    useQueryCaching

    property boolean useQueryCaching = [false]

    Attributes:
    serializable - true
    required - false

    Method Detail

    GETCRITERIAS

    public array GETCRITERIAS()


    GETQUERYCACHEREGION

    public string GETQUERYCACHEREGION()


    GETUSEQUERYCACHING

    public boolean GETUSEQUERYCACHING()


    SETCRITERIAS

    public CriteriaBuilder SETCRITERIAS(array criterias)

    Parameters:
    criterias

    SETQUERYCACHEREGION

    public CriteriaBuilder SETQUERYCACHEREGION(string queryCacheRegion)

    Parameters:
    queryCacheRegion

    SETUSEQUERYCACHING

    public CriteriaBuilder SETUSEQUERYCACHING(boolean useQueryCaching)

    Parameters:
    useQueryCaching

    cache

    public any cache(boolean cache='true', [string cacheRegion])

    Parameters:
    cache
    cacheRegion

    cacheRegion

    public any cacheRegion(string cacheRegion)

    Parameters:
    cacheRegion

    count

    public numeric count([any propertyName=''])

    Get the record count using hibernate projections for the given criterias

    Parameters:
    propertyName - The name of the property to do the count on or do it for all row results instead

    createSubcriteria

    public any createSubcriteria(string entityName, [string alias=''])

    Parameters:
    entityName
    alias

    fetchSize

    public any fetchSize(numeric fetchSize)

    Parameters:
    fetchSize

    firstResult

    public any firstResult(numeric firstResult)

    Parameters:
    firstResult

    get

    public any get()


    getORMUtil

    private any getORMUtil()

    Get ORM Util


    list

    public any list([numeric offset='0'], [numeric max='0'], [numeric timeout='0'], [string sortOrder=''], [boolean ignoreCase='false'], [boolean asQuery='false'])

    Execute the criteria queries you have defined and return the results, you can pass optional parameters or define them via our methods

    Parameters:
    offset
    max
    timeout
    sortOrder
    ignoreCase
    asQuery

    maxResults

    public any maxResults(numeric maxResults)

    Parameters:
    maxResults

    onMissingMethod

    public any onMissingMethod(string missingMethodName, struct missingMethodArguments)

    Parameters:
    missingMethodName
    missingMethodArguments

    readOnly

    public any readOnly([boolean readOnly='true'])

    Parameters:
    readOnly

    timeout

    public any timeout(numeric timeout)

    Parameters:
    timeout