public class CollectionFragment extends Fragment
Fragment.State
Constructor and Description |
---|
CollectionFragment(Row row,
Fragment.State state,
PersistenceContext context)
Constructs a
CollectionFragment from a Row . |
Modifier and Type | Method and Description |
---|---|
Serializable[] |
get()
Gets the collection value.
|
RowMapper.RowUpdate |
getRowUpdate()
Returns the row update to do in the database to write this value.
|
boolean |
isDirty()
Checks if the array is dirty (values changed since last clear).
|
static boolean |
isPrefix(Serializable[] left,
Serializable[] right)
Checks if the left array is a strict prefix of the right one.
|
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.
|
void |
set(Serializable[] value)
Sets a collection value.
|
accessed, clearDirty, getId, getState, markModified, setDeleted, setDetached, setId, setInvalidatedDeleted, setInvalidatedModified, setPristine, toString
public CollectionFragment(Row row, Fragment.State state, PersistenceContext context)
CollectionFragment
from a Row
.row
- the rowstate
- the initial state for the fragmentcontext
- the persistence context to which the fragment is tied, or null
public void set(Serializable[] value)
value
- the valuepublic Serializable[] get()
public boolean isDirty()
true
if the array changedpublic RowMapper.RowUpdate getRowUpdate()
Fragment
getRowUpdate
in class Fragment
null
if the value is unchanged since last clearpublic static boolean isPrefix(Serializable[] left, Serializable[] right)
protected Fragment.State refetch()
Fragment
refetch
in class Fragment
Fragment.State.PRISTINE
or Fragment.State.ABSENT
protected Fragment.State refetchDeleted()
Fragment
refetchDeleted
in class Fragment
Fragment.State.PRISTINE
or Fragment.State.ABSENT
Copyright © 2017 Nuxeo. All rights reserved.