Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14792 manas 1
/**
2
 * Copyright 2010-present Facebook.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *    http://www.apache.org/licenses/LICENSE-2.0
9
 *
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 com.facebook.model;
18
 
19
import java.lang.annotation.Retention;
20
import java.lang.annotation.RetentionPolicy;
21
 
22
/**
23
 * Use this annotation setters in an interface that derives from
24
 * GraphObject, if you wish to provide a setter that takes a primitive data type (e.g., String)
25
 * or a List of primitive data types, but actually populates its underlying property with a
26
 * new GraphObject with a property equal to the specified value (or a List of such GraphObjects).
27
 * This is useful for providing "helper" setters to avoid requiring callers to instantiate a GraphObject
28
 * just to set a single property on it (e.g., 'url' or 'id').
29
 *
30
 * The String value provided to this annotation should be the name of the property that will be
31
 * populated on the newly-created GraphObject using the value that was passed to the setter.
32
 *
33
 * This annotation has no effect if applied to a getter.
34
 */
35
@Retention(RetentionPolicy.RUNTIME)
36
public @interface CreateGraphObject {
37
    String value();
38
}