private String getRole(String name) { String role = (String) collections.get(name); if (role == null && superQuery != null) { role = superQuery.getRole(name); } return role; }
private String getType(String name) { String type = (String) typeMap.get(name); if (type == null && superQuery != null) { type = superQuery.getType(name); } return type; }
/** * Compile a subquery. * * @param superquery The containing query of the query to be compiled. * @throws org.hibernate.MappingException Indicates problems resolving things referenced in the * query. * @throws org.hibernate.QueryException Generally some form of syntatic failure. */ void compile(QueryTranslatorImpl superquery) throws QueryException, MappingException { this.tokenReplacements = superquery.tokenReplacements; this.superQuery = superquery; this.shallowQuery = true; this.enabledFilters = superquery.getEnabledFilters(); compile(); }
public String getAliasName(String alias) { String name = (String) aliasNames.get(alias); if (name == null) { if (superQuery != null) { name = superQuery.getAliasName(alias); } else { name = alias; } } return name; }
void addNamedParameter(String name) { if (superQuery != null) superQuery.addNamedParameter(name); Integer loc = new Integer(parameterCount++); Object o = namedParameters.get(name); if (o == null) { namedParameters.put(name, loc); } else if (o instanceof Integer) { ArrayList list = new ArrayList(4); list.add(o); list.add(loc); namedParameters.put(name, list); } else { ((ArrayList) o).add(loc); } }
void addQuerySpaces(Serializable[] spaces) { for (int i = 0; i < spaces.length; i++) { querySpaces.add(spaces[i]); } if (superQuery != null) superQuery.addQuerySpaces(spaces); }
boolean isName(String name) { return aliasNames.containsKey(name) || typeMap.containsKey(name) || collections.containsKey(name) || (superQuery != null && superQuery.isName(name)); }