KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > metadata > MetaDataEnums


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.metadata;
13
14 import java.util.Map JavaDoc;
15 import java.util.HashMap JavaDoc;
16
17 /**
18  * This contains maps that convert Strings to int codes for meta data
19  * options. They are not static so this class can be completly discarded
20  * when the meta data has been read.
21  */

22 public class MetaDataEnums {
23
24     public static final String JavaDoc OPTIMISTIC_LOCKING_NONE = "none";
25     public static final String JavaDoc OPTIMISTIC_LOCKING_VERSION = "version";
26     public static final String JavaDoc OPTIMISTIC_LOCKING_TIMESTAMP = "timestamp";
27     public static final String JavaDoc OPTIMISTIC_LOCKING_CHANGED = "changed";
28
29     public final Map JavaDoc CACHE_ENUM;
30     public final Map JavaDoc AUTOSET_ENUM;
31
32     public MetaDataEnums() {
33         CACHE_ENUM = new HashMap JavaDoc();
34         CACHE_ENUM.put("no", new Integer JavaDoc(MDStatics.CACHE_STRATEGY_NO));
35         CACHE_ENUM.put("yes", new Integer JavaDoc(MDStatics.CACHE_STRATEGY_YES));
36         CACHE_ENUM.put("all", new Integer JavaDoc(MDStatics.CACHE_STRATEGY_ALL));
37
38         AUTOSET_ENUM = new HashMap JavaDoc();
39         AUTOSET_ENUM.put("no", new Integer JavaDoc(MDStatics.AUTOSET_NO));
40         AUTOSET_ENUM.put("created", new Integer JavaDoc(MDStatics.AUTOSET_CREATED));
41         AUTOSET_ENUM.put("modified", new Integer JavaDoc(MDStatics.AUTOSET_MODIFIED));
42         AUTOSET_ENUM.put("both", new Integer JavaDoc(MDStatics.AUTOSET_BOTH));
43     }
44 }
45
Popular Tags