Package org.apache.isis.core.metamodel.adapter.version

Examples of org.apache.isis.core.metamodel.adapter.version.SerialNumberVersion


        }
    }

    @Override
    public void save(final DatabaseConnector connector, final ObjectAdapter object) {
        final SerialNumberVersion version = (SerialNumberVersion) object.getVersion();
        final long nextSequence = version.getSequence() + 1;

        final StringBuffer sql = new StringBuffer();
        sql.append("UPDATE " + table + " SET ");
        for (final FieldMapping mapping : fieldMappings) {
            mapping.appendUpdateValues(connector, sql, object);
View Full Code Here


        final CollectionFacet collectionFacet = field.getFacet(CollectionFacet.class);
        for (final ObjectAdapter element : collectionFacet.iterable(collection)) {
            final StringBuffer insert = new StringBuffer(sql);
            insert.append(values(connector, element));
            final SerialNumberVersion version = new SerialNumberVersion(0, "", new Date());
            insert.append(versionMapping.insertValues(connector, version));
            insert.append(") ");

            connector.insert(insert.toString());
            element.setOptimisticLock(version);
View Full Code Here

        configuration = new TestProxyConfiguration();
        spec = new TestProxySpecification(this.getClass());
        spec.fields = Collections.emptyList();
        adapter = new TestProxyAdapter();
        adapter.setupSpecification(spec);
        adapter.setOptimisticLock(new SerialNumberVersion(23, null, null));
        adapter.setupOid(SerialOid.createPersistent(1));
        persistenceHelper = new ObjectStorePersistenceHelper(spec);
        transaction = null;
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.adapter.version.SerialNumberVersion

Copyright © 2018 www.massapicom. 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.