001/** 002 * 003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. 004 * 005 * This library is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU Lesser General Public 007 * License as published by the Free Software Foundation; either 008 * version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 017 * 018 **/ 019package lucee.transformer.bytecode.statement.tag; 020 021import lucee.transformer.bytecode.Position; 022 023public abstract class TagGroup extends TagBase { 024 025 public static final short TAG_LOOP=1; 026 public static final short TAG_OUTPUT=2; 027 028 private int numberIterator=-1; 029 private int query=-1; 030 private int group=-1; 031 private int pid; 032 033 public TagGroup(Position start, Position end) { 034 super(start, end); 035 // TODO Auto-generated constructor stub 036 } 037 038 public abstract short getType(); 039 040 //public abstract boolean hasQuery(); 041 042 //public abstract boolean hasGroup(); 043 044 045 public final int getNumberIterator() { 046 return numberIterator; 047 } 048 049 public final void setNumberIterator(int numberIterator) { 050 this.numberIterator= numberIterator; 051 } 052 053 public final boolean hasNumberIterator() { 054 return numberIterator!=-1; 055 } 056 057 058 /** 059 * returns if output has query 060 * @return has query 061 */ 062 public final boolean hasQuery() { 063 return getAttribute("query")!=null; 064 } 065 066 /** 067 * returns if output has query 068 * @return has query 069 */ 070 public final boolean hasGroup() { 071 return getAttribute("group")!=null; 072 } 073 074 public final int getQuery() { 075 return query; 076 } 077 078 public final void setQuery(int query) { 079 this.query= query; 080 } 081 082 public final int getGroup() { 083 return group; 084 } 085 086 public final void setGroup(int group) { 087 this.group= group; 088 } 089 090 public final int getPID() { 091 return pid; 092 } 093 094 public final void setPID(int pid) { 095 this.pid= pid; 096 } 097}