<cfcomponent hint="I am the base record representing the object. I am generated. DO NOT EDIT ME (but feel free to delete me)." extends="reactor.base.abstractRecord" > <cfset variables.signature = "" /> <cffunction name="init" access="public" hint="I configure and return this record object." output="false" returntype="any" _returntype="reactor.project..Record.Record"> <cfargument name="" hint="I am the default value for the field." required="no" type="any" _type="string" default="" /> <cfset set(arguments.) /> <cfreturn this /> </cffunction> <!--- ---> <cffunction name="set" hint="I set the value and reset related objects." access="public" output="false" returntype="void"> <cfargument name="" hint="I am this record's value." required="yes" type="any" _type="string" /> <!--- if the value passed in is different that the current value, reset the valeus in this record ---> <cfif arguments. IS NOT get()> <cfset _getTo(). = arguments. /> <cfif StructKeyExists(variables.children, "") AND IsObject(variables.children.)> <cfset variables.children..resetParent() /> </cfif> <cfset variables.children. = 0 /> <!--- load the correct record <cfset get() /> ---> <cfset _getTo(). = get().get() /> </cfif> <cfset _getTo(). = arguments. /> </cffunction> <cffunction name="get" hint="I get the value." access="public" output="false" returntype="any" _returntype="string"> <cfreturn _getTo(). /> </cffunction> <!--- readonly ---> <cffunction name="get" hint="I get the value." access="public" output="false" returntype="any" _returntype="string"> <cfif NOT StructKeyExists(variables.children, "") OR ( StructKeyExists(variables.children, "") AND NOT IsObject(variables.children.) ) > <cfreturn _getTo(). /> <cfelse> <cfreturn get().get() /> </cfif> </cffunction> <!--- Record For ---> <cffunction name="set" access="public" output="false" returntype="void"> <cfargument name="" hint="I am the Record to set the value from." required="yes" type="any" _type="reactor.project..Record.Record" /> <!--- replace the cached version of this ---> <cfset arguments.._setParent(this, "") /> <cfset variables.children. = arguments. /> <!--- set this object's record to reflect the object's related values. This is going directly to the TO to avoid reloading the object and to facilitate compound relationships ---> <cfset _getTo(). = arguments..get()> </cffunction> <cffunction name="get" access="public" output="false" returntype="any" _returntype="reactor.project..Record.Record"> <cfset var _ = 0 /> <!--- load the initial record. this will be empty ---> <cfif NOT StructKeyExists(variables.children, "") OR ( StructKeyExists(variables.children, "") AND NOT IsObject(variables.children.) ) > <cfset _ = _getReactorFactory().createRecord("") /> <cfset _._setParent(this, "") /> <cfset variables.children. = _ /> </cfif> <!--- if this object has an related values that are not the same as the values in this object then load the correct values ---> <cfif (Len(get()) AND get() IS NOT variables.children..get()) OR > <cfset variables.children..set(get()) /> <cfset variables.children..load(',') /> </cfif> <cfreturn variables.children. /> </cffunction> <cffunction name="remove" access="public" output="false" returntype="any" _returntype="reactor.project..Record.Record"> <cfset var oldRecord = get() /> <cfset set("") /> <cfreturn oldRecord /> </cffunction> <!--- Iterator For ---> <cffunction name="getIterator" access="public" output="false" returntype="any" _returntype="reactor.iterator.iterator"> <cfargument name="cached" hint="I inicate if a chached iterator should be returned" required="true" default="true" type="boolean" /> <cfset var Iterator = 0 /> <cfif NOT arguments.cached OR NOT StructKeyExists(variables.children, "Iterator")> <cfset Iterator = CreateObject("Component", "reactor.iterator.iterator").init(_getReactorFactory(), "") /> <cfset Iterator.getWhere().isEqual("", "", get()) /> <cfset Iterator.join("", "", "") /> <cfset Iterator.getWhere().isEqual("", "", get()) /> <!--- indicate the link details ---> <cfset Iterator.setLink(getIterator(), "") /> <!--- set parent/child relationships ---> <cfset Iterator._setParent(this, "") /> <cfif arguments.cached> <cfset variables.children.Iterator = Iterator /> </cfif> </cfif> <cfif arguments.cached> <cfreturn variables.children.Iterator /> <cfelse> <cfreturn Iterator /> </cfif> </cffunction> <!--- exists ---> <cffunction name="exists" access="public" hint="I check to see if this record exists." output="false" returntype="any" _returntype="boolean"> <cfreturn _getDao().exists(_getTo()) /> </cffunction> <!--- to ---> <cffunction name="_setTo" access="public" output="false" returntype="void"> <cfargument name="to" hint="I am this record's transfer object." required="yes" type="any" _type="reactor.project..To.To" /> <cfif isDeleted()> <cfthrow message="Record Deleted" detail="The record you're using has been deleted. There are some properties which will continue to function after a record has been deleted, but not all of them. Please create a new record and go from there." type="reactor.record.RecordDeleted" /> </cfif> <cfset variables.to = arguments.to /> </cffunction> <cffunction name="_getTo" access="public" output="false" returntype="any" _returntype="reactor.project..To.To"> <cfif isDeleted()> <cfthrow message="Record Deleted" detail="The record you're using has been deleted. There are some properties which will continue to function after a record has been deleted, but not all of them. Please create a new record and go from there." type="reactor.record.RecordDeleted" /> </cfif> <cfif NOT StructKeyExists(variables, "to") > <cfset variables.to = _getReactorFactory().createTo(_getAlias()) > </cfif> <cfreturn variables.to /> </cffunction> <!--- initialTo ---> <cffunction name="_setInitialTo" access="private" output="false" returntype="void"> <cfargument name="initialTo" hint="I am this record's initial transfer object." required="yes" type="any" _type="reactor.project..To.To" /> <cfset variables.initialTo = arguments.initialTo /> </cffunction> <cffunction name="_getInitialTo" access="private" output="false" returntype="any" _returntype="reactor.project..To.To"> <cfif NOT StructKeyExists(variables, "initialTo") > <cfset variables.initialTo = _getReactorFactory().createTo(_getAlias()) > </cfif> <cfreturn variables.initialTo /> </cffunction> <!--- dao ---> <cffunction name="_setDao" access="private" output="false" returntype="void"> <cfargument name="dao" hint="I am the Dao this Record uses to load and save itself." required="yes" type="any" _type="reactor.project..Dao.Dao" /> <cfset variables.dao = arguments.dao /> </cffunction> <cffunction name="_getDao" access="private" output="false" returntype="any" _returntype="reactor.project..Dao.Dao" > <cfif NOT StructKeyExists(variables, "dao") > <cfset variables.dao = _getReactorFactory().createDao(_getAlias()) > </cfif> <cfreturn variables.dao /> </cffunction> </cfcomponent>