public EntityModel toEditMode() { setMode(Mode.EDIT); for (final ScalarModel scalarModel : propertyScalarModels.values()) { scalarModel.toEditMode(); } return this; }
/** Lazily populates with the current value of each property. */ public ScalarModel getPropertyModel(final PropertyMemento pm) { ScalarModel scalarModel = propertyScalarModels.get(pm); if (scalarModel == null) { scalarModel = new ScalarModel(getObjectAdapterMemento(), pm); if (isViewMode()) { scalarModel.toViewMode(); } else { scalarModel.toEditMode(); } propertyScalarModels.put(pm, scalarModel); } return scalarModel; }