Examples of memento()


Examples of org.apache.isis.core.metamodel.facets.object.viewmodel.ViewModelFacet.memento()

    public String createTransientIdentifierFor(ObjectSpecId objectSpecId, Object pojo) {

        final ObjectSpecification spec = getSpecificationLoader().lookupBySpecId(objectSpecId);
        final ViewModelFacet viewModelFacet = spec.getFacet(ViewModelFacet.class);
        if(viewModelFacet != null) {
            return viewModelFacet.memento(pojo);
        }

        return UUID.randomUUID().toString();
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.object.viewmodel.ViewModelFacet.memento()

        }
       
        final ObjectSpecification spec = getSpecificationLookup().lookupBySpecId(objectSpecId);
        if(spec.containsFacet(ViewModelFacet.class)) {
            ViewModelFacet viewModelFacet = spec.getFacet(ViewModelFacet.class);
            return viewModelFacet.memento(pojo);
        }
        final Object jdoOid = getJdoPersistenceManager().getObjectId(pojo);
        return JdoObjectIdSerializer.toOidIdentifier(jdoOid);
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.object.viewmodel.ViewModelFacet.memento()

                    } else {
                        // not expected; just ignore.
                    }
                }
               
                final String memento = viewModelFacet.memento(template);
                final T viewModel = container.newViewModelInstance(cls, memento);
                viewModels.add(viewModel);
            }
        }
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.