leon.peer.sql.postgresql
Class LyPostgresqlRequestEncoder
java.lang.Object
leon.peer.LyRequestEncoder
leon.peer.LyBlobRequestEncoder
leon.peer.sql.LySqlRequestEncoder
leon.peer.sql.postgresql.LyPostgresqlRequestEncoder
- All Implemented Interfaces:
- LyJoinRequestEncoder
public class LyPostgresqlRequestEncoder
- extends LySqlRequestEncoder
This class is used to send requests to a SQL database connection and to receive its answers. This
is a specialization for postgresql database .
- See Also:
LyRequestEncoder
,
LySqlConnection
,
LyPostgresqlDataProvider
Field Summary |
static java.lang.String |
__VERSION
|
Method Summary |
java.lang.String |
encodeLimitCondition(int limit)
encode the limit condition. |
java.lang.String |
getSQLFormatDate(java.lang.String quotedId,
LyDateFieldInfo fieldInfo)
String force formating date for order by using FORMAT(quotedId, 'YYYY-MM-DD HH:MM:SS')
but syntax is specific depending on database vendor. |
void |
setResponse(LyResponse response)
Set the request encoder response. |
boolean |
supportCaseSensitive()
Returns a boolean that indicates if case sensitive is supported. |
Methods inherited from class leon.peer.sql.LySqlRequestEncoder |
buildObject, clearChildRequestInfo, completeSelectedFields, completeSelectedFields, createObject, deleteObject, deleteObjects, getFilters, getObject, getObjects, getObjects, getRequestInfo, getSize, getSize, getTableAliasForSelfTargetRelationClass, setChildRequestInfo, setObject, setObjects, setTrim |
Methods inherited from class leon.peer.LyRequestEncoder |
getClassBinding, getDataClass, getProvider, getResponse, isSynchronous, loadObject, setClassBinding, setDataClass, toString, toString, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
__VERSION
public static final java.lang.String __VERSION
- See Also:
- Constant Field Values
LyPostgresqlRequestEncoder
public LyPostgresqlRequestEncoder(LyDataProvider provider,
LyDataSource dataSource,
java.lang.String valueSep)
- Parameters:
provider
- dataSource
- valueSep
-
supportCaseSensitive
public boolean supportCaseSensitive()
- Returns a boolean that indicates if case sensitive is supported.
- Overrides:
supportCaseSensitive
in class LySqlRequestEncoder
- Returns:
- True if supported, false otherwise.
encodeLimitCondition
public java.lang.String encodeLimitCondition(int limit)
- Description copied from class:
LySqlRequestEncoder
- encode the limit condition.
- Overrides:
encodeLimitCondition
in class LySqlRequestEncoder
- Parameters:
limit
- max numbut of rows fetched
setResponse
public void setResponse(LyResponse response)
- Set the request encoder response. Inherited method of LyRequestEncoder to set properties to
the response.
- Overrides:
setResponse
in class LySqlRequestEncoder
- Parameters:
the
- response
getSQLFormatDate
public java.lang.String getSQLFormatDate(java.lang.String quotedId,
LyDateFieldInfo fieldInfo)
- String force formating date for order by using FORMAT(quotedId, 'YYYY-MM-DD HH:MM:SS')
but syntax is specific depending on database vendor.
If not overridden this method does nothing and returns the quotedId to keep backward compatibility.
- Overrides:
getSQLFormatDate
in class LySqlRequestEncoder
- Parameters:
quotedId
- id of the date field (using aliases, table names and quotes if needed)peerField
- peer field related to this column
- Returns:
- the sort criteria to use in the SQL request
Website: W4 S.A., contact us: support@w4global.com