예제 #1
0
  /**
   * Find the columns name in the formula and replace its by qualify columns name: 'name' ->
   * 't_reference.name'
   */
  private String qualifyFormulaWithReferenceName(
      String formula, String referenceName, String modelProperty) {
    EntityMapping em = MetaComponent.get(referenceName).getEntityMapping();

    Iterator<String> it = em.getColumns().iterator();
    while (it.hasNext()) {
      String column = it.next();
      if (formula.contains(column)) {
        formula =
            formula.replace(
                column, getQualifyColumnName(modelProperty, referenceName + "." + column));
      }
    }

    return formula;
  }
예제 #2
0
 /** @since 4.1 */
 private String getTable(String name) {
   return MetaComponent.get(name).getEntityMapping().getTable();
 }