/* * Created on Jun 23, 2005 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ /* The Broad Institute SOFTWARE COPYRIGHT NOTICE AGREEMENT This software and its documentation are copyright (2006) by the Broad Institute/Massachusetts Institute of Technology. All rights are reserved. This software is supplied without any warranty or guaranteed support whatsoever. Neither the Broad Institute nor MIT can be responsible for its use, misuse, or functionality. */ package calhoun.gebo.internal.db; import calhoun.gebo.model.Criterion; import calhoun.gebo.util.Q; /** * @author reinhard * * TODO To change the template for this generated type comment go to Window - * Preferences - Java - Code Style - Code Templates */ public class CalhounDatabaseColumn { /** * */ public CalhounDatabaseColumn(String oracleName, String oracleDataType) { m_oracleName = oracleName; m_oracleDataType = oracleDataType; // TODO Auto-generated constructor stub } public String getOracleName() { return m_oracleName; } public String getOracleDataType() { return m_oracleDataType; } public String getCriterionKey() { return Q.stripAP(m_oracleName).toUpperCase(); } public int hashCode(){ return m_oracleName.hashCode(); } public String getCriterionDataType() { if (m_oracleDataType.equals("VARCHAR2") || m_oracleDataType.equals("CHAR")) { return Criterion.STRING; } else if (m_oracleDataType.equals("NUMBER")) { return Criterion.INT; } else if (m_oracleDataType.equals("FLOAT")) { return Criterion.FLOAT; } else { return null; } } private String m_oracleName; private String m_oracleDataType; }