Skip to content

Commit 0be9d4d

Browse files
committed
add comment of GenericRecord
1 parent afc728b commit 0be9d4d

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

openmessaging-api/src/main/java/io/openmessaging/api/schema/GenericRecord.java

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,39 @@
1919
import java.util.List;
2020

2121
/**
22-
* Used for traverse the data in the message body When do not know the specific Schema.
22+
* Used for traverse the data in the message body when do not know the specific Schema.
2323
*
2424
* @version OMS 2.0.0
2525
* @since OMS 2.0.0
2626
*/
2727
public interface GenericRecord {
2828

29+
/**
30+
* return schema id
31+
*
32+
* @return schema id
33+
*/
2934
String getSchemaId();
3035

36+
/**
37+
* return the list of fields associated with the record
38+
*
39+
* @return the list of fields associated with the record
40+
*/
3141
List<Field> getFields();
3242

43+
/**
44+
* retrieve the value of the provided field
45+
*
46+
* @param field the field to retrieve the value
47+
* @return the value object
48+
*/
3349
Object getField(Field field);
3450

35-
Object getField(String field);
51+
/**
52+
* retrieve the value of the provided fieldName
53+
* @param fieldName the field name to retrieve the value
54+
* @return the value object
55+
*/
56+
Object getField(String fieldName);
3657
}

0 commit comments

Comments
 (0)