public final class SimpleFragment extends Fragment
| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleFragment.FieldComparator
Comparator of
SimpleFragments according to a field. |
Fragment.State| Modifier and Type | Field and Description |
|---|---|
static SimpleFragment |
UNKNOWN |
| Constructor and Description |
|---|
SimpleFragment(Row row,
Fragment.State state,
PersistenceContext context)
Constructs a
SimpleFragment from a Row. |
| Modifier and Type | Method and Description |
|---|---|
Serializable |
get(String key)
Gets a value by key.
|
List<String> |
getDirtyKeys()
Gets the dirty keys (keys of values changed since last clear).
|
RowMapper.RowUpdate |
getRowUpdate()
Returns the row update to do in the database to write this value.
|
String |
getString(String key)
Returns a
String value. |
void |
put(String key,
Serializable value)
Puts a value by key.
|
protected Fragment.State |
refetch()
Refetches this fragment from the database.
|
protected Fragment.State |
refetchDeleted()
Resets the data for a fragment that was invalidated by deletion.
|
accessed, clearDirty, getId, getState, markModified, setDeleted, setDetached, setId, setInvalidatedDeleted, setInvalidatedModified, setPristine, toStringpublic static final SimpleFragment UNKNOWN
public SimpleFragment(Row row, Fragment.State state, PersistenceContext context)
SimpleFragment from a Row.row - the row, or nullstate - the initial state for the fragmentcontext - the persistence context to which the fragment is tied, or nullprotected Fragment.State refetch()
Fragmentrefetch in class FragmentFragment.State.PRISTINE or Fragment.State.ABSENTprotected Fragment.State refetchDeleted()
FragmentrefetchDeleted in class FragmentFragment.State.PRISTINE or Fragment.State.ABSENTpublic Serializable get(String key)
key - the keypublic void put(String key, Serializable value)
key - the keyvalue - the valuepublic String getString(String key)
String value.key - the keyStringClassCastException - if the value is not a Stringpublic RowMapper.RowUpdate getRowUpdate()
FragmentgetRowUpdate in class Fragmentnull if the value is unchanged since last clearpublic List<String> getDirtyKeys()
Copyright © 2019 Nuxeo. All rights reserved.