Exemple #1
0
 /**
  * @param string
  * @return
  */
 private void solveField(
     final String field, final StringBuilder queryBuilder, final NameSolver nameSolver) {
   if (field.contains("(")
       || StringUtil.containsIgnoreCase(field, " as ")) { // $NON-NLS-1$ //$NON-NLS-2$
     nameSolver.solveAllPropertyNames(field, queryBuilder);
   } else {
     queryBuilder.append(nameSolver.solvePropertyName(field));
     queryBuilder.append(" AS \""); // $NON-NLS-1$
     queryBuilder.append(field);
     queryBuilder.append("\""); // $NON-NLS-1$
   }
 }
Exemple #2
0
 public SelectImpl(
     final DescriptorToolMap classDescriptorMap,
     final PropertiesFactory propertiesFactory,
     final Class<BEAN> clazz,
     final String alias) {
   super(classDescriptorMap);
   this.classDescriptor = classDescriptorMap.get(clazz).getDescriptor();
   nameSolver = new NameSolverImpl(propertiesFactory, false);
   from =
       new FromImpl<>(
           classDescriptorMap,
           clazz,
           nameSolver.register(clazz, alias, classDescriptor),
           nameSolver);
 }