All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tinygroup.database.table.TableProcessor Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
/**
 *  Copyright (c) 1997-2013, www.tinygroup.org ([email protected]).
 *
 *  Licensed under the GPL, Version 3.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.gnu.org/licenses/gpl.html
 *
 *  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.tinygroup.database.table;

import org.tinygroup.database.ProcessorManager;
import org.tinygroup.database.config.table.Table;
import org.tinygroup.database.config.table.Tables;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * 与数据表相关的处理
 * 
 * @author luoguo
 * 
 */
public interface TableProcessor {
	String BEAN_NAME="tableProcessor";

	void addTables(Tables tables);
	
	void removeTables(Tables tables);
	
	void addTable(Table table);
	
	void removeTable(Table table);

	Table getTable(String packageName, String name);

	Table getTable(String name);

	Table getTableById(String id);

	List getTables();

	List getCreateSql(String name, String packageName, String language);

	List getCreateSql(String name, String language);

	List getCreateSql(Table table, String packageName, String language);

	List getCreateSql(Table table, String language);
	
	List getCreateSqls(String language);

	List getUpdateSql(String name, String packageName,String language,Connection connection)throws SQLException;

	List getUpdateSql(Table table, String packageName, String language,Connection connection)throws SQLException;

	String getDropSql(String name, String packageName, String language);

	String getDropSql(Table table, String packageName, String language);

	boolean checkTableExist(Table table,String language,Connection connection)throws SQLException;
	
	ProcessorManager getProcessorManager() ;

	void setProcessorManager(ProcessorManager processorManager) ;

}