Package org.drools.rule.VariableRestriction

Examples of org.drools.rule.VariableRestriction.ObjectVariableContextEntry


            } else {
                context.right = ((Number) row[0]).doubleValue();
            }
            return context;
        } else {
            final ObjectVariableContextEntry context = new ObjectVariableContextEntry( extractor,
                                                                                       declaration,
                                                                                       evaluator );
            if ( row[2] == null ) {
                context.leftNull = true;
            } else {
View Full Code Here


            } else {
                context.right = ((Number) row[0]).doubleValue();
            }
            return context;
        } else {
            final ObjectVariableContextEntry context = new ObjectVariableContextEntry( extractor,
                                                                                       declaration,
                                                                                       evaluator );
            if ( row[2] == null ) {
                context.leftNull = true;
            } else {
View Full Code Here

            } else {
                context.right = ((Number) row[0]).doubleValue();
            }
            return context;
        } else {
            final ObjectVariableContextEntry context = new ObjectVariableContextEntry( extractor,
                                                                                       declaration,
                                                                                       evaluator );
            if ( row[2] == null ) {
                context.leftNull = true;
            } else {
View Full Code Here

            } else {
                context.right = ((Number) row[0]).doubleValue();
            }
            return context;
        } else {
            final ObjectVariableContextEntry context = new ObjectVariableContextEntry( extractor,
                                                                                       declaration,
                                                                                       evaluator );
            if ( row[2] == null ) {
                context.leftNull = true;
            } else {
View Full Code Here

            } else {
                context.right = ((Number) row[0]).doubleValue();
            }
            return context;
        } else {
            final ObjectVariableContextEntry context = new ObjectVariableContextEntry( extractor,
                                                                                       declaration,
                                                                                       evaluator );
            if ( row[2] == null ) {
                context.leftNull = true;
            } else {
View Full Code Here

            } else {
                context.right = ((Number) row[0]).doubleValue();
            }
            return context;
        } else {
            final ObjectVariableContextEntry context = new ObjectVariableContextEntry( extractor,
                                                                                       declaration,
                                                                                       evaluator );
            if ( row[2] == null ) {
                context.leftNull = true;
            } else {
View Full Code Here

                                                   null );

        if( Operator.MEMBEROF.equals( evaluator.getOperator() ) ||
            Operator.NOTMEMBEROF.equals( evaluator.getOperator() ) ) {

            final ObjectVariableContextEntry context = new ObjectVariableContextEntry( extractor,
                                                                                       declaration );
            if (row[2] == null) {
               context.leftNull = true;
            } else {
               context.left = row[2];
            }

            if (row[0] == null) {
               context.rightNull = true;
            } else {
               context.right = row[0];
            }
            return context;

        } else {
            if ( valueType.isIntegerNumber() ) {
                final LongVariableContextEntry context = new LongVariableContextEntry( extractor,
                                                                                 declaration );

                if (row[2] == null) {
                    context.leftNull = true;
                } else {
                    context.left = ((Number) row[2]).longValue();
                }

                if (row[0] == null) {
                    context.rightNull = true;
                } else {
                    context.right = ((Number) row[0]).longValue();
                }
                return context;
            } else if ( valueType.isChar() ) {
                final CharVariableContextEntry context = new CharVariableContextEntry( extractor,
                                                                                       declaration );

                if (row[2] == null) {
                    context.leftNull = true;
                } else {
                    context.left = ((Character) row[2]).charValue();
                }

                if (row[0] == null) {
                    context.rightNull = true;
                } else {
                    context.right = ((Character) row[0]).charValue();
                }
                return context;
            } else if ( valueType.isBoolean() ) {
                final BooleanVariableContextEntry context = new BooleanVariableContextEntry( extractor,
                                                                                       declaration );

                if (row[2] == null) {
                    context.leftNull = true;
                } else {
                    context.left = ((Boolean) row[2]).booleanValue();
                }

                if (row[0] == null) {
                    context.rightNull = true;
                } else {
                    context.right = ((Boolean) row[0]).booleanValue();
                }
                return context;
            } else if ( valueType.isFloatNumber() ) {
                final DoubleVariableContextEntry context = new DoubleVariableContextEntry( extractor,
                                                                                     declaration );
                if (row[2] == null) {
                    context.leftNull = true;
                } else {
                    context.left = ((Number) row[2]).doubleValue();
                }

                if (row[0] == null) {
                    context.rightNull = true;
                } else {
                    context.right = ((Number) row[0]).doubleValue();
                }
                return context;
            } else {
                final ObjectVariableContextEntry context = new ObjectVariableContextEntry( extractor,
                                                                                     declaration );
                if (row[2] == null) {
                    context.leftNull = true;
                } else {
                    context.left = row[2];
View Full Code Here

                                                   null );
       
        if( Operator.MEMBEROF.equals( evaluator.getOperator() ) ||
            Operator.NOTMEMBEROF.equals( evaluator.getOperator() ) ) {

            final ObjectVariableContextEntry context = new ObjectVariableContextEntry( extractor,
                                                                                       declaration );
            if (row[2] == null) {
               context.leftNull = true;
            } else {
               context.left = row[2];
            }
          
            if (row[0] == null) {
               context.rightNull = true;
            } else {
               context.right = row[0];
            }
            return context;
           
        } else {
            if ( valueType.isIntegerNumber() ) {
                final LongVariableContextEntry context = new LongVariableContextEntry( extractor,
                                                                                 declaration );
               
                if (row[2] == null) {
                    context.leftNull = true;
                } else {
                    context.left = ((Number) row[2]).longValue();
                }
               
                if (row[0] == null) {
                    context.rightNull = true;
                } else {
                    context.right = ((Number) row[0]).longValue();
                }
                return context;
            } else if ( valueType.isChar() ) {
                final CharVariableContextEntry context = new CharVariableContextEntry( extractor,
                                                                                       declaration );
                     
                if (row[2] == null) {
                    context.leftNull = true;
                } else {
                    context.left = ((Character) row[2]).charValue();
                }
               
                if (row[0] == null) {
                    context.rightNull = true;
                } else {
                    context.right = ((Character) row[0]).charValue();
                }
                return context;
            } else if ( valueType.isBoolean() ) {
                final BooleanVariableContextEntry context = new BooleanVariableContextEntry( extractor,
                                                                                       declaration );
               
                if (row[2] == null) {
                    context.leftNull = true;
                } else {
                    context.left = ((Boolean) row[2]).booleanValue();
                }
               
                if (row[0] == null) {
                    context.rightNull = true;
                } else {
                    context.right = ((Boolean) row[0]).booleanValue();
                }
                return context;
            } else if ( valueType.isFloatNumber() ) {
                final DoubleVariableContextEntry context = new DoubleVariableContextEntry( extractor,
                                                                                     declaration );
                if (row[2] == null) {
                    context.leftNull = true;
                } else {
                    context.left = ((Number) row[2]).doubleValue();
                }
               
                if (row[0] == null) {
                    context.rightNull = true;
                } else {
                    context.right = ((Number) row[0]).doubleValue();
                }
                return context;
            } else {
                final ObjectVariableContextEntry context = new ObjectVariableContextEntry( extractor,
                                                                                     declaration );
                if (row[2] == null) {
                    context.leftNull = true;
                } else {
                    context.left = row[2];
View Full Code Here

            } else {
                context.right = ((Number) row[0]).doubleValue();
            }
            return context;
        } else {
            final ObjectVariableContextEntry context = new ObjectVariableContextEntry( extractor,
                                                                                       declaration,
                                                                                       evaluator );
            if ( row[2] == null ) {
                context.leftNull = true;
            } else {
View Full Code Here

            } else {
                context.right = ((Number) row[0]).doubleValue();
            }
            return context;
        } else {
            final ObjectVariableContextEntry context = new ObjectVariableContextEntry( extractor,
                                                                                       declaration,
                                                                                       evaluator );
            if ( row[2] == null ) {
                context.leftNull = true;
            } else {
View Full Code Here

TOP

Related Classes of org.drools.rule.VariableRestriction.ObjectVariableContextEntry

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.