|
4 | 4 | Document Data Format: Records |
5 | 5 | ============================= |
6 | 6 |
|
7 | | -.. default-domain:: mongodb |
| 7 | +.. facet:: |
| 8 | + :name: genre |
| 9 | + :values: reference |
| 10 | + |
| 11 | +.. meta:: |
| 12 | + :keywords: annotations, abstraction, codec |
8 | 13 |
|
9 | 14 | .. contents:: On this page |
10 | 15 | :local: |
@@ -100,36 +105,10 @@ as shown in the following code: |
100 | 105 | Specify Component Conversion Using Annotations |
101 | 106 | ---------------------------------------------- |
102 | 107 |
|
103 | | -This section describes the annotations you can use to configure the |
104 | | -serialization behavior of record components and provides an example to |
105 | | -demonstrate the annotation behavior. |
106 | | - |
107 | | -.. tip:: |
108 | | - |
109 | | - The ``org.bson.codecs.records.annotations`` package is deprecated. Use the |
110 | | - equivalent ones from the `org.bson.codecs.pojo.annotations <{+api+}/apidocs/bson/org/bson/codecs/pojo/annotations/package-summary.html>`__ |
111 | | - package instead. |
112 | | - |
113 | | -You can use the following annotations on record components: |
114 | | - |
115 | | -.. list-table:: |
116 | | - :header-rows: 1 |
117 | | - :stub-columns: 1 |
118 | | - :widths: 10 10 |
119 | | - |
120 | | - * - Annotation Name |
121 | | - - Description |
122 | | - |
123 | | - * - ``BsonId`` |
124 | | - - Specifies the component to serialize as the _id property. |
125 | | - |
126 | | - * - ``BsonProperty`` |
127 | | - - Specifies a custom document field name when converting the record |
128 | | - component to BSON. Accepts the field name as the parameter. |
129 | | - |
130 | | - * - ``BsonRepresentation`` |
131 | | - - Specifies a BSON type to store when different from the record component |
132 | | - type. Accepts the BSON type as the parameter. |
| 108 | +This section describes how to configure the serialization behavior of record components |
| 109 | +by using annotations. For a full list of supported annotations, see the |
| 110 | +`org.bson.codecs.pojo.annotations package API documentation. |
| 111 | +<{+api+}/apidocs/bson/org/bson/codecs/pojo/annotations/package-summary.html>`__ |
133 | 112 |
|
134 | 113 | .. note:: |
135 | 114 |
|
@@ -196,6 +175,13 @@ as shown in the following code: |
196 | 175 |
|
197 | 176 | NetworkDeviceRecord[deviceId=fedc..., name=Enterprise Wi-fi, deviceType=router] |
198 | 177 |
|
| 178 | +.. note:: |
| 179 | + |
| 180 | + The ``org.bson.codecs.records.annotations`` package is deprecated. Use the equivalent |
| 181 | + annotations from the `org.bson.codecs.pojo.annotations |
| 182 | + <{+api+}/apidocs/bson/org/bson/codecs/pojo/annotations/package-summary.html>`__ package |
| 183 | + instead. |
| 184 | + |
199 | 185 | Operations with Recursive Types |
200 | 186 | ------------------------------- |
201 | 187 |
|
|
0 commit comments