Package org.drools.core.base

Examples of org.drools.core.base.ClassObjectType


        }

        // it may be a global or something
        if ( this.map.containsKey( (identifier) ) ) {
            Class<?> cls = this.map.get( identifier );
            ClassObjectType classObjectType = new ClassObjectType( cls );

            Declaration declaration;
            final Pattern dummy = new Pattern( 0,
                                               classObjectType );
View Full Code Here


            String entryPointId = inCtx.readUTF();
            EntryPointNode epn = inCtx.wm.getKnowledgeBase().getRete().getEntryPointNode( new EntryPointId( entryPointId ) );

            String className = inCtx.readUTF();
            Class< ? > cls = inCtx.wm.getKnowledgeBase().getRootClassLoader().loadClass( className );
            ObjectTypeNode otn = epn.getObjectTypeNodes().get( new ClassObjectType( cls ) );

            long nextTimeStamp = inCtx.readLong();

            TimerService clock = inCtx.wm.getTimerService();
View Full Code Here

                                Timer _timer) throws ClassNotFoundException {
            ExpireTimer _expire = _timer.getExpire();
            InternalFactHandle factHandle = inCtx.handles.get( _expire.getHandleId() );
            EntryPointNode epn = inCtx.wm.getKnowledgeBase().getRete().getEntryPointNode( new EntryPointId( _expire.getEntryPointId() ) );
            Class<?> cls = inCtx.wm.getKnowledgeBase().getRootClassLoader().loadClass( _expire.getClassName() );
            ObjectTypeNode otn = epn.getObjectTypeNodes().get( new ClassObjectType( cls ) );
           
            TimerService clock = inCtx.wm.getTimerService();
           
            JobContext jobctx = new ExpireJobContext( new WorkingMemoryReteExpireAction(factHandle, otn),
                                                      inCtx.wm );
View Full Code Here

    }

    public ObjectType getObjectType() {
        if ( this.objectType == null ) {
            if ( this.getFormat() == Format.POJO ) {
                this.objectType = new ClassObjectType( this.getTypeClass() );
            } else {
                this.objectType = new FactTemplateObjectType( this.getTypeTemplate() );
            }
        }
        return this.objectType;
View Full Code Here

        this.entryPoint = entryPoint;
        this.typeDecl = kBase.getTypeDeclaration( clazz );
        isEvent = typeDecl != null && typeDecl.getRole() == TypeDeclaration.Role.EVENT;
        isTrait = determineTraitStatus();

        ObjectType objectType = kBase.getClassFieldAccessorCache().getClassObjectType( new ClassObjectType( clazz,
                                                                                                                                    isEvent ) );

        this.concreteObjectTypeNode = kBase.getRete().getObjectTypeNodes( entryPoint ).get( objectType );
        if ( this.concreteObjectTypeNode == null ) {
            BuildContext context = new BuildContext( kBase,
View Full Code Here

            if ( clazz == DroolsQuery.class ) {
                // for query objects only add direct matches
                if ( ((ClassObjectType)node.getObjectType()).getClassType() == clazz ) {
                    cache.add( node );   
                }
            } else if ( node.isAssignableFrom( new ClassObjectType( clazz ) ) ) {
                cache.add( node );
            }
        }

        Collections.sort(cache, OBJECT_TYPE_NODE_COMPARATOR);
View Full Code Here

            String entryPointId = inCtx.readUTF();
            EntryPointNode epn = inCtx.wm.getKnowledgeBase().getRete().getEntryPointNode( new EntryPointId( entryPointId ) );

            String className = inCtx.readUTF();
            Class< ? > cls = inCtx.wm.getKnowledgeBase().getRootClassLoader().loadClass( className );
            ObjectTypeNode otn = epn.getObjectTypeNodes().get( new ClassObjectType( cls ) );

            long nextTimeStamp = inCtx.readLong();

            TimerService clock = inCtx.wm.getTimerService();
View Full Code Here

                                Timer _timer) throws ClassNotFoundException {
            ExpireTimer _expire = _timer.getExpire();
            InternalFactHandle factHandle = inCtx.handles.get( _expire.getHandleId() );
            EntryPointNode epn = inCtx.wm.getKnowledgeBase().getRete().getEntryPointNode( new EntryPointId( _expire.getEntryPointId() ) );
            Class<?> cls = inCtx.wm.getKnowledgeBase().getRootClassLoader().loadClass( _expire.getClassName() );
            ObjectTypeNode otn = epn.getObjectTypeNodes().get( new ClassObjectType( cls ) );
           
            TimerService clock = inCtx.wm.getTimerService();
           
            JobContext jobctx = new ExpireJobContext( new WorkingMemoryReteExpireAction(factHandle, otn),
                                                      inCtx.wm );
View Full Code Here

    public Collection<Object> instantiateResultObject(InternalWorkingMemory wm) throws RuntimeException {
        try {
            // Collect can only be used with a Collection implementation, so
            // FactTemplateObject type is not allowed
            if ( this.cls == null ) {
                ClassObjectType objType = ((ClassObjectType) this.resultPattern.getObjectType());
                String className = determineResultClassName( objType );
                this.cls = (Class<Collection<Object>>) Class.forName( className,
                                                                      true,
                                                                      wm.getKnowledgeBase().getRootClassLoader() );
            }
View Full Code Here

        this.entryPoint = entryPoint;
        this.typeDecl = kBase.getTypeDeclaration( clazz );
        isEvent = typeDecl != null && typeDecl.getRole() == TypeDeclaration.Role.EVENT;
        isTrait = determineTraitStatus();

        ObjectType objectType = kBase.getClassFieldAccessorCache().getClassObjectType( new ClassObjectType( clazz,
                                                                                                                                    isEvent ) );

        this.concreteObjectTypeNode = kBase.getRete().getObjectTypeNodes( entryPoint ).get( objectType );
        if ( this.concreteObjectTypeNode == null ) {
            BuildContext context = new BuildContext( kBase,
View Full Code Here

TOP

Related Classes of org.drools.core.base.ClassObjectType

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.