Bonjour à tous.

J'essaie de récupérer une liste d'objet à partir d'une requête HQL un peu complexe :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 
select distinct seqDbxref.dbxref from SeqDbxref seqDbxref where (seqDbxref.dbxref.xrefDbname 
 in ('Swiss-Prot', 'UniProt', 'UniProtKB', 'TrEMBL') AND (seqDbxref.seq.id 
  in (select proteinHit.seqId from ProticProteinHit proteinHit 
   where (select msSampleComponents.proticDetectedSpots 
   from ProticMsSampleComponents msSampleComponents where msSampleComponents 
    in (select matchSample.proticMsSamples.proticMsSampleComponentses from 
    ProticMatchSample matchSample where matchSample 
     in proteinHit.proticMatch.proticMatchSamples)))))
Mais j'obtiens une erreur de syntaxe que je ne comprends pas :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Error
Mon Apr 26 17:55:30 CEST 2010
org.hibernate.hql.ast.QuerySyntaxException: unexpected AST node: query [
select distinct seqDbxref.dbxref from fr.comp.centre.app.server.dao.go_.SeqDbxref seqDbxref where (seqDbxref.dbxref.xrefDbname in 
('Swiss-Prot', 'UniProt', 'UniProtKB', 'TrEMBL') AND (seqDbxref.seq.id in (
select proteinHit.seqId from fr.comp.centre.app.server.dao.ProticProteinHit proteinHit where (
select msSampleComponents.proticDetectedSpots from fr.comp.centre.app.server.dao.ProticMsSampleComponents msSampleComponents where msSampleComponents in (
select matchSample.proticMsSamples.proticMsSampleComponentses from 
fr.comp.centre.app.server.dao.ProticMatchSample matchSample where matchSample in proteinHit.proticMatch.proticMatchSamples)))))
 
]
 
org.hibernate.hql.ast.QuerySyntaxException: unexpected AST node: query [
select distinct seqDbxref.dbxref from fr.comp.centre.app.server.dao.go_.SeqDbxref seqDbxref where (seqDbxref.dbxref.xrefDbname in 
('Swiss-Prot', 'UniProt', 'UniProtKB', 'TrEMBL') AND (seqDbxref.seq.id in (
select proteinHit.seqId from fr.comp.centre.app.server.dao.ProticProteinHit proteinHit where (
select msSampleComponents.proticDetectedSpots from fr.comp.centre.app.server.dao.ProticMsSampleComponents msSampleComponents where msSampleComponents in (
select matchSample.proticMsSamples.proticMsSampleComponentses from 
fr.comp.centre.app.server.dao.ProticMatchSample matchSample where matchSample in proteinHit.proticMatch.proticMatchSamples)))))
 
]
	at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:31)
	at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:24)
	at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59)
	at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:235)
	at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
	at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
	at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
	at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
	at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
	at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
	at org.hibernate.console.HQLQueryPage.setSession(HQLQueryPage.java:106)
	at org.hibernate.console.ConsoleConfiguration$4.execute(ConsoleConfiguration.java:519)
	at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
	at org.hibernate.console.ConsoleConfiguration.executeHQLQuery(ConsoleConfiguration.java:514)
	at org.hibernate.eclipse.hqleditor.HQLEditor.executeQuery(HQLEditor.java:416)
	at org.hibernate.eclipse.console.actions.ExecuteQueryAction.execute(ExecuteQueryAction.java:73)
	at org.hibernate.eclipse.console.actions.ExecuteQueryAction.run(ExecuteQueryAction.java:53)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.hibernate.eclipse.console.actions.ExecuteQueryAction.runWithEvent(ExecuteQueryAction.java:57)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Pourriez-vous m'indiquer une piste pour résoudre ce problème ?

Voici les classes des objets correspondant :
Dbxref.class :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public class Dbxref implements java.io.Serializable {
 
	private int id;
	private String xrefDbname;
	private String xrefKey;
	private String xrefKeytype;
	private String xrefDesc;
	private Set<TermDbxref> termDbxrefs = new HashSet<TermDbxref>(0);
	private Set<Evidence> evidences = new HashSet<Evidence>(0);
	private Set<EvidenceDbxref> evidenceDbxrefs = new HashSet<EvidenceDbxref>(0);
	private Set<GeneProduct> geneProducts = new HashSet<GeneProduct>(0);
	private Set<TermDefinition> termDefinitions = new HashSet<TermDefinition>(0);
	private Set<SeqDbxref> seqDbxrefs = new HashSet<SeqDbxref>(0);
 
	public Dbxref() {
	}
//...
}
SeqDbxref.class :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
public class SeqDbxref implements java.io.Serializable {
 
	private SeqDbxrefId id;
	private Seq seq;
	private Dbxref dbxref;
 
	public SeqDbxref() {
	}
//...
}
Seq.class :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public class Seq implements java.io.Serializable {
 
	private int id;
	private Integer timestamp;
	private String displayId;
	private String description;
	private String seq;
	private Integer seqLen;
	private String md5checksum;
	private String moltype;
	private Set<SeqProperty> seqProperties = new HashSet<SeqProperty>(0);
	private Set<SeqDbxref> seqDbxrefs = new HashSet<SeqDbxref>(0);
	private Set<GeneProductSeq> geneProductSeqs = new HashSet<GeneProductSeq>(0);
 
	public Seq() {
	}
//...
}
ProticProteinHit.class :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public class ProticProteinHit implements java.io.Serializable {
 
	private long proteinHitId;
	private ProticProjects proticProjects;
	private ProticMatch proticMatch;
	private ProticLog proticLog;
	private long seqId;
	private Integer rank;
	private Double score;
	private boolean isPrivate;
	private Set<ProticProteinHitParam> proticProteinHitParams = new HashSet<ProticProteinHitParam>(0);
 
	private Set<ProteinAnnotQuality> proteinAnnotations = new HashSet<ProteinAnnotQuality>(0);
 
	public ProticProteinHit() {
	}
//...
}
ProticMatch.class :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
public class ProticMatch implements java.io.Serializable {
 
	private long matchId;
	private ProticMsIdentificationRun proticMsIdentificationRun;
	private Set<ProticPeptideHit> proticPeptideHits = new HashSet<ProticPeptideHit>(0);
	private Set<ProticProteinHit> proticProteinHits = new HashSet<ProticProteinHit>(0);
	private Set<ProticMatchSample> proticMatchSamples = new HashSet<ProticMatchSample>(0);
 
	public ProticMatch() {
	}
//...
}
ProticMatchSample.class :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
public class ProticMatchSample implements java.io.Serializable {
 
	private ProticMatchSampleId id;
	private ProticMatch proticMatch;
	private ProticMsSamples proticMsSamples;
	private String sampleName;
 
	public ProticMatchSample() {
	}
//...
}
ProticMsSamples.class :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public class ProticMsSamples implements java.io.Serializable {
 
	private long msSampleId;
	private ProticMethods proticMethods;
	private ProticProjects proticProjects;
	private ProticLog proticLog;
	private ProticObsolete proticObsolete;
	private ProticLabelingSets proticLabelingSets;
	private String sampleName;
	private Set<ProticMsSampleSpecies> proticMsSampleSpecieses = new HashSet<ProticMsSampleSpecies>(0);
	private Set<ProticMatchSample> proticMatchSamples = new HashSet<ProticMatchSample>(0);
	private Set<ProticMsRun> proticMsRuns = new HashSet<ProticMsRun>(0);
	private Set<ProticMsSampleComponents> proticMsSampleComponentses = new HashSet<ProticMsSampleComponents>(0);
	private Set<ProticMsSampleDescription> proticMsSampleDescriptions = new HashSet<ProticMsSampleDescription>(0);
	private Set<ProticWell> proticWells = new HashSet<ProticWell>(0);
	private Set<MsSampleAnnotQuality> msSampleAnnotations = new HashSet<MsSampleAnnotQuality>(0);
 
	public ProticMsSamples() {
	}
//...
}
ProticMsSampleComponents.class :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
public class ProticMsSampleComponents implements java.io.Serializable {
 
	private long msSampleComponentId;
	private ProticDetectedSpots proticDetectedSpots;
	private ProticProteinSamples proticProteinSamples;
	private ProticMsSamples proticMsSamples;
	private ProticLabeling proticLabeling;
	private String componentName;
	private Set<ProticMsSampleComponentQuantities> proticMsSampleComponentQuantitieses = new HashSet<ProticMsSampleComponentQuantities>(
			0);
 
	public ProticMsSampleComponents() {
	}
//...
}
ProticDetectedSpots.class :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
public class ProticDetectedSpots implements java.io.Serializable {
 
	private long detectedSpotId;
	private ProticDetections proticDetections;
	private ProticMatchedSpots proticMatchedSpots;
	private ProticProjects proticProjects;
	private ProticLog proticLog;
	private ProticObsolete proticObsolete;
	private long spotSoftNum;
	private String spotManualNum;
	private double x;
	private double y;
	private Double observedMw;
	private Double observedPi;
	private boolean isPrivate;
	private String remark;
	private Set<ProticMatchedSpots> proticMatchedSpotses = new HashSet<ProticMatchedSpots>(0);
	private Set<ProticMsSampleComponents> proticMsSampleComponentses = new HashSet<ProticMsSampleComponents>(0);
	private Set<ProticDetectedSpotQuantitation> proticDetectedSpotQuantitations = new HashSet<ProticDetectedSpotQuantitation>(0);
 
	public ProticDetectedSpots() {
	}
//...
}
Si vous avez besoin d'autres informations, n'hésitez pas à demander.

Merci d'avance.