public class QueryOrganizer extends Object implements QueryOrganizerI
Modifier and Type | Field and Description |
---|---|
protected Hashtable<String,String> |
fieldAliases |
protected ArrayList<String> |
fields |
protected boolean |
isMappingTable |
protected StringBuffer |
joins |
protected String |
level |
protected SchemaElementI |
rootElement |
protected Hashtable |
tableAliases |
protected Hashtable |
tables |
protected UserI |
user |
Constructor and Description |
---|
QueryOrganizer(SchemaElementI se,
UserI u,
String level) |
QueryOrganizer(String elementName,
UserI u,
String level) |
protected SchemaElementI rootElement
protected UserI user
protected String level
protected Hashtable tables
protected StringBuffer joins
protected Hashtable tableAliases
protected boolean isMappingTable
public QueryOrganizer(String elementName, UserI u, String level) throws ElementNotFoundException
ElementNotFoundException
public QueryOrganizer(SchemaElementI se, UserI u, String level)
public void setIsMappingTable(boolean isMap)
protected void addDirectField(String xmlPath) throws ElementNotFoundException
ElementNotFoundException
public void addField(String xmlPath) throws ElementNotFoundException
addField
in interface QueryOrganizerI
xmlPath
- ElementNotFoundException
public String getFilterField(String elementName) throws ElementNotFoundException
elementName
- ElementNotFoundException
public String getTableAndFieldSQL(String xmlPath) throws FieldNotFoundException
xmlPath
- FieldNotFoundException
public static String GetTableAndFieldSQL(String tableAlias, String xmlPath) throws FieldNotFoundException
tableAlias
- xmlPath
- FieldNotFoundException
public String buildJoin() throws Exception
Exception
public String buildQuery() throws IllegalAccessException, Exception
buildQuery
in interface QueryOrganizerI
IllegalAccessException
Exception
public ArrayList getAllFields()
protected String getRootQuery(String elementName, String sql_name, String level) throws IllegalAccessException
IllegalAccessException
protected String getRootQuery(GenericWrapperElement e, String sql_name, String level) throws IllegalAccessException
IllegalAccessException
public ArrayList getFields()
public void setFields(ArrayList fields)
fields
- The fields to set.public GenericWrapperElement getRootElement()
getRootElement
in interface QueryOrganizerI
public void setRootElement(SchemaElementI rootElement)
rootElement
- The rootElement to set.public UserI getUser()
public void setUser(UserI user)
user
- The user to set.public String getFieldAlias(String xmlPath, String tableAlias) throws FieldNotFoundException
FieldNotFoundException
public String translateXMLPath(String xmlPath) throws FieldNotFoundException
translateXMLPath
in interface QueryOrganizerI
FieldNotFoundException
public String translateStandardizedPath(String xmlPath) throws FieldNotFoundException
translateStandardizedPath
in interface QueryOrganizerI
FieldNotFoundException
public String translateXMLPath(String xmlPath, String tableAlias) throws FieldNotFoundException
translateXMLPath
in interface QueryOrganizerI
FieldNotFoundException
public String getLevel()
public void setLevel(String level)
level
- The level to set.public ArrayList getExternalFieldXMLPaths()
public CriteriaCollection getWhere()
public void setWhere(CriteriaCollection where)
where
- the where to setpublic String getArcJoin(ArcDefinition arcDefine, QueryOrganizerI qo, SchemaElement foreign) throws Exception
Exception
Copyright © 2015 Neuroinformatics Research Group. All rights reserved.