|
ColdBox Platform Version 3.7.0 | ||||
FRAMES |
WEB-INF.cftags.componentcoldbox.system.orm.hibernate.BaseBuilder
public class BaseBuilder
Constructor Summary | |
---|---|
init(string entityName, any criteria, any restrictions)
|
Method Summary | |
---|---|
string |
GETENTITYNAME()
|
any |
GETNATIVECRITERIA()
|
void |
SETENTITYNAME(string entityName)
|
any |
add(any criterion)
Add a restriction to constrain the results to be retrieved |
private any |
addProjection([any propertyName], [any projectionType], [any projectionList])
|
any |
convertIDValueToJavaType(any id)
Coverts an ID, list of ID's, or array of ID's values to the proper java type The method returns a coverted array of ID's |
any |
convertValueToJavaType(any propertyName, any value)
Coverts a value to the correct javaType for the property passed in The method returns the value in the proper Java Type |
any |
createAlias(string associationName, string alias, [numeric joinType])
Join an association, assigning an alias to the joined association |
any |
createCriteria(string associationName, [numeric joinType])
Create a new Criteria, "rooted" at the associated entity and using an Inner Join |
private any |
createRestriction(string missingMethodName, struct missingMethodArguments)
|
private void |
normalizeOrder(string sortOrder, boolean ignoreCase)
|
any |
order(string property, [string sortDir='asc'], [boolean ignoreCase='false'])
Add an ordering to the result set, you can add as many as you like |
private struct |
prepareSQLProjection([any rawProjection])
|
any |
resultTransformer([any resultTransformer])
Sets a valid hibernate result transformer: org |
any |
setNativeCriteria(any criteria)
|
any |
setProjection([any projection])
Setup a single or a projection list via native projections class: criteria |
any |
withProjections([string avg], [string count], [string countDistinct], [any distinct], [string groupProperty], [boolean id], [string max], [string min], [string property], [boolean rowCount], [string sum], [any sqlProjection], [any sqlGroupProjection], [any detachedSQLProjection])
Setup projections for this criteria query, you can pass one or as many projection arguments as you like |
Methods inherited from class WEB-INF.cftags.component |
---|
|
Constructor Detail |
---|
public init(string entityName, any criteria, any restrictions)
entityName
criteria
restrictions
Method Detail |
---|
public string GETENTITYNAME()
public any GETNATIVECRITERIA()
public void SETENTITYNAME(string entityName)
entityName
public any add(any criterion)
criterion
- A single or array of criterions to addprivate any addProjection([any propertyName], [any projectionType], [any projectionList])
propertyName
projectionType
projectionList
public any convertIDValueToJavaType(any id)
id
public any convertValueToJavaType(any propertyName, any value)
propertyName
value
public any createAlias(string associationName, string alias, [numeric joinType])
associationName
- The name of the association propertyalias
- The alias to use for this association property on restrictionsjoinType
public any createCriteria(string associationName, [numeric joinType])
associationName
- The name of the association property to root the restrictions withjoinType
private any createRestriction(string missingMethodName, struct missingMethodArguments)
missingMethodName
missingMethodArguments
private void normalizeOrder(string sortOrder, boolean ignoreCase)
sortOrder
ignoreCase
public any order(string property, [string sortDir='asc'], [boolean ignoreCase='false'])
property
- The name of the property to order onsortDir
ignoreCase
- Wether to ignore case or not, defaults to falseprivate struct prepareSQLProjection([any rawProjection])
rawProjection
public any resultTransformer([any resultTransformer])
resultTransformer
- a custom result transform or you can use the included ones: criteria.ALIAS_TO_ENTITY_MAP, criteria.DISTINCT_ROOT_ENTITY, criteria.PROJECTION, criteria.ROOT_ENTITY.public any setNativeCriteria(any criteria)
criteria
public any setProjection([any projection])
projection
public any withProjections([string avg], [string count], [string countDistinct], [any distinct], [string groupProperty], [boolean id], [string max], [string min], [string property], [boolean rowCount], [string sum], [any sqlProjection], [any sqlGroupProjection], [any detachedSQLProjection])
avg
- The name of the property to avg or a list or array of property namescount
- The name of the property to count or a list or array of property namescountDistinct
- The name of the property to count distinct or a list or array of property namesdistinct
- The name of the property to do a distinct on, this can be a single property name a list or an array of property namesgroupProperty
- The name of the property to group by or a list or array of property namesid
- The projected identifier valuemax
- The name of the property to max or a list or array of property namesmin
- The name of the property to min or a list or array of property namesproperty
- The name of the property to do a projected value on or a list or array of property namesrowCount
- Do a row count on the criteriasum
- The name of the property to sum or a list or array of property namessqlProjection
- Do a projection based on arbitrary SQL stringsqlGroupProjection
- Do a projection based on arbitrary SQL string, with groupingdetachedSQLProjection
- Do a projection based on a DetachedCriteria builder config
|
ColdBox Platform Version 3.7.0 | ||||
FRAMES |