Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.sdmlib.models.transformations.util;
  
  
 public class TemplatePO extends PatternObject<TemplatePOTemplate>
 {
 
    public TemplateSet allMatches()
    {
       this.setDoAllMatches(true);
 
       TemplateSet matches = new TemplateSet();
 
       while (this.getPattern().getHasMatch())
       {
          matches.add((Templatethis.getCurrentMatch());
 
          this.getPattern().findMatch();
       }
 
       return matches;
    }
 
    public TemplatePO()
    {
       newInstance(org.sdmlib.models.transformations.util.CreatorCreator.createIdMap("PatternObjectType"));
    }
 
    public TemplatePO(Template... hostGraphObject)
    {
       if (hostGraphObject == null || hostGraphObject.length < 1)
       {
          return;
       }
       newInstance(org.sdmlib.models.transformations.util.CreatorCreator.createIdMap("PatternObjectType"), hostGraphObject);
    }
 
    public TemplatePO hasTemplateText(String value)
    {
       new AttributeConstraint()
          .withTgtValue(value)
          .withSrc(this)
          .withModifier(this.getPattern().getModifier())
          .withPattern(this.getPattern());
 
       super.hasAttr();
 
       return this;
    }
 
    public TemplatePO hasTemplateText(String lowerString upper)
    {
       new AttributeConstraint()
          .withTgtValue(lower)
          .withUpperTgtValue(upper)
          .withSrc(this)
          .withModifier(this.getPattern().getModifier())
          .withPattern(this.getPattern());
 
       super.hasAttr();
 
       return this;
    }
 
    public TemplatePO createTemplateText(String value)
    {
       this.startCreate().hasTemplateText(value).endCreate();
       return this;
    }
 
    public String getTemplateText()
    {
       if (this.getPattern().getHasMatch())
       {
          return ((TemplategetCurrentMatch()).getTemplateText();
       }
       return null;
    }
 
    public TemplatePO withTemplateText(String value)
    {
       if (this.getPattern().getHasMatch())
       {
          ((TemplategetCurrentMatch()).setTemplateText(value);
       }
       return this;
    }
 
    public TemplatePO hasExpandedText(String value)
    {
       new AttributeConstraint()
         .withTgtValue(value)
         .withSrc(this)
         .withModifier(this.getPattern().getModifier())
         .withPattern(this.getPattern());
      super.hasAttr();
      return this;
   }
   public TemplatePO hasExpandedText(String lowerString upper)
   {
      new AttributeConstraint()
         .withTgtValue(lower)
         .withUpperTgtValue(upper)
         .withSrc(this)
         .withModifier(this.getPattern().getModifier())
         .withPattern(this.getPattern());
      super.hasAttr();
      return this;
   }
   public TemplatePO createExpandedText(String value)
   {
      this.startCreate().hasExpandedText(value).endCreate();
      return this;
   }
   public String getExpandedText()
   {
      if (this.getPattern().getHasMatch())
      {
         return ((TemplategetCurrentMatch()).getExpandedText();
      }
      return null;
   }
   public TemplatePO withExpandedText(String value)
   {
      if (this.getPattern().getHasMatch())
      {
         ((TemplategetCurrentMatch()).setExpandedText(value);
      }
      return this;
   }
   public TemplatePO hasModelObject(Object value)
   {
      new AttributeConstraint()
         .withTgtValue(value)
         .withSrc(this)
         .withModifier(this.getPattern().getModifier())
         .withPattern(this.getPattern());
      super.hasAttr();
      return this;
   }
   public TemplatePO createModelObject(Object value)
   {
      this.startCreate().hasModelObject(value).endCreate();
      return this;
   }
   public Object getModelObject()
   {
      if (this.getPattern().getHasMatch())
      {
         return ((TemplategetCurrentMatch()).getModelObject();
      }
      return null;
   }
   public TemplatePO withModelObject(Object value)
   {
      if (this.getPattern().getHasMatch())
      {
         ((TemplategetCurrentMatch()).setModelObject(value);
      }
      return this;
   }
   public TemplatePO hasModelClassName(String value)
   {
      new AttributeConstraint()
         .withTgtValue(value)
         .withSrc(this)
         .withModifier(this.getPattern().getModifier())
         .withPattern(this.getPattern());
      super.hasAttr();
      return this;
   }
   public TemplatePO hasModelClassName(String lowerString upper)
   {
      new AttributeConstraint()
         .withTgtValue(lower)
         .withUpperTgtValue(upper)
         .withSrc(this)
         .withModifier(this.getPattern().getModifier())
         .withPattern(this.getPattern());
      super.hasAttr();
      return this;
   }
   {
      this.startCreate().hasModelClassName(value).endCreate();
      return this;
   }
   public String getModelClassName()
   {
      if (this.getPattern().getHasMatch())
      {
         return ((TemplategetCurrentMatch()).getModelClassName();
      }
      return null;
   }
   public TemplatePO withModelClassName(String value)
   {
      if (this.getPattern().getHasMatch())
      {
         ((TemplategetCurrentMatch()).setModelClassName(value);
      }
      return this;
   }
   public TemplatePO hasListStart(String value)
   {
      new AttributeConstraint()
         .withTgtValue(value)
         .withSrc(this)
         .withModifier(this.getPattern().getModifier())
         .withPattern(this.getPattern());
      super.hasAttr();
      return this;
   }
   public TemplatePO hasListStart(String lowerString upper)
   {
      new AttributeConstraint()
         .withTgtValue(lower)
         .withUpperTgtValue(upper)
         .withSrc(this)
         .withModifier(this.getPattern().getModifier())
         .withPattern(this.getPattern());
      super.hasAttr();
      return this;
   }
   public TemplatePO createListStart(String value)
   {
      this.startCreate().hasListStart(value).endCreate();
      return this;
   }
   public String getListStart()
   {
      if (this.getPattern().getHasMatch())
      {
         return ((TemplategetCurrentMatch()).getListStart();
      }
      return null;
   }
   public TemplatePO withListStart(String value)
   {
      if (this.getPattern().getHasMatch())
      {
         ((TemplategetCurrentMatch()).setListStart(value);
      }
      return this;
   }
   public TemplatePO hasListSeparator(String value)
   {
      new AttributeConstraint()
         .withTgtValue(value)
         .withSrc(this)
         .withModifier(this.getPattern().getModifier())
         .withPattern(this.getPattern());
      super.hasAttr();
      return this;
   }
   public TemplatePO hasListSeparator(String lowerString upper)
   {
      new AttributeConstraint()
         .withTgtValue(lower)
         .withUpperTgtValue(upper)
         .withSrc(this)
         .withModifier(this.getPattern().getModifier())
         .withPattern(this.getPattern());
      super.hasAttr();
      return this;
   }
   {
      this.startCreate().hasListSeparator(value).endCreate();
      return this;
   }
   public String getListSeparator()
   {
      if (this.getPattern().getHasMatch())
      {
         return ((TemplategetCurrentMatch()).getListSeparator();
      }
      return null;
   }
   public TemplatePO withListSeparator(String value)
   {
      if (this.getPattern().getHasMatch())
      {
         ((TemplategetCurrentMatch()).setListSeparator(value);
      }
      return this;
   }
   public TemplatePO hasListEnd(String value)
   {
      new AttributeConstraint()
         .withTgtValue(value)
         .withSrc(this)
         .withModifier(this.getPattern().getModifier())
         .withPattern(this.getPattern());
      super.hasAttr();
      return this;
   }
   public TemplatePO hasListEnd(String lowerString upper)
   {
      new AttributeConstraint()
         .withTgtValue(lower)
         .withUpperTgtValue(upper)
         .withSrc(this)
         .withModifier(this.getPattern().getModifier())
         .withPattern(this.getPattern());
      super.hasAttr();
      return this;
   }
   public TemplatePO createListEnd(String value)
   {
      this.startCreate().hasListEnd(value).endCreate();
      return this;
   }
   public String getListEnd()
   {
      if (this.getPattern().getHasMatch())
      {
         return ((TemplategetCurrentMatch()).getListEnd();
      }
      return null;
   }
   public TemplatePO withListEnd(String value)
   {
      if (this.getPattern().getHasMatch())
      {
         ((TemplategetCurrentMatch()).setListEnd(value);
      }
      return this;
   }
   public TemplatePO hasReferenceLookup(boolean value)
   {
      new AttributeConstraint()
         .withTgtValue(value)
         .withSrc(this)
         .withModifier(this.getPattern().getModifier())
         .withPattern(this.getPattern());
      super.hasAttr();
      return this;
   }
   public TemplatePO createReferenceLookup(boolean value)
   {
      this.startCreate().hasReferenceLookup(value).endCreate();
      return this;
   }
   public boolean getReferenceLookup()
   {
      if (this.getPattern().getHasMatch())
      {
         return ((TemplategetCurrentMatch()).getReferenceLookup();
      }
      return false;
   }
   public TemplatePO withReferenceLookup(boolean value)
   {
      if (this.getPattern().getHasMatch())
      {
         ((TemplategetCurrentMatch()).setReferenceLookup(value);
      }
      return this;
   }
   public TemplatePO hasName(String value)
   {
      new AttributeConstraint()
         .withTgtValue(value)
         .withSrc(this)
         .withModifier(this.getPattern().getModifier())
         .withPattern(this.getPattern());
      super.hasAttr();
      return this;
   }
   public TemplatePO hasName(String lowerString upper)
   {
      new AttributeConstraint()
         .withTgtValue(lower)
         .withUpperTgtValue(upper)
         .withSrc(this)
         .withModifier(this.getPattern().getModifier())
         .withPattern(this.getPattern());
      super.hasAttr();
      return this;
   }
   public TemplatePO createName(String value)
   {
      this.startCreate().hasName(value).endCreate();
      return this;
   }
   public String getName()
   {
      if (this.getPattern().getHasMatch())
      {
         return ((TemplategetCurrentMatch()).getName();
      }
      return null;
   }
   public TemplatePO withName(String value)
   {
      if (this.getPattern().getHasMatch())
      {
         ((TemplategetCurrentMatch()).setName(value);
      }
      return this;
   }
   {
      {});
      result.setModifier(this.getPattern().getModifier());
      super.hasLink(.result);
      return result;
   }
   {
      return this.startCreate().hasPlaceholders().endCreate();
   }
   {
   }
   {
      return this.startCreate().hasPlaceholders(tgt).endCreate();
   }
   {
      if (this.getPattern().getHasMatch())
      {
         return ((Templatethis.getCurrentMatch()).getPlaceholders();
      }
      return null;
   }
   {
      ChoiceTemplatePO result = new ChoiceTemplatePO(new ChoiceTemplate[]
      {});
      result.setModifier(this.getPattern().getModifier());
      super.hasLink(.result);
      return result;
   }
   {
      return this.startCreate().hasChooser().endCreate();
   }
   {
      return hasLinkConstraint(tgt.);
   }
   {
      return this.startCreate().hasChooser(tgt).endCreate();
   }
   public ChoiceTemplate getChooser()
   {
      if (this.getPattern().getHasMatch())
      {
         return ((Templatethis.getCurrentMatch()).getChooser();
      }
      return null;
   }
   public MatchPO hasMatches()
   {
      MatchPO result = new MatchPO(new Match[]
      {});
      result.setModifier(this.getPattern().getModifier());
      super.hasLink(.result);
      return result;
   }
   public MatchPO createMatches()
   {
      return this.startCreate().hasMatches().endCreate();
   }
   public TemplatePO hasMatches(MatchPO tgt)
   {
      return hasLinkConstraint(tgt.);
   }
   public TemplatePO createMatches(MatchPO tgt)
   {
      return this.startCreate().hasMatches(tgt).endCreate();
   }
   public MatchSet getMatches()
   {
      if (this.getPattern().getHasMatch())
      {
         return ((Templatethis.getCurrentMatch()).getMatches();
      }
      return null;
   }
   {
      {});
      result.setModifier(this.getPattern().getModifier());
      super.hasLink(.result);
      return result;
   }
   {
      return this.startCreate().hasParents().endCreate();
   }
   {
      return hasLinkConstraint(tgt.);
   }
   {
      return this.startCreate().hasParents(tgt).endCreate();
   }
   {
      if (this.getPattern().getHasMatch())
      {
         return ((Templatethis.getCurrentMatch()).getParents();
      }
      return null;
   }
New to GrepCode? Check out our FAQ X