edu.iastate.metnet.db
Class TableAbbreviationRules
java.lang.Object
edu.iastate.metnet.db.AbstractMetNetTable
edu.iastate.metnet.db.TableAbbreviationRules
- All Implemented Interfaces:
- IMetNETTable
public class TableAbbreviationRules
- extends AbstractMetNetTable
+-----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+----------------+
| ruleid | int(11) | | PRI | [NULL] | auto_increment |
| shortterm | varchar(255) | | | | |
| longterm | varchar(255) | | | | |
+-----------+--------------+------+-----+---------+----------------+
- Version:
- 1.0
- Author:
- Jie Li
|
Field Summary |
(package private) static org.apache.log4j.Logger |
logger
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
static org.apache.log4j.Logger logger
orderByLongTerm
public java.lang.String orderByLongTerm(java.lang.String sql)
orderByShortTerm
public java.lang.String orderByShortTerm(java.lang.String sql)
getSharedInstance
public static TableAbbreviationRules getSharedInstance()
getSelectSQL
public java.lang.String getSelectSQL()
getSelectSQL
public java.lang.String getSelectSQL(java.lang.String term)
getSelectSQL
public java.lang.String getSelectSQL(java.lang.String shortTerm,
java.lang.String longTerm)
findOrInsert
public static ReturnCode findOrInsert(java.lang.String shortTerm,
java.lang.String longTerm)
- if exists, return the ruleID, if not, create a new one, and return the the ruleID
- Parameters:
shortTerm - the short name of the termlongTerm - the long name of the term
- Returns:
- the result contain the operation and ruleID, the ruleID can be got by
ReturnCode.getValue()
delete
public static void delete(java.lang.String shortTerm,
java.lang.String longTerm)