Examples of EntityState


Examples of org.qi4j.spi.entity.EntityState

    {
        // Check command rules
        Date modificationDate = request.getConditions().getUnmodifiedSince();
        if( modificationDate != null )
        {
            EntityState state = spi.entityStateOf( entity );
            Date lastModified = new Date( ( state.lastModified() / 1000 ) * 1000 ); // Cut off milliseconds
            if( lastModified.after( modificationDate ) )
            {
                throw new ResourceException( Status.CLIENT_ERROR_CONFLICT );
            }
        }

        // Check query rules
        modificationDate = request.getConditions().getModifiedSince();
        if( modificationDate != null )
        {
            EntityState state = spi.entityStateOf( entity );
            Date lastModified = new Date( ( state.lastModified() / 1000 ) * 1000 ); // Cut off milliseconds
            if( !lastModified.after( modificationDate ) )
            {
                throw new ResourceException( Status.REDIRECTION_NOT_MODIFIED );
            }
        }
View Full Code Here

Examples of org.springframework.data.neo4j.core.EntityState

        }

        @Override
        public void valueChanged(NodeBacked nodeBacked, Object oldVal, Object newVal) {
            if (newVal != null) {
                EntityState entityState =nodeBacked.getEntityState();
                entityState.persist();
            }
        }
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.