Package io.higson.runtime.helper
Class PersistenceMarker
java.lang.Object
io.higson.runtime.helper.PersistenceMarker
Scans bundle and mark all properties persistent or transient.
Here are the rules:
1. ValueProperty is transient when created by get()
2. ValueProperty is persistent when modified by set()
3. EntityProperty is persistent when any child is persistent
4. CollectionProperty is persistent
5. CollectionProperty elements are persistent
- Author:
- przemek hertel
-
Method Summary
Modifier and TypeMethodDescriptionstatic PersistenceMarkerscans bundle and mark all properties persistent or transient, transient entities are collected in [transientProperties] collectionvoid
-
Method Details
-
mark
scans bundle and mark all properties persistent or transient, transient entities are collected in [transientProperties] collection- Parameters:
b- bundle to mark- Returns:
- new instance of persistence marker which marked given bundle
-
removeTransients
public void removeTransients()
-