<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><style type="text/css"><!-- #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } --></style> <title>[rhq-project.org rhq] [5116] [RHQ-2403] Updating logic that determines whether or not a collection is a bag to include a check for the @IndexColumn annotation.</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>5116</dd> <dt>Author</dt> <dd>jsanda</dd> <dt>Date</dt> <dd>2009-09-03 13:02:37 -0500 (Thu, 03 Sep 2009)</dd> </dl> <h3>Log Message</h3> <pre>[RHQ-2403] Updating logic that determines whether or not a collection is a bag to include a check for the @IndexColumn annotation. If the collection has @IndexColumn, it is not considered a bag since bags are not ordered and @IndexColumn is used in conjunction with ordered collections (e.g., lists or sorted sets).</pre> <h3>Modified Paths</h3> <ul> <li><a href="#rhqtrunkmodulescoredomainsrcmainjavaorgrhqcoredomainutilCriteriaQueryGeneratorjava">rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/util/CriteriaQueryGenerator.java</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="rhqtrunkmodulescoredomainsrcmainjavaorgrhqcoredomainutilCriteriaQueryGeneratorjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/util/CriteriaQueryGenerator.java (5115 => 5116)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/util/CriteriaQueryGenerator.java 2009-09-03 18:02:26 UTC (rev 5115) +++ rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/util/CriteriaQueryGenerator.java 2009-09-03 18:02:37 UTC (rev 5116) </span><span class="lines">@@ -40,6 +40,7 @@ </span><span class="cx"> import org.rhq.core.domain.criteria.SubjectCriteria; import org.rhq.core.domain.operation.OperationRequestStatus; import org.rhq.core.domain.resource.ResourceCategory; </span><span class="add">+import org.hibernate.annotations.IndexColumn; </span><span class="cx"> /** * A query generator used to generate queries with specific filtering, prefetching, or sorting requirements. </span><span class="lines">@@ -278,7 +279,7 @@ </span><span class="cx"> Class<?> persistentClass = criteria.getPersistentClass(); Field field = persistentClass.getDeclaredField(fieldName); </span><span class="rem">- return isAList(field); </span><span class="add">+ return isAList(field) && !field.isAnnotationPresent(IndexColumn.class); </span><span class="cx"> } catch (NoSuchFieldException e) { return false; </span> </pre> </div> </div> </body> </html> |