Examples of RulesException


Examples of com.dtrules.infrastructure.RulesException

        Iterator<RName> ie = ef.referenceEntities.keySet().iterator();
        while(ie.hasNext()){
            IREntity e  = ef.findRefEntity(ie.next());
            String   id = e.getID()+"";
            if(entityInstances.containsKey(id)){
                throw new RulesException("duplicate","new RSession()","Duplicate id "+id+" found between:\n"
                        +e.getName()+" and "+entityInstances.get(id).getName());
            }
            entityInstances.put(id,e);
        }
        try {
            dtstate.entitypush(ROperator.getPrimitives());
            dtstate.entitypush(ef.decisiontables);
        } catch (RulesException e) {
            throw new RulesException("Initialization Error",
                    "RSession",
                    "Failed to initialize dtstate in init(): "+e.toString());
        }
    }
View Full Code Here

Examples of com.dtrules.infrastructure.RulesException

        if(type.equalsIgnoreCase("date"))type = IRObject.rTime;
        if(type.equalsIgnoreCase("double"))type = IRObject.rFloat;
    for(int i=0;i<IRObject.types.length;i++){
      if(IRObject.types[i].equalsIgnoreCase(type))return i;
    }
    throw new RulesException("Undefined","typeStr2Int on entity: '"+entity+"' attribute: '"+attribute+"'","Bad Type Encountered:"+type);
  }
View Full Code Here

Examples of com.dtrules.infrastructure.RulesException

  public void initialize(String entrypoint) throws RulesException {
        // First make sure our context is up to snuff (by checking that all of our
        // required entities are in the current context.
        List<String> entities = rs.contexts.get(entrypoint);
        if (entities == null){
            throw new RulesException("undefined","executeAt","The entry point '"
                    +entrypoint+"' is undefined");
        }
        for(String entity : entities){
            if(!dtstate.inContext(entity)){
                dtstate.entitypush(createEntity(null, entity));
View Full Code Here

Examples of com.dtrules.infrastructure.RulesException

   * @return
   * @throws RulesException
   */
  static public String typeInt2Str(int type)throws RulesException {
    if(type<0 || type > IRObject.types.length){
      throw new RulesException("Undefined","typeInt2Str","Bad Type Index Encountered: "+type);
    }
    return IRObject.types[type];
  }
View Full Code Here

Examples of com.dtrules.infrastructure.RulesException

      if(id==null){
          id = getUniqueID()+"";
      }
    REntity ref = ef.findRefEntity(name);
        if(ref==null){
            throw new RulesException("undefined","session.createEntity","An attempt ws made to create the entity "+name.stringValue()+"\n" +
                    "This entity isn't defined in the EDD");
        }
        if(!ref.isReadOnly()){
            REntity e = (REntity) ref.clone(this);
            entityInstances.put(id,e);
View Full Code Here

Examples of com.dtrules.infrastructure.RulesException

  /* (non-Javadoc)
     * @see com.dtrules.entity.IREntity#put(com.dtrules.interpreter.RName, com.dtrules.interpreter.IRObject)
     */
  public void put( IRSession session, RName attrib, IRObject value) throws RulesException {
    REntityEntry entry = (REntityEntry)attributes.get(attrib);
    if(entry==null)throw new RulesException("Undefined", "REntity.put()", "Undefined Attribute "+attrib+" in Entity: "+name);
    if(value.type()!= iNull && entry.type != value.type()){
            switch(entry.type) {
                case iInteger :         value = value.rIntegerValue();          break;
                case iDouble :          value = value.rDoubleValue();           break;
                case iBoolean :         value = value.rBooleanValue();          break;
View Full Code Here

Examples of com.dtrules.infrastructure.RulesException

     * an array representation needs to implement it themselves.
     *
     * @see com.dtrules.interpreter.IRObject#rArrayValue()
     */
    public RArray rArrayValue() throws RulesException {
       throw new RulesException("Conversion Error","ARObject","No Array Value value exists for "+this.stringValue());
    }
View Full Code Here

Examples of com.dtrules.infrastructure.RulesException

    /**
     * @see com.dtrules.interpreter.IRObject#timeValue()
     */
    public Date timeValue() throws RulesException {
        throw new RulesException("Undefined","Conversion Error","No Time value exists for: "+RSession.typeInt2Str(this.type()));
    }
View Full Code Here

Examples of com.dtrules.infrastructure.RulesException

 
    /**
     * @see com.dtrules.interpreter.IRObject#intValue()
     */
    public int intValue() throws RulesException {
        throw new RulesException("Undefined","Conversion Error","No Integer value exists for "+RSession.typeInt2Str(this.type()));
    }
View Full Code Here

Examples of com.dtrules.infrastructure.RulesException

    /**
     * @see com.dtrules.interpreter.IRObject#arrayValue()
     */
  public ArrayList<IRObject> arrayValue() throws RulesException {
        throw new RulesException("Undefined","Conversion Error","No Array value exists for "+RSession.typeInt2Str(this.type()));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.