Package org.apache.isis.core.runtime.system.persistence

Examples of org.apache.isis.core.runtime.system.persistence.IdentifierGenerator.underlying()


    public PersistenceSession createPersistenceSession() {
        final PersistenceSession persistenceSession = super.createPersistenceSession();
        if (persistedObjects != null) {
            final OidGenerator oidGenerator = persistenceSession.getOidGenerator();
            final IdentifierGenerator identifierGenerator = oidGenerator.getIdentifierGenerator();
            final IdentifierGeneratorDefault identifierGeneratorDefault = identifierGenerator.underlying(IdentifierGeneratorDefault.class);
            if(identifierGeneratorDefault != null) {
                identifierGeneratorDefault.resetTo(persistedObjects.getOidGeneratorMemento());
            }
        }
View Full Code Here


     */
    public void attach(final PersistenceSession persistenceSession, final ObjectStorePersistedObjects persistedObjects) {
        final OidGenerator oidGenerator = persistenceSession.getOidGenerator();
        final IdentifierGenerator identifierGenerator = oidGenerator.getIdentifierGenerator();

        final IdentifierGeneratorDefault identifierGeneratorDefault = identifierGenerator.underlying(IdentifierGeneratorDefault.class);
        if(identifierGeneratorDefault != null) {
            identifierGeneratorDefault.resetTo(persistedObjects.getOidGeneratorMemento());
            persistedObjects.saveOidGeneratorMemento(identifierGeneratorDefault.getMemento());
        }

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.