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);
 }