01: /**********************************************************************
02: Copyright (c) 2005 Andy Jefferson and others. All rights reserved.
03: Licensed under the Apache License, Version 2.0 (the "License");
04: you may not use this file except in compliance with the License.
05: You may obtain a copy of the License at
06:
07: http://www.apache.org/licenses/LICENSE-2.0
08:
09: 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
13: limitations under the License.
14:
15:
16: Contributors:
17: ...
18: **********************************************************************/package org.jpox.store.mapping;
19:
20: import org.jpox.ClassLoaderResolver;
21: import org.jpox.StateManager;
22: import org.jpox.metadata.AbstractMemberMetaData;
23: import org.jpox.store.DatastoreAdapter;
24: import org.jpox.store.DatastoreContainerObject;
25:
26: /**
27: * Mapping for a PersistenceCapable object stored in an embedded collection within a
28: * PersistenceCapable object. Provides mapping for a single Java type
29: * (the element PC type) to multiple datastore columns.
30: *
31: * @version $Revision: 1.7 $
32: **/
33: public class EmbeddedElementPCMapping extends EmbeddedMapping {
34: /**
35: * Initialize this JavaTypeMapping with the given DatastoreAdapter for
36: * the given FieldMetaData.
37: *
38: * @param dba The Datastore Adapter that this Mapping should use.
39: * @param fmd FieldMetaData for the field to be mapped (if any)
40: * @param container The datastore container storing this mapping (if any)
41: * @param clr the ClassLoaderResolver
42: */
43: public void initialize(DatastoreAdapter dba,
44: AbstractMemberMetaData fmd,
45: DatastoreContainerObject container, ClassLoaderResolver clr) {
46: initialize(dba, fmd, container, clr, fmd.getElementMetaData()
47: .getEmbeddedMetaData(), fmd.getCollection()
48: .getElementType(),
49: StateManager.EMBEDDED_COLLECTION_ELEMENT_PC);
50: }
51: }
|