|
Primavera Integration API 7.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 java.lang.String |
escapeSqlString(java.lang.String s)
Translates SQL statement's escape character, namely "'". |
static java.lang.String |
formatDate(java.util.Date date)
Deprecated. As of release 6.0, use formatDate(Session, Date) |
static java.lang.String |
formatDate(Session session,
java.util.Date date)
Formats the date to be compatible with all databases supported by the API. |
static java.lang.String |
formatGUID(java.lang.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 |
---|
@Deprecated public static java.lang.String formatDate(java.util.Date date)
formatDate(Session, Date)
formatDate(Session, Date)
to obtain a formatted date compatible with all databases.
Example: sWhereClause = "StartDate < " + WhereClauseHelper.formatDate(date);
date
- the date to format
java.lang.IllegalArgumentException
- if the date parameter is nullpublic static java.lang.String formatDate(Session session, java.util.Date date)
Session.getDatabaseType()
Example: sWhereClause = "StartDate < " + WhereClauseHelper.formatDate(date, session);
date
- the date to formatsession
- the session instance to obtain the database type
java.lang.IllegalArgumentException
- if the date parameter is nullpublic static java.lang.String formatGUID(java.lang.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 java.lang.String escapeSqlString(java.lang.String s)
s
- the string to be translated
java.lang.IllegalArgumentException
- if the string parameter is null
|
Primavera Integration API 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |