|
Primavera Integration API 8.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.primavera.integration.util.WhereClauseHelper
public final class WhereClauseHelper
Helper class containing static helper methods to be used when building the where clause specified when loading business objects.
Method Summary | |
---|---|
static String |
escapeSqlString(String s)
Translates SQL statement's escape character, namely "'". |
static String |
formatDate(Session session,
Date date)
Formats the date to be compatible with all databases supported by the API. |
static String |
formatGUID(String sGUID)
Formats a GUID to make it usable in a where clause when loading a business object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String formatDate(Session session, Date date)
Session.getDatabaseType()
Example: sWhereClause = "StartDate < " + WhereClauseHelper.formatDate(date, session);
date
- the date to formatsession
- the session instance to obtain the database type
IllegalArgumentException
- if the date parameter is nullpublic static String formatGUID(String sGUID) throws InvalidValueException
sGUID
- GUID in standard format {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}, where each x is
an alphanumeric character
InvalidValueException
- if the GUID was not in the correct formatpublic static String escapeSqlString(String s)
s
- the string to be translated
IllegalArgumentException
- if the string parameter is null
|
Primavera Integration API 8.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |