Search in sources :

Example 1 with IFragmentModel

use of org.whole.lang.model.IFragmentModel in project whole by wholeplatform.

the class AbstractFragment method wSetChildrenModel.

protected void wSetChildrenModel(IFragmentModel model) {
    IFragmentModel newModel = (IFragmentModel) model.clone();
    newModel.setFragment(this);
    ((InternalIEntity) rootEntity).wSetModel(newModel);
}
Also used : IFragmentModel(org.whole.lang.model.IFragmentModel) InternalIEntity(org.whole.lang.model.InternalIEntity)

Example 2 with IFragmentModel

use of org.whole.lang.model.IFragmentModel in project whole by wholeplatform.

the class ReflectionFactory method makeRootEntity.

public static <E extends IEntity> E makeRootEntity(E entity, IFragmentModel parentFragmentModel) {
    IFragmentModel fragmentModel = getLanguageKit(entity).createFragmentModel();
    if (parentFragmentModel != NullFragmentModel.instance)
        fragmentModel.setCompoundModel(parentFragmentModel.getCompoundModel());
    ((InternalIEntity) entity).wSetModel(fragmentModel);
    return entity;
}
Also used : IFragmentModel(org.whole.lang.model.IFragmentModel) InternalIEntity(org.whole.lang.model.InternalIEntity)

Aggregations

IFragmentModel (org.whole.lang.model.IFragmentModel)2 InternalIEntity (org.whole.lang.model.InternalIEntity)2