public String getQualifiedTableName() {
   StringBuilder buf = new StringBuilder();
   String catalogName = tableGeneratorMirror.getCatalogValue();
   if (!catalogName.isEmpty()) {
     buf.append(catalogName);
     buf.append(".");
   }
   String schemaName = tableGeneratorMirror.getCatalogValue();
   if (!schemaName.isEmpty()) {
     buf.append(schemaName);
     buf.append(".");
   }
   buf.append(tableGeneratorMirror.getTableValue());
   return buf.toString();
 }
Beispiel #2
0
  public String getQualifiedName() {
    String catalogValue = AnnotationValueUtil.toString(this.catalog);
    String schemaValue = AnnotationValueUtil.toString(this.schema);
    String nameValue = AnnotationValueUtil.toString(this.name);

    StringBuilder buf = new StringBuilder();
    if (catalogValue != null && !catalogValue.isEmpty()) {
      buf.append(catalogValue);
      buf.append(".");
    }
    if (schemaValue != null && !schemaValue.isEmpty()) {
      buf.append(schemaValue);
      buf.append(".");
    }
    if (nameValue != null && !nameValue.isEmpty()) {
      buf.append(nameValue);
    } else {
      buf.append(defaultName);
    }
    return buf.toString();
  }
 public void appendWrapper(Wrapper<?> wrapper) {
   rawSql.append("?");
   formattedSql.append(
       wrapper.accept(config.getDialect().getSqlLogFormattingVisitor(), formattingFunction));
   parameters.add(new BasicInParameter(wrapper));
 }
 public void cutBackSql(int length) {
   rawSql.setLength(rawSql.length() - length);
   formattedSql.setLength(formattedSql.length() - length);
 }
 public void appendSql(String sql) {
   rawSql.append(sql);
   formattedSql.append(sql);
 }
Beispiel #6
0
 public static String createSignature(String methodName, Class<?>[] paramTypes) {
   StringBuilder buf = new StringBuilder();
   buf.append(methodName);
   buf.append("(");
   for (Class<?> paramType : paramTypes) {
     if (paramType.isArray()) {
       buf.append(paramType.getComponentType().getName());
       buf.append("[]");
     } else {
       buf.append(paramType.getName());
     }
     buf.append(", ");
   }
   if (buf.length() > 2) {
     buf.setLength(buf.length() - 2);
   }
   buf.append(")");
   return buf.toString();
 }