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.core.mapping.osem;
18:
19: import org.compass.core.accessor.Getter;
20: import org.compass.core.accessor.Setter;
21:
22: /**
23: *
24: * @author kimchy
25: *
26: */
27: public interface ObjectMapping extends OsemMapping {
28:
29: /**
30: * Returns the accessor type for this mapping. The accessor type can be
31: * field, property or a custom implementation of {@link org.compass.core.accessor.PropertyAccessor}
32: * (this can be either the FQN of the class name or a regsitered type in the configuration, see
33: * {@link org.compass.core.accessor.PropertyAccessorFactory}.
34: */
35: String getAccessor();
36:
37: /**
38: * Sets the accessor type for this mapping. The accessor type can be
39: * field, property or a custom implementation of {@link org.compass.core.accessor.PropertyAccessor}
40: * (this can be either the FQN of the class name or a regsitered type in the configuration, see
41: * {@link org.compass.core.accessor.PropertyAccessorFactory}.
42: */
43: void setAccessor(String accessor);
44:
45: /**
46: * Returns the class property name of the object mapping.
47: */
48: String getPropertyName();
49:
50: /**
51: * Sets the class property name of the object mapping.
52: */
53: void setPropertyName(String propertyName);
54:
55: /**
56: * Returns which alias (or if not present, the FQN of the class name)
57: * this object property is defined at.
58: */
59: String getDefinedInAlias();
60:
61: /**
62: * Sets which alias (or if not present, the FQN of the class name)
63: * this object property is defined at.
64: */
65: void setDefinedInAlias(String alias);
66:
67: Getter getGetter();
68:
69: void setGetter(Getter getter);
70:
71: Setter getSetter();
72:
73: void setSetter(Setter setter);
74:
75: /**
76: * Returns <code>true</code> if this object mapping can be wrapped
77: * with a Collection or an Array.
78: */
79: boolean canBeCollectionWrapped();
80: }
|