mappingclass.java

来自「METAmorphoses is a system for flexible a」· Java 代码 · 共 139 行

JAVA
139
字号
package cz.cvut.felk.cs.metamorphoses.mapping;import java.util.ArrayList;import java.util.HashMap;import java.util.List;/** * <p>description of this class is missing!</p> * <p> * <b>History:</b><br/> * Created: 5.3.2004<br/> * Last change: 5.3.2004<br/> * </p> * @author Martin Svihla (martin@svihla.net) */public class MappingClass {	private String templateName;	private String rdfLabel;	private String sql;		private HashMap conditions;	private HashMap variables;	private HashMap properties;		//private List variableNames;	private ArrayList attributes;		public MappingClass(String templateName, String rdfLabel, String sql) {		this.templateName = templateName;		this.rdfLabel = rdfLabel;		this.sql = sql;		this.conditions = new HashMap(); // templateName - MappingCondition object		this.variables = new HashMap(); // templateName - sqlName		this.properties = new HashMap(); // templateName - MappingProperty object 			}		/*public void addCondition(String templateName, String sql) {		this.conditions.put(templateName, sql);	}*/		/*public boolean hasAttribute(String attrName) {		if (this.attributes==null) return false;				return false;	}*/		/**	 * @return	 */	public HashMap getConditions() {		return conditions;	}	/**	 * @return	 */	public String getRdfLabel() {		return rdfLabel;	}	/**	 * @return	 */	public String getSql() {		String str = sql.toLowerCase();		if (str.indexOf("where") == -1) sql = sql + " where 1 = 1 ";		return sql;	}	/**	 * @return	 */	public String getTemplateName() {		return templateName;	}	/**	 * @return	 */	public HashMap getVariables() {		return variables;	}	/**	 * @param string	 */	public void setRdfLabel(String string) {		rdfLabel = string;	}	/**	 * @param string	 */	public void setSql(String string) {		sql = string;	}	/**	 * @param string	 */	public void setTemplateName(String string) {		templateName = string;	}	/**	 * @param map	 */	public void setVariables(HashMap map) {		variables = map;	}	/**	 * @return	 */	protected void setAttributes(ArrayList attributes) {		this.attributes = attributes;	}		/**	 * @return	 */	public List getAttributes() {		return attributes;	}	/**	 * @return	 */	public HashMap getProperties() {		return properties;	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?