|
com.im.commons 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.im.commons.db.TermEncoder
public abstract class TermEncoder
Service, that encodes a value into a String literal suitable for the database type. Implemented by individual DB providers to provide DB-specific syntax.
| Constructor Summary | |
|---|---|
TermEncoder()
|
|
| Method Summary | |
|---|---|
boolean |
canEncode(int sqlType)
Whether it can encode something as String |
String |
encodeColumnRef(String columnName)
Encodes reference to a column name |
abstract String |
encodeIdentifier(String id)
Encodes an identifier |
abstract String |
encodeLiteral(Object value,
int colType)
Encodes the literal 'value' in a form suitable for the desired column type (colType) |
String |
encodeParamReference(String paramName,
int sqlType)
|
String |
encodeTableColumnRef(String tableName,
String columnName,
String identifierQuoteString)
|
String |
encodeTableRef(String tableName)
Encodes reference to a table name |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TermEncoder()
| Method Detail |
|---|
public abstract String encodeLiteral(Object value,
int colType)
throws IllegalArgumentException
value - The literal value, possibly nullcolType -
IllegalArgumentException
public abstract String encodeIdentifier(String id)
throws IllegalArgumentException
id -
IllegalArgumentExceptionpublic String encodeTableRef(String tableName)
tableName -
public String encodeColumnRef(String columnName)
columnName -
public String encodeTableColumnRef(String tableName,
String columnName,
String identifierQuoteString)
public String encodeParamReference(String paramName,
int sqlType)
public boolean canEncode(int sqlType)
sqlType -
|
com.im.commons 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||