though this is completely undocumented in Adobe CF, it is possible to add metadata information to queries. the below code shows how to do this:
<cfset a = QueryNew("")>
<cfset c = a.getMetadata().getExtendedMetaData()>
<cfset c.perpage = 50>
<cfset c.currentpage = 1>
<cfset b = a.getMetadata().getExtendedMetaData()>
#StructKeyExists(b, "perpage")#,#StructKeyExists(b, "currentpage")#
again, this is completely undocumented, but works in cf8.0.1 and greater.
I've searched around in railo and couldn't find anything in the underline classes that could accomplish the same thing.
what i am proposing is that railo add the ability to add information to the query metadata. the entire reason for this is for building orms and other dynamically generated content.
other programming languages allow you to alter the metadata information on objects and it's very useful for passing around additional information that you otherwise have to stick into another object or global scope.
case in point, in cfwheels we're currently haveing to use the request scope in order to store pagination information about the query. to me this seems really messy as we're touching the controller and model layers as well as the request scope. if we could add metadata information to the query, then we could store the pagination information on the query itself thus eliminating the need to touch all these areas.