|
ColdBox Platform Version 3.7.0 | ||||
FRAMES |
WEB-INF.cftags.componentcoldbox.system.orm.hibernate.BaseORMService
coldbox.system.orm.hibernate.VirtualEntityService
public class VirtualEntityService
******************************************************************************* Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.coldbox.org | www.luismajano.com | www.ortussolutions.com ******************************************************************************* Author : Curt Gratz & Luis Majano Description : This is a Virtual Entity Service that extends the Coldbox BaseORMService to provide easy access to creating virtual services that extend the BaseORMService For example, if you want a UserService, you can either create an object based off this object if no additional functionality is needed like this: UserService=CreateObject("component", "coldbox.system.orm.hibernate.VirtualEntityService").init("User"); You can also use this virtual service as a template object and extend and override as needed. import coldbox.system.orm.hibernate.*; component extends="VirtualEntityService" UserService function init(){ // setup properties setEntityName('User'); setQueryCacheRegion( "#arguments.entityName#.defaultVSCache" ); setUseQueryCaching( false ); setEventHandling( false ); setDefaultAsQuery( true ); return this; }
Constructor Summary | |
---|---|
init(string entityname, [string queryCacheRegion], [boolean useQueryCaching], [boolean eventHandling], [boolean useTransactions], [boolean defaultAsQuery], [string datasource])
*********************************** CONSTRUCTOR ******************************************** |
Method Summary | |
---|---|
string |
GETDATASOURCE()
get: The datasource property for this "version" of the Virtual Service |
string |
GETENTITYNAME()
get: The entityName property for this "version" of the Virtual Service |
void |
SETDATASOURCE(string datasource)
set: The datasource property for this "version" of the Virtual Service |
void |
SETENTITYNAME(string entityName)
set: The entityName property for this "version" of the Virtual Service |
void |
clear([string datasource='[runtime expression]'])
|
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 |
numeric |
count([string where=''], [any params='[runtime expression]'])
|
numeric |
countWhere()
|
numeric |
criteriaCount([array criteria='[runtime expression]'])
|
any |
criteriaQuery([array criteria='[runtime expression]'], [string sortOrder=''], [numeric offset='0'], [numeric max='0'], [numeric timeout='0'], [boolean ignoreCase='false'], [boolean asQuery='[runtime expression]'])
|
numeric |
deleteAll([boolean flush='false'], [boolean transactional='[runtime expression]'])
|
boolean |
deleteByID(any id, [boolean flush='false'], [boolean transactional='[runtime expression]'])
|
any |
deleteByQuery(string query, [any params], [numeric max='0'], [numeric offset='0'], [boolean flush='false'], [boolean transactional='[runtime expression]'])
|
numeric |
deleteWhere([boolean transactional='[runtime expression]'])
|
void |
evict([string collectionName], [any id])
|
any |
executeQuery(string query, [any params='[runtime expression]'], [numeric offset='0'], [numeric max='0'], [numeric timeout='0'], [boolean ignorecase='false'], [boolean asQuery='[runtime expression]'], [boolean unique='false'])
*********************************** PUBLIC ******************************************** |
boolean |
exists(any id)
|
array |
findAllWhere(struct criteria, [string sortOrder=''])
|
any |
findWhere(struct criteria)
|
any |
get(any id, [boolean returnNew='true'])
|
array |
getAll([any id], [string sortOrder=''])
|
string |
getKey()
|
array |
getPropertyNames()
|
struct |
getSessionStatistics([string datasource='[runtime expression]'])
|
string |
getTableName()
|
boolean |
isSessionDirty([string datasource='[runtime expression]'])
|
any |
list([struct criteria='[runtime expression]'], [string sortOrder=''], [numeric offset='0'], [numeric max='0'], [numeric timeout='0'], [boolean ignoreCase='false'], [boolean asQuery='[runtime expression]'])
|
any |
new([struct properties='[runtime expression]'], [boolean composeRelationships='true'], [any nullEmptyInclude=''], [any nullEmptyExclude=''], [boolean ignoreEmpty='false'], [any include=''], [any exclude=''])
|
any |
newCriteria([boolean useQueryCaching='false'], [string queryCacheRegion=''])
|
any |
onMissingMethod([string missingMethodName], [struct missingMethodArguments])
A nice onMissingMethod template to create awesome dynamic methods based on a virtual service |
Methods inherited from class WEB-INF.cftags.component |
---|
|
Constructor Detail |
---|
public init(string entityname, [string queryCacheRegion], [boolean useQueryCaching], [boolean eventHandling], [boolean useTransactions], [boolean defaultAsQuery], [string datasource])
entityname
queryCacheRegion
useQueryCaching
eventHandling
useTransactions
defaultAsQuery
datasource
Method Detail |
---|
public string GETDATASOURCE()
public string GETENTITYNAME()
public void SETDATASOURCE(string datasource)
datasource
public void SETENTITYNAME(string entityName)
entityName
public void clear([string datasource='[runtime expression]'])
clear
in class
BaseORMService
datasource
public any convertIDValueToJavaType(any id)
convertIDValueToJavaType
in class
BaseORMService
id
public any convertValueToJavaType(any propertyName, any value)
convertValueToJavaType
in class
BaseORMService
propertyName
value
public numeric count([string where=''], [any params='[runtime expression]'])
count
in class
BaseORMService
where
params
public numeric countWhere()
countWhere
in class
BaseORMService
public numeric criteriaCount([array criteria='[runtime expression]'])
criteriaCount
in class
BaseORMService
criteria
public any criteriaQuery([array criteria='[runtime expression]'], [string sortOrder=''], [numeric offset='0'], [numeric max='0'], [numeric timeout='0'], [boolean ignoreCase='false'], [boolean asQuery='[runtime expression]'])
criteriaQuery
in class
BaseORMService
criteria
sortOrder
offset
max
timeout
ignoreCase
asQuery
public numeric deleteAll([boolean flush='false'], [boolean transactional='[runtime expression]'])
deleteAll
in class
BaseORMService
flush
transactional
public boolean deleteByID(any id, [boolean flush='false'], [boolean transactional='[runtime expression]'])
deleteByID
in class
BaseORMService
id
flush
transactional
public any deleteByQuery(string query, [any params], [numeric max='0'], [numeric offset='0'], [boolean flush='false'], [boolean transactional='[runtime expression]'])
deleteByQuery
in class
BaseORMService
query
params
max
offset
flush
transactional
public numeric deleteWhere([boolean transactional='[runtime expression]'])
deleteWhere
in class
BaseORMService
transactional
public void evict([string collectionName], [any id])
evict
in class
BaseORMService
collectionName
id
public any executeQuery(string query, [any params='[runtime expression]'], [numeric offset='0'], [numeric max='0'], [numeric timeout='0'], [boolean ignorecase='false'], [boolean asQuery='[runtime expression]'], [boolean unique='false'])
executeQuery
in class
BaseORMService
query
params
offset
max
timeout
ignorecase
asQuery
unique
public boolean exists(any id)
exists
in class
BaseORMService
id
public array findAllWhere(struct criteria, [string sortOrder=''])
findAllWhere
in class
BaseORMService
criteria
sortOrder
public any findWhere(struct criteria)
findWhere
in class
BaseORMService
criteria
public any get(any id, [boolean returnNew='true'])
get
in class
BaseORMService
id
returnNew
public array getAll([any id], [string sortOrder=''])
getAll
in class
BaseORMService
id
sortOrder
public string getKey()
getKey
in class
BaseORMService
public array getPropertyNames()
getPropertyNames
in class
BaseORMService
public struct getSessionStatistics([string datasource='[runtime expression]'])
getSessionStatistics
in class
BaseORMService
datasource
public string getTableName()
getTableName
in class
BaseORMService
public boolean isSessionDirty([string datasource='[runtime expression]'])
isSessionDirty
in class
BaseORMService
datasource
public any list([struct criteria='[runtime expression]'], [string sortOrder=''], [numeric offset='0'], [numeric max='0'], [numeric timeout='0'], [boolean ignoreCase='false'], [boolean asQuery='[runtime expression]'])
list
in class
BaseORMService
criteria
sortOrder
offset
max
timeout
ignoreCase
asQuery
public any new([struct properties='[runtime expression]'], [boolean composeRelationships='true'], [any nullEmptyInclude=''], [any nullEmptyExclude=''], [boolean ignoreEmpty='false'], [any include=''], [any exclude=''])
new
in class
BaseORMService
properties
composeRelationships
nullEmptyInclude
nullEmptyExclude
ignoreEmpty
include
exclude
public any newCriteria([boolean useQueryCaching='false'], [string queryCacheRegion=''])
newCriteria
in class
BaseORMService
useQueryCaching
queryCacheRegion
public any onMissingMethod([string missingMethodName], [struct missingMethodArguments])
onMissingMethod
in class
BaseORMService
missingMethodName
missingMethodArguments
|
ColdBox Platform Version 3.7.0 | ||||
FRAMES |