Package org.drools.factmodel.traits

Examples of org.drools.factmodel.traits.TraitFieldTMS


            ((ShadowProxy) handle.getObject()).updateProxy();
        }

        if ( objectTypeConf.isTraitTMSEnabled() ) {
            if ( handle.isTraitOrTraitable() && handle.isTraitable() ) {
                TraitFieldTMS tms = ( (TraitableBean) handle.getObject() )._getFieldTMS();
                if ( tms.needsInit() ) {
                    tms.init( workingMemory );
                }
            }
        }

        ObjectTypeNode[] cachedNodes = objectTypeConf.getObjectTypeNodes();
View Full Code Here


            ((ShadowProxy) handle.getObject()).updateProxy();
        }

        if ( objectTypeConf.isTraitTMSEnabled() ) {
            if ( handle.isTraitOrTraitable() && handle.isTraitable() ) {
                TraitFieldTMS tms = ( (TraitableBean) handle.getObject() )._getFieldTMS();
                if ( tms.needsInit() ) {
                    tms.init( workingMemory );
                }
            }
        }
        ObjectTypeNode[] cachedNodes = objectTypeConf.getObjectTypeNodes();
       
View Full Code Here

    private <T> void updateCore( TraitableBean inner, Object core, Class<T> trait, boolean logical ) {
        FactHandle handle = lookupFactHandle( inner );
        InternalFactHandle h = (InternalFactHandle) handle;
        if ( handle != null ) {
            TraitFieldTMS fieldTMS = inner._getFieldTMS();
            long mask = fieldTMS == null ? Long.MIN_VALUE : fieldTMS.getAndResetModificationMask();
            ((NamedEntryPoint) h.getEntryPoint()).update( h,
                                                          ((InternalFactHandle)handle).getObject(),
                                                          mask,
                                                          core.getClass(),
                                                          this.activation );
View Full Code Here

            }
            if ( inner._getFieldTMS() != null && inner._getFieldTMS().needsInit() ) {
                inner._getFieldTMS().init( workingMemory );
            }
        } else {
            TraitFieldTMS ftms = inner._getFieldTMS();
            if ( ftms != null ) {
                FactHandle handle = lookupFactHandle( inner );
                if ( handle == null ) {
                    handle = this.workingMemory.insert( inner,
                                                        null,
                                                        false,
                                                        logical,
                                                        this.activation.getRule(),
                                                        this.activation );
                    if ( this.identityMap != null ) {
                        this.getIdentityMap().put( inner,
                                                   handle );
                    }
                }
                if ( ftms.needsInit() ) {
                    ftms.init( workingMemory );
                }
            }
        }
        return inner;
    }
View Full Code Here

    private <T> void updateCore( TraitableBean inner, Object core, Class<T> trait, boolean logical ) {
        FactHandle handle = lookupFactHandle( inner );
        InternalFactHandle h = (InternalFactHandle) handle;
        if ( handle != null ) {
            TraitFieldTMS fieldTMS = inner._getFieldTMS();
            long mask = fieldTMS == null ? Long.MIN_VALUE : fieldTMS.getAndResetModificationMask();
            ((NamedEntryPoint) h.getEntryPoint()).update( h,
                                                          ((InternalFactHandle)handle).getObject(),
                                                          mask,
                                                          core.getClass(),
                                                          this.activation );
View Full Code Here

            }
            if ( inner._getFieldTMS() != null && inner._getFieldTMS().needsInit() ) {
                inner._getFieldTMS().init( workingMemory );
            }
        } else {
            TraitFieldTMS ftms = inner._getFieldTMS();
            if ( ftms != null ) {
                FactHandle handle = lookupFactHandle( inner );
                if ( handle == null ) {
                    handle = this.workingMemory.insert( inner,
                                                        null,
                                                        false,
                                                        logical,
                                                        this.activation.getRule(),
                                                        this.activation );
                    if ( this.identityMap != null ) {
                        this.getIdentityMap().put( inner,
                                                   handle );
                    }
                }
                if ( ftms.needsInit() ) {
                    ftms.init( workingMemory );
                }
            }
        }
        return inner;
    }
View Full Code Here

TOP

Related Classes of org.drools.factmodel.traits.TraitFieldTMS

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.