/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.shardingsphere.core.rewrite.placeholder;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * Table placeholder for rewrite.
 *
 * @author zhangliang
 */
@RequiredArgsConstructor
@Getter
public final class TablePlaceholder implements ShardingPlaceholder {
    
    private final String logicTableName;
    
    private final String originalLiterals;
    
    @Override
    public String toString() {
        return logicTableName;
    }
}

@@ -857,16 +857,55 @@
 older;%0A%0A
+import com.google.common.base.Strings;%0A
 import l
@@ -1021,16 +1021,35 @@
 ngliang%0A
+ * @author panjuan%0A
  */%0A@Req
@@ -1226,24 +1226,67 @@
 ing 
-originalL
+leftDelimiter;%0A    %0A    private final String rightDelim
 iter
-als
 ;%0A  
@@ -1348,30 +1348,242 @@
  return 
-logicTableName
+hasDelimiter() ? leftDelimiter + logicTableName + rightDelimiter : logicTableName;%0A    %7D%0A    %0A    private boolean hasDelimiter() %7B%0A        return !(Strings.isNullOrEmpty(leftDelimiter) %7C%7C Strings.isNullOrEmpty(rightDelimiter))
 ;%0A    %7D%0A

modify TablePlaceholder