public class RootHelper extends Object
Modifier and Type | Field and Description |
---|---|
static RootHelper |
INSTANCE
Singleton access
|
Modifier and Type | Method and Description |
---|---|
<T extends QuerySpace> |
extractRootQuerySpace(QuerySpaces querySpaces,
Class<EntityQuerySpace> returnType)
Extract the root QuerySpace of the LoadPlan, assuming there is just one.
|
<T extends Return> |
extractRootReturn(LoadPlan loadPlan,
Class<T> returnType)
Extract the root return of the LoadPlan, assuming there is just one.
|
public static final RootHelper INSTANCE
public <T extends Return> T extractRootReturn(LoadPlan loadPlan, Class<T> returnType)
T
- The parameterized type of the specific Return type expectedloadPlan
- The LoadPlan from which to extract the root returnreturnType
- The Return type expected, passed as an argumentIllegalStateException
- If there is no root, more than one root or the single root
is not of the expected type.public <T extends QuerySpace> T extractRootQuerySpace(QuerySpaces querySpaces, Class<EntityQuerySpace> returnType)
querySpaces
- The QuerySpaces from which to extract the root.returnType
- The QuerySpace type expected, passed as an argumentIllegalStateException
- If there is no root, more than one root or the single root
is not of the expected type.Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.