01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19: package org.apache.openjpa.jdbc.schema;
20:
21: import org.apache.openjpa.lib.meta.MetaDataSerializer;
22:
23: /**
24: * Interface for schema serializers. Serializers work at the fine-grained
25: * fine-grained table level to allow you to split schemas among multiple files.
26: *
27: * @author Abe White
28: * @nojavadoc
29: */
30: public interface SchemaSerializer extends MetaDataSerializer {
31:
32: /**
33: * Return the set of tables that will be serialized.
34: */
35: public Table[] getTables();
36:
37: /**
38: * Add the given table to the set of tables that will be serialized.
39: */
40: public void addTable(Table table);
41:
42: /**
43: * Remove the given table from the set to be serialized.
44: *
45: * @return true if table was removed, false if not in set
46: */
47: public boolean removeTable(Table table);
48:
49: /**
50: * Add the given schema's objects to the set of objects that will be
51: * serialized.
52: */
53: public void addAll(Schema schema);
54:
55: /**
56: * Add all the objects in the given group to the set of objects that
57: * will be serialized.
58: */
59: public void addAll(SchemaGroup group);
60:
61: /**
62: * Remove the given schema's objects from the set to be serialized.
63: *
64: * @return true if any objects in schema removed, false if none in set
65: */
66: public boolean removeAll(Schema schema);
67:
68: /**
69: * Remove all schemas in the given group from the set to be serialized.
70: *
71: * @return true if any objects in the group were removed, false if
72: * none in set
73: */
74: public boolean removeAll(SchemaGroup group);
75:
76: /**
77: * Clear the set of objects to be serialized.
78: */
79: public void clear();
80: }
|