private void createCriteriaSQLAliasMap() {
    int i = 0;
    for (final Criteria crit : criteriaInfoMap.keySet()) {
      CriteriaInfoProvider value = criteriaInfoMap.get(crit);
      String alias = crit.getAlias();
      if (alias == null) {
        alias = value.getName(); // the entity name
      }
      criteriaSQLAliasMap.put(crit, StringHelper.generateAlias(alias, i++));
    }

    criteriaSQLAliasMap.put(rootCriteria, rootSQLAlias);
  }
Пример #2
0
 String createNameForCollection(String role) {
   return StringHelper.generateAlias(role, nextCount());
 }
Пример #3
0
 String createNameFor(String type) {
   return StringHelper.generateAlias(type, nextCount());
 }
 @Override
 public String generateSQLAlias() {
   int aliasCount = 0;
   return StringHelper.generateAlias(Criteria.ROOT_ALIAS, aliasCount) + '_';
 }
Пример #5
0
 protected String generateRootAlias(final String description) {
   return StringHelper.generateAlias(description, 0);
 }
Пример #6
0
 protected String generateTableAlias(
     final int n, final PropertyPath path, final Joinable joinable) {
   return StringHelper.generateAlias(joinable.getName(), n);
 }