public void init(@Nullable String table,
@Nullable TablePartition tablePartition,
@Nullable String shardParameterName,
@Nullable String shardPropertyPath) {
if (tableNode != null && table == null) {
throw new IncorrectDefinitionException("if sql contains #table, @DB.table must define");
}
if (tableNode == null && table != null) {
throw new IncorrectDefinitionException("if @DB.table is defined, sql must contain #table");
}
if (tableNode != null) {
if ((tablePartition == null && shardParameterName == null && shardPropertyPath == null)
|| (tablePartition != null && shardParameterName != null && shardPropertyPath != null)) {
tableNode.setTable(table);