01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.metadata;
12:
13: import java.util.Map;
14: import java.util.HashMap;
15:
16: /**
17: * This contains maps that convert Strings to int codes for meta data
18: * options. They are not static so this class can be completly discarded
19: * when the meta data has been read.
20: */
21: public class MetaDataEnums {
22:
23: public static final String OPTIMISTIC_LOCKING_NONE = "none";
24: public static final String OPTIMISTIC_LOCKING_VERSION = "version";
25: public static final String OPTIMISTIC_LOCKING_TIMESTAMP = "timestamp";
26: public static final String OPTIMISTIC_LOCKING_CHANGED = "changed";
27:
28: public final Map CACHE_ENUM;
29: public final Map AUTOSET_ENUM;
30:
31: public MetaDataEnums() {
32: CACHE_ENUM = new HashMap();
33: CACHE_ENUM.put("no", new Integer(MDStatics.CACHE_STRATEGY_NO));
34: CACHE_ENUM
35: .put("yes", new Integer(MDStatics.CACHE_STRATEGY_YES));
36: CACHE_ENUM
37: .put("all", new Integer(MDStatics.CACHE_STRATEGY_ALL));
38:
39: AUTOSET_ENUM = new HashMap();
40: AUTOSET_ENUM.put("no", new Integer(MDStatics.AUTOSET_NO));
41: AUTOSET_ENUM.put("created", new Integer(
42: MDStatics.AUTOSET_CREATED));
43: AUTOSET_ENUM.put("modified", new Integer(
44: MDStatics.AUTOSET_MODIFIED));
45: AUTOSET_ENUM.put("both", new Integer(MDStatics.AUTOSET_BOTH));
46: }
47: }
|