@Override
	public Query parse() {
		if(!this.prepared) {
			this.prepared = true;
			
			StringBuilder sB = new StringBuilder();
			sB.append("UPDATE ");
			sB.append(table.replace("#__", this.db.getPrefix()));
			sB.append("\n");
			
			sB.append(" SET ");
			int s = this.set.size();
			for(int i = 0; i < s; ++i) {
				if(i > 0) {
					sB.append(", ");
				}
				
				Elem e = this.set.get(i);
				String v = e.getValue() == null ? "" : e.getValue();
				ValueType vT = e.getValueType();
				String vTS = vT.getTextual().replace("%1", e.getField().replace("#__", this.db.getPrefix()));
				vTS = vTS.replace("%2", v.replace("#__", this.db.getPrefix()));
				
				sB.append(vTS);
			}
			
			sB.append("\n");
			
			if(this.where.size() > 0) {
				sB.append(" WHERE ");
				Iterator<Group> whereIterator = this.where.iterator();
				while(whereIterator.hasNext()) {
					Group g = whereIterator.next();
					if(!g.isParsed()) {
						g.parse();
					}
					
					sB.append(g.getType().getTextual());
					sB.append(g.getParsedGroup());
				}
			
				sB.append("\n");
			}
			
			this.query = sB.toString();
		}
		
		return this;
	}