public class HollowObjectMapper
extends java.lang.Object
Constructor and Description |
---|
HollowObjectMapper(HollowWriteStateEngine stateEngine) |
Modifier and Type | Method and Description |
---|---|
int |
add(java.lang.Object o)
Adds the specified POJO to the state engine.
|
int |
addObject(java.lang.Object o)
Deprecated.
use
add(Object) instead. |
void |
doNotUseDefaultHashKeys() |
HollowWriteStateEngine |
getStateEngine() |
void |
ignoreListOrdering() |
void |
initializeTypeState(java.lang.Class<?> clazz)
Initializes the schema for the specified type in the data model.
|
void |
useDefaultHashKeys() |
public HollowObjectMapper(HollowWriteStateEngine stateEngine)
public void ignoreListOrdering()
public void useDefaultHashKeys()
public void doNotUseDefaultHashKeys()
public int add(java.lang.Object o)
Unless previously initialized with initializeTypeState(Class)
,
the first time an instance of a particular type is added
its schema is derived and added to the data model.
o
- the POJO to add@Deprecated public int addObject(java.lang.Object o)
add(Object)
instead.public void initializeTypeState(java.lang.Class<?> clazz)
The schema will be derived from the field and type names in
clazz
and added to the state engine's data model;
schemas of types referenced from clazz
will also be added.
This can be used to add a type's schema to the state engine
without having to add any data for that type.
clazz
- type whose schema to derive and add to the data modeladd(Object)
public HollowWriteStateEngine getStateEngine()