Examples of identity()


Examples of org.qi4j.library.scheduler.schedule.once.OnceSchedule.identity()

            ValueBuilder<OnceSchedule> builder = module.newValueBuilder( OnceSchedule.class );
            OnceSchedule builderInstance = builder.prototype();
            builderInstance.task().set( task );
            builderInstance.start().set( runAt );
            OnceSchedule schedule = builder.newInstance();
            logger.info( "Schedule {} created: {}", schedule.presentationString(), schedule.identity().get() );
            return schedule;
        }

        private Schedule newPersistentOnceSchedule( Task task, DateTime runAt )
        {
View Full Code Here

Examples of org.qi4j.runtime.entity.EntityInstance.identity()

        if( handler instanceof ProxyReferenceInvocationHandler )
        {
            handler = Proxy.getInvocationHandler( ( (ProxyReferenceInvocationHandler) handler ).proxy() );
        }
        EntityInstance instance = (EntityInstance) handler;
        return instance.identity();
    }

    protected void checkType( Object instance )
    {
        if( instance != null )
View Full Code Here

Examples of org.qi4j.runtime.entity.EntityInstance.identity()

    {
        EntityComposite entityComposite = (EntityComposite) entity;
        EntityInstance compositeInstance = EntityInstance.getEntityInstance( entityComposite );
        ModelModule<EntityModel> model = new ModelModule<EntityModel>( compositeInstance.module(), compositeInstance.entityModel() );
        Class<T> type = (Class<T>) compositeInstance.type();
        return uow.get( compositeInstance.identity(), this, Collections.singletonList( model), type );
    }

    public void remove( Object entity )
        throws LifecycleException
    {
View Full Code Here

Examples of org.qi4j.runtime.entity.EntityInstance.identity()

        EntityInstance compositeInstance = EntityInstance.getEntityInstance( entityComposite );

        if( compositeInstance.status() == EntityStatus.NEW )
        {
            compositeInstance.remove( this );
            uow.remove( compositeInstance.identity() );
        }
        else if( compositeInstance.status() == EntityStatus.LOADED || compositeInstance.status() == EntityStatus.UPDATED )
        {
            compositeInstance.remove( this );
        }
View Full Code Here

Examples of org.qi4j.runtime.entity.EntityInstance.identity()

        {
            compositeInstance.remove( this );
        }
        else
        {
            throw new NoSuchEntityException( compositeInstance.identity() );
        }
    }

    public void complete()
        throws UnitOfWorkCompletionException, ConcurrentEntityModificationException
View Full Code Here

Examples of org.qi4j.runtime.entity.EntityInstance.identity()

        if( handler instanceof ProxyReferenceInvocationHandler )
        {
            handler = Proxy.getInvocationHandler( ( (ProxyReferenceInvocationHandler) handler ).proxy() );
        }
        EntityInstance instance = (EntityInstance) handler;
        return instance.identity();
    }

    protected void checkType( Object instance )
    {
        if( instance != null )
View Full Code Here

Examples of org.qi4j.runtime.entity.EntityInstance.identity()

        EntityInstance compositeInstance = EntityInstance.entityInstanceOf( entityComposite );

        if( compositeInstance.status() == EntityStatus.NEW )
        {
            compositeInstance.remove( this );
            uow.remove( compositeInstance.identity() );
        }
        else if( compositeInstance.status() == EntityStatus.LOADED || compositeInstance.status() == EntityStatus.UPDATED )
        {
            compositeInstance.remove( this );
        }
View Full Code Here

Examples of org.qi4j.runtime.entity.EntityInstance.identity()

        {
            compositeInstance.remove( this );
        }
        else
        {
            throw new NoSuchEntityException( compositeInstance.identity(), compositeInstance.types() );
        }
    }

    @Override
    public void complete()
View Full Code Here

Examples of org.qi4j.runtime.entity.EntityInstance.identity()

    {
        EntityComposite entityComposite = (EntityComposite) entity;
        EntityInstance compositeInstance = EntityInstance.entityInstanceOf( entityComposite );
        ModelModule<EntityModel> model = new ModelModule<>( compositeInstance.module(), compositeInstance.entityModel() );
        Class<T> type = (Class<T>) first( compositeInstance.types() );
        return uow.get( compositeInstance.identity(), this, Collections.singletonList( model ), type );
    }

    @Override
    public void remove( Object entity )
        throws LifecycleException
View Full Code Here

Examples of org.qi4j.spi.entity.EntityState.identity()

        public EntityState getEntityState( EntityReference anIdentity )
            throws EntityStoreException, EntityNotFoundException
        {
            EntityState entityState = uow.getEntityState( anIdentity );
            versions.rememberVersion( entityState.identity(), entityState.version() );
            loaded.add( entityState );
            return entityState;
        }
    }
}
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.