Changeset 686 for trunk/grails-app
- Timestamp:
- Oct 6, 2010, 12:58:13 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/AssetReportService.groovy
r681 r686 29 29 // Inner join used to return only attribTypes that are used by AssetExtendedAttributes. 30 30 // So the result is only asset extendedAttributeTypes. 31 // def attribTypesQ = new HqlBuilder().query { 32 // select 'distinct attribT.name' 33 // from 'AssetExtendedAttribute attrib', 34 // 'join attrib.extendedAttributeType as attribT' 35 // order 'by attribT.name asc' 36 // } 37 38 // All active ExtendedAttributes. 31 39 def attribTypesQ = new HqlBuilder().query { 32 40 select 'distinct attribT.name' 33 from ' AssetExtendedAttribute attrib',34 'join attrib.extendedAttributeType as attribT'41 from 'ExtendedAttributeType attribT' 42 where 'attribT.isActive = true' 35 43 order 'by attribT.name asc' 36 44 } 37 result.attribTypes = Asset.executeQuery(attribTypesQ.query, attribTypesQ.namedParams)45 result.attribTypes = ExtendedAttributeType.executeQuery(attribTypesQ.query, attribTypesQ.namedParams) 38 46 39 47 // A result is returned for every asset and for any extended attributes. … … 65 73 // Add all attribType columns. 66 74 result.attribTypes.each { column -> 67 rows[assetResult.name][column] = ' -'75 rows[assetResult.name][column] = ' ' 68 76 } 69 77 } … … 131 139 // Inner join used to return only attribTypes that are used by AssetSubItemExtendedAttributes. 132 140 // So the result is only assetSubItem extendedAttributeTypes. 141 // def attribTypesQ = new HqlBuilder().query { 142 // select 'distinct attribT.name' 143 // from 'AssetSubItemExtendedAttribute attrib', 144 // 'join attrib.extendedAttributeType as attribT' 145 // order 'by attribT.name asc' 146 // } 147 148 // All active ExtendedAttributes. 133 149 def attribTypesQ = new HqlBuilder().query { 134 150 select 'distinct attribT.name' 135 from ' AssetSubItemExtendedAttribute attrib',136 'join attrib.extendedAttributeType as attribT'151 from 'ExtendedAttributeType attribT' 152 where 'attribT.isActive = true' 137 153 order 'by attribT.name asc' 138 154 } 139 result.attribTypes = Asset.executeQuery(attribTypesQ.query, attribTypesQ.namedParams)155 result.attribTypes = ExtendedAttributeType.executeQuery(attribTypesQ.query, attribTypesQ.namedParams) 140 156 141 157 // A useful list of assets without subItems to be given to the user. … … 205 221 // Add all attribType columns. 206 222 result.attribTypes.each { column -> 207 rows[rowKey][column] = ' -'223 rows[rowKey][column] = ' ' 208 224 } 209 225 }
Note: See TracChangeset
for help on using the changeset viewer.