WEB-INF.cftags.component coldbox.system.orm.hibernate.BaseORMService coldbox.system.orm.hibernate.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; }
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
string
|
datasource
The datasource property for this "version" of the Virtual Service. |
true
|
false
|
|
string
|
entityName
The entityName property for this "version" of the Virtual Service. |
true
|
false
|
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. |
VirtualEntityService
|
SETDATASOURCE(string datasource)
set: The datasource property for this "version" of the Virtual Service. |
VirtualEntityService
|
SETENTITYNAME(string entityName)
set: The entityName property for this "version" of the Virtual Service. |
any
|
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 |
---|
None |
Constructor Detail |
---|
*********************************** CONSTRUCTOR ********************************************
entityname
queryCacheRegion
useQueryCaching
eventHandling
useTransactions
defaultAsQuery
datasource
Property Detail |
---|
The datasource property for this "version" of the Virtual Service
serializable
- truerequired
- falseThe entityName property for this "version" of the Virtual Service
serializable
- truerequired
- falseMethod Detail |
---|
get: The datasource property for this "version" of the Virtual Service
get: The entityName property for this "version" of the Virtual Service
set: The datasource property for this "version" of the Virtual Service
datasource
set: The entityName property for this "version" of the Virtual Service
entityName
clear
in class
BaseORMService
datasource
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
convertIDValueToJavaType
in class
BaseORMService
id
Coverts a value to the correct javaType for the property passed in The method returns the value in the proper Java Type
convertValueToJavaType
in class
BaseORMService
propertyName
value
count
in class
BaseORMService
where
params
countWhere
in class
BaseORMService
criteriaCount
in class
BaseORMService
criteria
criteriaQuery
in class
BaseORMService
criteria
sortOrder
offset
max
timeout
ignoreCase
asQuery
deleteAll
in class
BaseORMService
flush
transactional
deleteByID
in class
BaseORMService
id
flush
transactional
deleteByQuery
in class
BaseORMService
query
params
max
offset
flush
transactional
deleteWhere
in class
BaseORMService
transactional
evict
in class
BaseORMService
collectionName
id
*********************************** PUBLIC ********************************************
executeQuery
in class
BaseORMService
query
params
offset
max
timeout
ignorecase
asQuery
unique
exists
in class
BaseORMService
id
findAllWhere
in class
BaseORMService
criteria
sortOrder
findWhere
in class
BaseORMService
criteria
get
in class
BaseORMService
id
returnNew
getAll
in class
BaseORMService
id
sortOrder
getKey
in class
BaseORMService
getPropertyNames
in class
BaseORMService
getSessionStatistics
in class
BaseORMService
datasource
getTableName
in class
BaseORMService
isSessionDirty
in class
BaseORMService
datasource
list
in class
BaseORMService
criteria
sortOrder
offset
max
timeout
ignoreCase
asQuery
new
in class
BaseORMService
properties
composeRelationships
nullEmptyInclude
nullEmptyExclude
ignoreEmpty
include
exclude
newCriteria
in class
BaseORMService
useQueryCaching
queryCacheRegion
A nice onMissingMethod template to create awesome dynamic methods based on a virtual service
onMissingMethod
in class
BaseORMService
missingMethodName
missingMethodArguments