Package com.gammastream.validity

Examples of com.gammastream.validity.GSVEntity



    public WOComponent deleteRuleInList() {
        String entityName = this.selectedAttribute().entity().name();
        GSVModel model = session.model();
        GSVEntity entity = model.entityNamed(entityName);
        if(entity==null){
            entity = new GSVEntity(model, entityName);
            model.addEntity(entity);
        }
        GSVAttribute att = entity.attributeNamed(this.selectedAttribute().name());
        if(att==null){
            att = new  GSVAttribute(entity, this.selectedAttribute().name());
            entity.addAttribute(att);
        }
        att.removeRule(currentRule);
        model.saveModel();

        showAttribute = true;
View Full Code Here


   
    public WOComponent deleteRule() {
        String entityName = this.selectedAttribute().entity().name();
        GSVModel model = session.model();
        GSVEntity entity = model.entityNamed(entityName);
        if(entity==null){
            entity = new GSVEntity(model, entityName);
            model.addEntity(entity);
        }
        GSVAttribute att = entity.attributeNamed(this.selectedAttribute().name());
        if(att==null){
            att = new  GSVAttribute(entity, this.selectedAttribute().name());
            entity.addAttribute(att);
        }
        att.removeRule(this.selectedRule());
        model.saveModel();

        showAttribute = true;
View Full Code Here

            return null;
        }
       
            String entityName = this.selectedAttribute().entity().name();
            GSVModel model = session.model();
            GSVEntity entity = model.entityNamed(entityName);
            if(entity==null){
                entity = new GSVEntity(model, entityName);
                model.addEntity(entity);
            }
            entity.setModel(model);
            GSVAttribute att = entity.attributeNamed(this.selectedAttribute().name());
            if(att==null){
                att = new  GSVAttribute(entity, this.selectedAttribute().name());
                entity.addAttribute(att);
            }
            att.setEntity(entity);
            if(newFlag){
                if(att.ruleNamed(selectedRule().ruleName())!=null){
                    errorMessage = "There is already a rule named: "+ selectedRule().ruleName();
View Full Code Here

    }

    //returns list of Rules for attribute
    public NSArray rules() {
        try{
            GSVEntity entity = session.model().entityNamed(this.selectedAttribute().entity().name());
            GSVAttribute att = entity.attributeNamed(this.selectedAttribute().name());
            return att.rules();
        }catch(Exception e){
            return null;
        }
    }
View Full Code Here

    }
   
    public int ruleCount(){
        String entityName = this.currentAttribute.entity().name();
        GSVModel model = session.model();
        GSVEntity entity = model.entityNamed(entityName);
        if(entity==null){
            return 0;
        }
        GSVAttribute att = entity.attributeNamed(this.currentAttribute.name());
        if(att==null){
            return 0;
        }
        return att.rules().count();
    }
View Full Code Here

TOP

Related Classes of com.gammastream.validity.GSVEntity

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.