1 /*** 2 * Copyright 2009 ATG DUST Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * 7 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and limitations under the License. 13 */ 14 15 package atg.service.idgen; 16 17 import javax.sql.DataSource; 18 19 /*** 20 * This is a helper interface implemented by InitializingIdGenerators. 21 * It allows the IdGeneratorInitializer to "callback" and get the SQL 22 * statement required to initialize a given IdGenerator. 23 * @author adamb 24 */ 25 public interface InitializingIdGenerator { 26 /*** 27 * Returns the create table statement required for this IdGenerator. 28 */ 29 public String getCreateStatement(); 30 31 /*** 32 * Returns the drop table statement for this IdGenerator 33 */ 34 public String getTableName(); 35 36 /*** 37 * Returns the data source used by this IdGenerator 38 */ 39 public DataSource getDataSource(); 40 }