Package org.drools

Examples of org.drools.RuntimeDroolsException


                // wire all remaining resources
                for (String resourceName : this.wireList) {
                    wire( convertResourceToClassName( resourceName ) );
                }
            } catch (Exception e) {
                throw new RuntimeDroolsException( "Unable to wire up JavaDialect",
                                                  e );
            }
        }

        this.wireList.clear();
View Full Code Here


                    this.wireList = new ArrayList<String>();
                }
                this.wireList.add( resourceName );
            } catch (final Exception e) {
                e.printStackTrace();
                throw new RuntimeDroolsException( e );
            }
        }
    }
View Full Code Here

                Entry entry = (Entry) object;
                wire( (String) entry.getKey(),
                      entry.getValue() );
            }
        } catch (final ClassNotFoundException e) {
            throw new RuntimeDroolsException( e );
        } catch (final InstantiationError e) {
            throw new RuntimeDroolsException( e );
        } catch (final IllegalAccessException e) {
            throw new RuntimeDroolsException( e );
        } catch (final InstantiationException e) {
            throw new RuntimeDroolsException( e );
        }

        this.dirty = false;
    }
View Full Code Here

       
        public boolean evaluate(InternalWorkingMemory workingMemory,
                                final InternalReadAccessor extractor,
                                final Object object1,
                                final FieldValue object2) {
            throw new RuntimeDroolsException( "The 'startedby' operator can only be used to compare one event to another, and never to compare to literal constraints." );
        }
View Full Code Here

            } else if ( parameters.length == 1 ) {
                if( parameters[0].longValue() >= 0 ) {
                    // defined deviation for end timestamp
                    this.startDev = parameters[0].longValue();
                } else {
                    throw new RuntimeDroolsException("[StartedBy Evaluator]: Not possible to use negative parameter: '" + paramText + "'");
                }
            } else {
                throw new RuntimeDroolsException( "[StartedBy Evaluator]: Not possible to use " + parameters.length + " parameters: '" + paramText + "'" );
            }
        }
View Full Code Here

                                       object );

        if ( value instanceof Boolean ) {
            return ((Boolean) value).booleanValue();
        }
        throw new RuntimeDroolsException( "Conversion to boolean not supported from " + value.getClass().getName() );
    }
View Full Code Here

        if ( value instanceof Number ) {
            return ((Number) value).byteValue();
        } else if ( value instanceof Date ) {
            return (byte) ((Date) value).getTime();
        }
        throw new RuntimeDroolsException( "Conversion to byte not supported from " + value.getClass().getName() );
    }
View Full Code Here

        if ( value instanceof Character ) {
            return ((Character) value).charValue();
        } else if ( value instanceof String && ((String) value).length() == 1 ) {
            return ((String) value).charAt( 0 );
        }
        throw new RuntimeDroolsException( "Conversion to char not supported from " + value.getClass().getName() );
    }
View Full Code Here

        if ( value instanceof Number ) {
            return ((Number) value).doubleValue();
        } else if ( value instanceof Date ) {
            return (double) ((Date) value).getTime();
        }
        throw new RuntimeDroolsException( "Conversion to double not supported from " + value.getClass().getName() );
    }
View Full Code Here

        if ( value instanceof Number ) {
            return ((Number) value).floatValue();
        } else if ( value instanceof Date ) {
            return (float) ((Date) value).getTime();
        }
        throw new RuntimeDroolsException( "Conversion to float not supported from " + value.getClass().getName() );
    }
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.