java.lang.Object
org.eclipse.persistence.internal.xr.Util
INTERNAL: provides useful constants, SQL Column <-> to XML name mapping and a few other misc. features
- Since:
- EclipseLink 1.x
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final charstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String[]static final intstatic final Stringstatic final Stringstatic final Stringstatic final charstatic final QNamestatic final Stringstatic final Documentstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final XMLPlatformstatic final String -
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?> getClassFromJDBCType(String typeName, DatabasePlatform databasePlatform) static intgetJDBCTypeForTypeName(String typeName) static StringgetTypeNameForJDBCType(int jdbcType) Return the type name to be used for a given JDBC type.static StringhexEscape(char c) static StringhexEscape(int c) static booleanisFirstNameChar(char c) return true if character can be part of a namestatic booleanisNameChar(char c) return true if character can be part of a namestatic StringsqlToXmlName(String name) Convert a SQL name to a valid XML name.static StringxmlToSqlName(String name) Convert an escaped XML name back to the original SQL name
-
Field Details
-
XML_PLATFORM
-
TEMP_DOC
-
OPAQUE
public static final int OPAQUE- See Also:
-
DEFAULT_ATTACHMENT_MIMETYPE
- See Also:
-
WEB_INF_DIR
- See Also:
-
WSDL_DIR
- See Also:
-
META_INF_PATHS
-
DBWS_SERVICE_XML
- See Also:
-
DBWS_OR_LABEL
- See Also:
-
DBWS_OX_LABEL
- See Also:
-
DBWS_OR_XML
- See Also:
-
DBWS_OX_XML
- See Also:
-
DBWS_SCHEMA_XML
- See Also:
-
DBWS_WSDL
- See Also:
-
DBWS_SESSIONS_XML
- See Also:
-
DBWS_OR_SESSION_NAME_SUFFIX
- See Also:
-
DBWS_OX_SESSION_NAME_SUFFIX
- See Also:
-
TARGET_NAMESPACE_PREFIX
- See Also:
-
SERVICE_NAMESPACE_PREFIX
- See Also:
-
SERVICE_SUFFIX
- See Also:
-
ALL_QUERYNAME
- See Also:
-
PK_QUERYNAME
- See Also:
-
XMLTYPE_STR
- See Also:
-
DOT_STR
- See Also:
-
UNDERSCORE_STR
- See Also:
-
TYPE_STR
- See Also:
-
COLLECTION_WRAPPER_STR
- See Also:
-
DASH_STR
- See Also:
-
EMPTY_STR
- See Also:
-
COLON_CHAR
public static final char COLON_CHAR- See Also:
-
SLASH_CHAR
public static final char SLASH_CHAR- See Also:
-
SXF_QNAME
-
SCHEMA_2_CLASS
-
-
Method Details
-
sqlToXmlName
Convert a SQL name to a valid XML name. Because not all characters that are valid in a SQL name is valid in an XML name, they need to be escaped using a special format. See the Oracle paper,"SQL/XML candidate base document", for more detail- Parameters:
name- the SQL name- Returns:
- the escaped valid XML name
-
xmlToSqlName
Convert an escaped XML name back to the original SQL name- Parameters:
name- the escaped XML name- Returns:
- the original SQL name
-
hexEscape
-
hexEscape
-
isNameChar
public static boolean isNameChar(char c) return true if character can be part of a name- Parameters:
c- - char to be checked- Returns:
- true/false
-
isFirstNameChar
public static boolean isFirstNameChar(char c) return true if character can be part of a name- Parameters:
c- - char to be checked- Returns:
- true/false
-
getClassFromJDBCType
-
getTypeNameForJDBCType
Return the type name to be used for a given JDBC type. This will typically be used when setting the SQL type and type name on a stored function/procedure argument. Currently, the only case we need to handle in this manner is oracle.xdb.XMLType - here we may set 2007 (OPAQUE) or 2009 (SQLXML). In the future this method may be required to return more types. -
getJDBCTypeForTypeName
-