Added comments for changes of HHH-5686

This commit is contained in:
nandina 2010-11-10 17:11:22 +05:30 committed by adamw
parent 696fcccd0f
commit fd0a463f0e
5 changed files with 10 additions and 4 deletions

View File

@ -65,6 +65,8 @@ public class BasicCollectionInitializor<T extends Collection> extends AbstractCo
@SuppressWarnings({"unchecked"})
protected void addToCollection(T collection, Object collectionRow) {
// collectionRow will be the actual object if retrieved from audit relation or middle table
// otherwise it will be a List
Object elementData = collectionRow;
if (collectionRow instanceof java.util.List) {
elementData = ((List) collectionRow).get(elementComponentData.getComponentIndex());

View File

@ -63,6 +63,8 @@ public class ListCollectionInitializor extends AbstractCollectionInitializor<Lis
@SuppressWarnings({"unchecked"})
protected void addToCollection(List collection, Object collectionRow) {
// collectionRow will be the actual object if retrieved from audit relation or middle table
// otherwise it will be a List
Object elementData = collectionRow;
Object indexData = collectionRow;
if (collectionRow instanceof java.util.List) {

View File

@ -67,6 +67,8 @@ public class MapCollectionInitializor<T extends Map> extends AbstractCollectionI
@SuppressWarnings({"unchecked"})
protected void addToCollection(T collection, Object collectionRow) {
// collectionRow will be the actual object if retrieved from audit relation or middle table
// otherwise it will be a List
Object elementData = collectionRow;
Object indexData = collectionRow;
if (collectionRow instanceof java.util.List) {

View File

@ -52,7 +52,7 @@ public final class OneAuditEntityQueryGenerator implements RelationQueryGenerato
/*
* The query that we need to create:
* SELECT new list(e) FROM versionsReferencedEntity e
* SELECT e FROM versionsReferencedEntity e
* WHERE
* (only entities referenced by the association; id_ref_ing = id of the referencing entity)
* e.id_ref_ing = :id_ref_ing AND
@ -73,7 +73,7 @@ public final class OneAuditEntityQueryGenerator implements RelationQueryGenerato
String versionsReferencedEntityName = verEntCfg.getAuditEntityName(referencedEntityName);
// SELECT new list(e) FROM versionsEntity e
// SELECT e FROM versionsEntity e
QueryBuilder qb = new QueryBuilder(versionsReferencedEntityName, "e");
qb.addProjection(null, "e", false, false);
// WHERE

View File

@ -53,7 +53,7 @@ public final class OneEntityQueryGenerator implements RelationQueryGenerator {
/*
* The query that we need to create:
* SELECT new list(ee) FROM middleEntity ee WHERE
* SELECT ee FROM middleEntity ee WHERE
* (only entities referenced by the association; id_ref_ing = id of the referencing entity)
* ee.originalId.id_ref_ing = :id_ref_ing AND
*
@ -73,7 +73,7 @@ public final class OneEntityQueryGenerator implements RelationQueryGenerator {
String revisionPropertyPath = verEntCfg.getRevisionNumberPath();
String originalIdPropertyName = verEntCfg.getOriginalIdPropName();
// SELECT new list(ee) FROM middleEntity ee
// SELECT ee FROM middleEntity ee
QueryBuilder qb = new QueryBuilder(versionsMiddleEntityName, "ee");
qb.addProjection(null, "ee", false, false);
// WHERE