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 PC key object stored in an embedded map within a PC object.
28: * Provides mapping for a single Java type (the key PC type) to multiple datastore columns.
29: *
30: * @version $Revision: 1.6 $
31: **/
32: public class EmbeddedKeyPCMapping extends EmbeddedMapping {
33: /**
34: * Initialize this JavaTypeMapping with the given DatastoreAdapter for
35: * the given FieldMetaData.
36: *
37: * @param dba The Datastore Adapter that this Mapping should use.
38: * @param fmd FieldMetaData for the field to be mapped (if any)
39: * @param container The datastore container storing this mapping (if any)
40: * @param clr the ClassLoaderResolver
41: */
42: public void initialize(DatastoreAdapter dba,
43: AbstractMemberMetaData fmd,
44: DatastoreContainerObject container, ClassLoaderResolver clr) {
45: initialize(dba, fmd, container, clr, fmd.getKeyMetaData()
46: .getEmbeddedMetaData(), fmd.getMap().getKeyType(),
47: StateManager.EMBEDDED_MAP_KEY_PC);
48: }
49: }
|