Package com.dtrules.entity

Examples of com.dtrules.entity.REntity


   *
   * @param name
   */
  public IREntity findcreateRefEntity(boolean readonly, RName name)throws RulesException {
    if(!referenceEntities.containsKey(name)){
      IREntity entity = new REntity(getUniqueID(), readonly, name);
      referenceEntities.put(name,entity);
    }
    return (REntity) referenceEntities.get(name);
  }
View Full Code Here


    public void endTag(String[] tagstk, int tagstkptr, String tag, String body,
            HashMap attribs) throws Exception, IOException
    {
      String  attr;
    REntity entity = null;
   
    if(attribs.containsKey("create entity")){                // For create Entity Tags, we pop the Entity from the Entity Stack on the End Tag.
      entity = (REntity) state.entitypop();
      Iterator pairs  = map.attribute2listPairs.iterator();
      body = "";                                                      // Don't care about the Body if we created an Entity.
      while(pairs.hasNext()){
        Object [] pair =  (Object []) pairs.next();
          if(entity.containsAttribute(RName.getRName((String)pair[0]))){
            RName.getRName((String) pair[1],true).execute(state);
            state.entitypush(entity);
            RName.getRName("addto",true).execute(state);
           
          }
View Full Code Here

      ArrayList<IRObject> array = rarray.arrayValue();
      if (state.testState(DTState.TRACE)) {
        state.traceInfo("sortentities", "length", array.size() + "", "by", rname.stringValue(), "arrayID",
                rarray.getID() + "", asc ? "true" : "false");
      }
      REntity temp = null;
      int size = array.size();
      int greaterthan = asc ? 1 : -1;
      for (int i = 0; i < size; i++) {
        boolean done = true;
        for (int j = 0; j < size - 1 - i; j++) {
View Full Code Here

       
        types = new HashMap<RName, RType>();
        Iterator<RName> entities = ef.getEntityRNameIterator();
        while(entities.hasNext()){
            RName    name    = entities.next();
            REntity  entity  = ef.findRefEntity(name);
            Iterator<RName> attribs = entity.getAttributeIterator();
            addType(entity,entity.getName(),IRObject.iEntity);
            while(attribs.hasNext()){
                RName        attribname = attribs.next();
                REntityEntry entry      = entity.getEntry(attribname);
                addType(entity,attribname,entry.type);
            }
        }
       
        Iterator<RName> tables = ef.getDecisionTableRNameIterator();
View Full Code Here

TOP

Related Classes of com.dtrules.entity.REntity

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.