Package org.drools

Examples of org.drools.RuntimeDroolsException


            final Expander expander = new DefaultExpander();
            expander.addDSLMapping( file.getMapping() );
            this.expanders.put( "*",
                                expander );
        } else {
            throw new RuntimeDroolsException( "Error parsing and loading DSL file." + file.getErrors() );
        }
    }
View Full Code Here


                if ( isNegative && context.getRuleBase().getConfiguration().getEventProcessingMode() == EventProcessingOption.STREAM && pattern.getObjectType().isEvent() && constraint.isTemporal() ) {
                    checkDelaying( context,
                            constraint );
                }
            } else {
                throw new RuntimeDroolsException( "Unknown constraint type: " + constraint.getType() + ". This is a bug. Please contact development team." );
            }

        }
    }
View Full Code Here

            final ClassFieldInspector inspector = new ClassFieldInspector( clazz );
            this.index = ((Integer) inspector.getFieldNames().get( fieldName )).intValue();
            this.fieldType = (Class< ? >) inspector.getFieldTypes().get( fieldName );
            this.valueType = ValueType.determineValueType( this.fieldType );
        } catch ( final Exception e ) {
            throw new RuntimeDroolsException( e );
        }
    }
View Full Code Here

    public boolean getBooleanValue(InternalWorkingMemory workingMemory,
                                   final Object object) {
        if ( this.objectType.getValueType().isBoolean() ) {
            return ((Boolean) object).booleanValue();
        }
        throw new RuntimeDroolsException( "Conversion to boolean not supported for type: " + object.getClass() );
    }
View Full Code Here

    public byte getByteValue(InternalWorkingMemory workingMemory,
                             final Object object) {
        if ( this.objectType.getValueType().isNumber() ) {
            return ((Number) object).byteValue();
        }
        throw new RuntimeDroolsException( "Conversion to byte not supported for type: " + object.getClass() );
    }
View Full Code Here

    public char getCharValue(InternalWorkingMemory workingMemory,
                             final Object object) {
        if ( this.objectType.getValueType().isChar() ) {
            return ((Character) object).charValue();
        }
        throw new RuntimeDroolsException( "Conversion to char not supported for type: " + object.getClass() );
    }
View Full Code Here

    public double getDoubleValue(InternalWorkingMemory workingMemory,
                                 final Object object) {
        if ( this.objectType.getValueType().isNumber() ) {
            return ((Number) object).doubleValue();
        }
        throw new RuntimeDroolsException( "Conversion to double not supported for type: " + object.getClass() );
    }
View Full Code Here

    public float getFloatValue(InternalWorkingMemory workingMemory,
                               final Object object) {
        if ( this.objectType.getValueType().isNumber() ) {
            return ((Number) object).floatValue();
        }
        throw new RuntimeDroolsException( "Conversion to float not supported for type: " + object.getClass() );
    }
View Full Code Here

    public int getIntValue(InternalWorkingMemory workingMemory,
                           final Object object) {
        if ( this.objectType.getValueType().isNumber() ) {
            return ((Number) object).intValue();
        }
        throw new RuntimeDroolsException( "Conversion to int not supported for type: " + object.getClass() );
    }
View Full Code Here

            return ((Number) object).longValue();
        } else if( object instanceof EventFactHandle ) {
            // special case for handling event timestamps
            return ((EventFactHandle)object).getStartTimestamp();
        }
        throw new RuntimeDroolsException( "Conversion to long not supported for type: " + object.getClass() );
    }
View Full Code Here

TOP

Related Classes of org.drools.RuntimeDroolsException

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.