Reactor, oracle views and Record.cfc

34 views
Skip to first unread message

ol...@ansit.no

unread,
Jun 23, 2010, 8:47:19 AM6/23/10
to Reactor
Is is possible to use reactor with oracle views?

After inspecting the generated Record.cfc I observe that the init
method is calling all the set methods. The problem is that the set
methods aren't generated by reactor.


<cfcomponent hint="I am the base record representing the V_XXX
object. I am generated. DO NOT EDIT ME (but feel free to delete
me)."
extends="reactor.base.abstractRecord" >

<cfset variables.signature = "EE282E0129960AEADFF5A0982640551F" />

<cffunction name="init" access="public" hint="I configure and return
this record object." output="false" returntype="any"
_returntype="reactor.project.Hogia.Record.V_FIRMA_MELDINGS_FORMATRecord">

<cfargument name="Id" hint="I am the default value for the Id
field." required="no" type="any" _type="string" default="0" />

<cfargument name="FirmaId" hint="I am the default value for the
FirmaId field." required="no" type="any" _type="string" default="0" />

<cfargument name="Orgnr" hint="I am the default value for the Orgnr
field." required="no" type="any" _type="string" default="0" />

<cfargument name="Ident" hint="I am the default value for the Ident
field." required="no" type="any" _type="string" default="" />

<cfargument name="Versjon" hint="I am the default value for the
Versjon field." required="no" type="any" _type="string" default="" />

<cfargument name="MottaksformatId" hint="I am the default value for
the MottaksformatId field." required="no" type="any" _type="string"
default="0" />

<cfset setId(arguments.Id) />

<cfset setFirmaId(arguments.FirmaId) />

<cfset setOrgnr(arguments.Orgnr) />

<cfset setIdent(arguments.Ident) />

<cfset setVersjon(arguments.Versjon) />

<cfset setMottaksformatId(arguments.MottaksformatId) />

<cfreturn this />
</cffunction>



<cffunction name="getId" hint="I get the Id value." access="public"
output="false" returntype="any" _returntype="string">
<cfreturn _getTo().Id />
</cffunction>


<cffunction name="getFirmaId" hint="I get the FirmaId value."
access="public" output="false" returntype="any" _returntype="string">
<cfreturn _getTo().FirmaId />
</cffunction>


<cffunction name="getOrgnr" hint="I get the Orgnr value."
access="public" output="false" returntype="any" _returntype="string">
<cfreturn _getTo().Orgnr />
</cffunction>


<cffunction name="getIdent" hint="I get the Ident value."
access="public" output="false" returntype="any" _returntype="string">
<cfreturn _getTo().Ident />
</cffunction>


<cffunction name="getVersjon" hint="I get the Versjon value."
access="public" output="false" returntype="any" _returntype="string">
<cfreturn _getTo().Versjon />
</cffunction>

<!--- MottaksformatId --->
<cffunction name="setMottaksformatId" hint="I set the
MottaksformatId value ." access="public" output="false"
returntype="void">
<cfargument name="MottaksformatId" hint="I am this record's
MottaksformatId value." required="yes" type="any" _type="string" />

<cfset _getTo().MottaksformatId = arguments.MottaksformatId />

</cffunction>


<cffunction name="getMottaksformatId" hint="I get the
MottaksformatId value." access="public" output="false"
returntype="any" _returntype="string">
<cfreturn _getTo().MottaksformatId />
</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.Hogia.To.V_FIRMA_MELDINGS_FORMATTo" />
<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.Hogia.To.V_FIRMA_MELDINGS_FORMATTo">
<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.Hogia.To.V_FIRMA_MELDINGS_FORMATTo" />
<cfset variables.initialTo = arguments.initialTo />
</cffunction>
<cffunction name="_getInitialTo" access="private" output="false"
returntype="any"
_returntype="reactor.project.Hogia.To.V_FIRMA_MELDINGS_FORMATTo">

<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.Hogia.Dao.V_FIRMA_MELDINGS_FORMATDao" />
<cfset variables.dao = arguments.dao />
</cffunction>
<cffunction name="_getDao" access="private" output="false"
returntype="any"
_returntype="reactor.project.Hogia.Dao.V_FIRMA_MELDINGS_FORMATDao" >

<cfif NOT StructKeyExists(variables, "dao") >
<cfset variables.dao = _getReactorFactory().createDao(_getAlias())
>
</cfif>

<cfreturn variables.dao />
</cffunction>

</cfcomponent>



Joshua Scott

unread,
Jul 1, 2010, 2:39:24 PM7/1/10
to reacto...@googlegroups.com
Hello,

I am having a issue with a iterator.cfc. I am getting this error with the most version of reactor.

Here is the error:

java.lang.String cannot be cast to coldfusion.sql.QueryTable
C:\Inetpub\wwwroot\core\Reactor\iterator\iterator.cfc (641)
C:\Inetpub\wwwroot\iCreateCMS\model\data\Record\PageDefinitionRecord.cfc (74)

What is the cause of this? Is there a patch or fix?

Any help would be great.

Thanks,

Josh

Dave Phipps

unread,
Jul 8, 2010, 7:27:44 AM7/8/10
to reacto...@googlegroups.com
Can you show some of the code from PageDefinitionRecord.cfc? Not
enough info to go on otherwise.

Dave

> --
> You received this message because you are subscribed to the Google Groups
> "Reactor" group.
> To post to this group, send email to reacto...@googlegroups.com.
> To unsubscribe from this group, send email to
> reactor-user...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/reactor-users?hl=en.
>

Reply all
Reply to author
Forward
0 new messages