01: /*
02: * Copyright 2004-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.compass.annotations;
18:
19: /**
20: * For class proeprties ({@link SearchableProperty}, and {@link SearchableId}, Compass
21: * might require an internal meta-data to be created, so it can identify the correct
22: * value that match the property and preform proper unmarshalling.
23: * Compass can create this internal meta-data automatcially by analyzing all the properties
24: * in the class using the {@link #AUTO} option. It can also not create the internal
25: * meta-data using {@link #FALSE} and use the first meta-data as the intenral id,
26: * or always create the intenal meta-data using {@link #TRUE}.
27: * The other options allow to not create an interanl id and never unmarshalling that
28: * property ({@llink #NO}), and not creating an internal id in case there all the meta
29: * data mappings fro that property have store="no" ({@link #NO_STORE}).
30: *
31: * @author kimchy
32: */
33: public enum ManagedId {
34:
35: /**
36: * Not set, will let Compass defaults (on the Searchable mapping and on the global
37: * settings) to control this value.
38: */
39: NA,
40:
41: /**
42: * Compass will analyzer all the class mappings, and only create an
43: * internal id if one is required.
44: */
45: AUTO,
46:
47: /**
48: * Compass will always create an intenral meta-data for the property.
49: */
50: TRUE,
51:
52: /**
53: * Compass will never create an internal meta-data for the property.
54: */
55: FALSE,
56:
57: /**
58: * Compess will not create an internal id for this proeprty. It will also
59: * not try and unmarshall this property from the index.
60: */
61: NO,
62:
63: /**
64: * Compass will not create an internal id for this property if all of its
65: * meta data created have store="no". In this case, it will also not try and
66: * unmarshall it from the index.
67: */
68: NO_STORE
69: }
|