View Javadoc

1   package org.apache.torque.map;
2   
3   /*
4    * Copyright 2001-2004 The Apache Software Foundation.
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License")
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *     http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  /***
20   * MapBuilders are wrappers around DatabaseMaps.  You use a MapBuilder
21   * to populate a DatabaseMap.  You should implement this interface to create
22   * your own MapBuilders.  The MapBuilder interface exists to support ease of
23   * casting.
24   *
25   * @author <a href="mailto:jmcnally@collab.net">John D. McNally</a>
26   * @version $Id: MapBuilder.java,v 1.7 2005/01/31 19:43:54 tfischer Exp $
27   */
28  public interface MapBuilder
29  {
30      /***
31       * Build up the database mapping.
32       *
33       * @exception Exception Couldn't build mapping.
34       */
35      void doBuild()
36          throws Exception;
37  
38      /***
39       * Tells us if the database mapping is built so that we can avoid
40       * re-building it repeatedly.
41       *
42       * @return Whether the DatabaseMap is built.
43       */
44      boolean isBuilt();
45  
46      /***
47       * Gets the database mapping this map builder built.
48       *
49       * @return A DatabaseMap.
50       */
51      DatabaseMap getDatabaseMap();
52  }