java.lang.Object
org.eclipse.persistence.tools.dbws.Util
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final QName
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addSimpleXMLFormat
(Schema schema) static QName
buildCustomQName
(String typeString, DBWSBuilder builder) static RelationalDescriptor
buildORDescriptor
(String tableName, String projectName, List<String> requireCRUDOperations, NamingConventionTransformer nct) Build a RelationalDescriptor for a given table.static XMLDescriptor
buildOXDescriptor
(String tableAlias, String schemaAlias, String generatedJavaClassName, String targetNamespace) Build an XMLDescriptor for a given table.static XMLDescriptor
buildOXDescriptor
(String tableName, String projectName, String targetNamespace, NamingConventionTransformer nct) Build an XMLDescriptor for a given table.static DatabaseType
buildTypeForJDBCType
(int jdbcType, int precision, int scale) Return a DatabaseType instance for a given JDCBType.static String
escapePunctuation
(String originalName) static Class
<?> Get the attribute class for a given DatabaseType.static String
getClassNameForType
(int jdbcType) Returns the class name associated with a given JDBC/SQL type code.static String
getGeneratedAlias
(String tableName) Returns an alias (typically used as a descriptor alias) based on a given table or type name.static String
getGeneratedJavaClassName
(String name, String projectName) Returns a Java class name based on a given name and project.static String
getGeneratedWrapperClassName
(String name, String projectName) Returns a Java class name based on a given name and project.static String
getJDBCEnumNameFromTypeName
(String typeName) Return the JDBC enum name for a given JDBC type name.static int
getJDBCTypeFromTypeName
(String typeName) Return the JDBC type (as int) for a given type name.static String
getJDBCTypeNameFromType
(int jdbcType) Return the JDBC type name for a given JDBC type code.static String
getOraclePLSQLTypeForName
(String typeName) Return the Oracle PL/SQL name for a given PL/SQL scalar type.static QName
getXMLTypeFromJDBCType
(int jdbcType) Return the XML type (as a QName) associated with the given JDBC type.static QName
getXMLTypeFromJDBCType
(Short jdbcType) Return the XML type (as a QName) associated with the given JDBC type.static QName
getXMLTypeFromJDBCTypeName
(String jdbcTypeName) Return the XML type (as a QName) associated with the given JDBC type name.static boolean
hasComplexArgs
(List<ArgumentType> arguments) Indicates if a given List<ArgumentType> contains one or more arguments that are considered 'complex', i.e.static boolean
hasComplexArgs
(ProcedureType storedProcedure) Indicates if a given ProcedureType contains one or more arguments that are considered 'complex', i.e.static boolean
hasPLSQLArgs
(List<ArgumentType> arguments) Indicates if a given list of ArgumentTypes contains one or more PL/SQL arguments, i.e.static boolean
hasPLSQLArgs
(ProcedureType storedProcedure) Indicates if a given ProcedureType contains one or more PL/SQL arguments, i.e.static boolean
hasPLSQLCursorArg
(List<ArgumentType> arguments) Indicates if a given List<ArgumentType> contains a PL/SQL Cursor type.static boolean
hasPLSQLScalarArgs
(List<ArgumentType> arguments) Indicates if a given List<ArgumentType> contains one or more arguments that are considered PL/SQL scalars, i.e.static boolean
isArgComplex
(ArgumentType argument) Indicates if a given ArgumentType is considered 'complex', i.e.static boolean
isArgPLSQL
(ArgumentType argument) Indicates if a given ArgumentType is considered a PL/SQL argument, i.e.static boolean
isArgPLSQLScalar
(String argTypeName) Indicates if a given argument type name is considered a PL/SQL scalar argument, i.e.static boolean
isArgPLSQLScalar
(ArgumentType argument) Indicates if a given ArgumentType is considered a PL/SQL scalar argument, i.e.static boolean
isNullStream
(OutputStream outputStream) static boolean
isTypeComplex
(DatabaseType dbType) Indicates if a given DatabaseType is considered 'complex', i.e.static boolean
noOutArguments
(ProcedureType storedProcedure) static QName
qNameFromString
(String qNameAsString, Schema schema) static boolean
requiresSimpleXMLFormat
(XRServiceModel serviceModel) static boolean
shouldSetJavaType
(String typeName) Convenience method used to determine if the java class and/or java type name should be set on a given procedure argument.static boolean
-
Field Details
-
TOPLEVEL
- See Also:
-
CLASSES
- See Also:
-
DEFAULT_WSDL_LOCATION_URI
- See Also:
-
SWAREF_FILENAME
-
WSI_SWAREF_XSD_FILE
-
WEB_XML_FILENAME
- See Also:
-
DEFAULT_PLATFORM_CLASSNAME
- See Also:
-
DOM_PLATFORM_CLASSNAME
- See Also:
-
UNDER_DBWS
- See Also:
-
OX_PRJ_SUFFIX
- See Also:
-
OR_PRJ_SUFFIX
- See Also:
-
XML_BINDINGS
- See Also:
-
XML_MIME_PREFIX
- See Also:
-
WSI_SWAREF
- See Also:
-
WSI_SWAREF_PREFIX
- See Also:
-
WSI_SWAREF_URI
- See Also:
-
WSI_SWAREF_XSD
- See Also:
-
THE_INSTANCE_NAME
- See Also:
-
FINDALL_QUERYNAME
- See Also:
-
CREATE_OPERATION_NAME
- See Also:
-
UPDATE_OPERATION_NAME
- See Also:
-
REMOVE_OPERATION_NAME
- See Also:
-
DBWS_PROVIDER_PACKAGE
- See Also:
-
DBWS_PROVIDER_NAME
- See Also:
-
DOT_CLASS
- See Also:
-
DBWS_PROVIDER_CLASS_FILE
- See Also:
-
DBWS_PROVIDER_SOURCE_FILE
- See Also:
-
PROVIDER_LISTENER_CLASS_FILE
- See Also:
-
PROVIDER_LISTENER_SOURCE_FILE
- See Also:
-
AT_SIGN
- See Also:
-
COMMA
- See Also:
-
SEMICOLON
- See Also:
-
SINGLE_SPACE
- See Also:
-
PERCENT
- See Also:
-
UNDERSCORE
- See Also:
-
BUILDING_QUERYOP_FOR
- See Also:
-
APP_OCTET_STREAM
- See Also:
-
TYPE_STR
- See Also:
-
CURSOR_STR
- See Also:
-
CURSOR_OF_STR
- See Also:
-
OPEN_PAREN
- See Also:
-
CLOSE_PAREN
- See Also:
-
SLASH
- See Also:
-
DOT
- See Also:
-
OPEN_BRACKET
- See Also:
-
CLOSE_BRACKET
- See Also:
-
OPEN_SQUARE_BRACKET
- See Also:
-
CLOSE_SQUARE_BRACKET
- See Also:
-
SLASH_TEXT
- See Also:
-
ARRAY_STR
- See Also:
-
BIGINT_STR
- See Also:
-
BINARY_STR
- See Also:
-
BLOB_STR
- See Also:
-
BOOLEAN_STR
- See Also:
-
CHAR_STR
- See Also:
-
CLOB_STR
- See Also:
-
DATE_STR
- See Also:
-
DECIMAL_STR
- See Also:
-
DOUBLE_STR
- See Also:
-
FLOAT_STR
- See Also:
-
INTEGER_STR
- See Also:
-
LONG_STR
- See Also:
-
LONGRAW_STR
- See Also:
-
LONGVARBINARY_STR
- See Also:
-
NCHAR_STR
- See Also:
-
NCLOB_STR
- See Also:
-
NUMBER_STR
- See Also:
-
NUMERIC_STR
- See Also:
-
NVARCHAR_STR
- See Also:
-
NVARCHAR2_STR
- See Also:
-
OTHER_STR
- See Also:
-
RAW_STR
- See Also:
-
REAL_STR
- See Also:
-
ROWID_STR
- See Also:
-
ROWTYPE_STR
- See Also:
-
SMALLINT_STR
- See Also:
-
STRUCT_STR
- See Also:
-
TIME_STR
- See Also:
-
TIMESTAMP_STR
- See Also:
-
TINYINT_STR
- See Also:
-
UROWID_STR
- See Also:
-
VARBINARY_STR
- See Also:
-
VARCHAR_STR
- See Also:
-
VARCHAR2_STR
- See Also:
-
BINARY_INTEGER_STR
- See Also:
-
PLS_INTEGER_STR
- See Also:
-
NATURAL_STR
- See Also:
-
POSITIVE_STR
- See Also:
-
SIGNTYPE_STR
- See Also:
-
BINARY_INTEGER_TYPE_STR
- See Also:
-
PLS_BOOLEAN_TYPE_STR
- See Also:
-
PLS_INTEGER_TYPE_STR
- See Also:
-
NATURAL_TYPE_STR
- See Also:
-
POSITIVE_TYPE_STR
- See Also:
-
SIGNTYPE_TYPE_STR
- See Also:
-
SYS_XMLTYPE_STR
- See Also:
-
XMLTYPE_STR
- See Also:
-
_TYPE_STR
- See Also:
-
ARRAY_CLS_STR
- See Also:
-
OPAQUE_CLS_STR
- See Also:
-
ROWID_CLS_STR
- See Also:
-
STRUCT_CLS_STR
- See Also:
-
SXF_QNAME_CURSOR
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
getJDBCTypeFromTypeName
Return the JDBC type (as int) for a given type name. -
getJDBCTypeNameFromType
Return the JDBC type name for a given JDBC type code. -
getJDBCEnumNameFromTypeName
Return the JDBC enum name for a given JDBC type name. -
getXMLTypeFromJDBCTypeName
Return the XML type (as a QName) associated with the given JDBC type name. -
getXMLTypeFromJDBCType
Return the XML type (as a QName) associated with the given JDBC type. -
getXMLTypeFromJDBCType
Return the XML type (as a QName) associated with the given JDBC type. -
qNameFromString
-
getClassNameForType
Returns the class name associated with a given JDBC/SQL type code. -
buildTypeForJDBCType
Return a DatabaseType instance for a given JDCBType. If applicable, precision and scale values will be applied. The default type instance will be VarChar2Type. -
getAttributeClassForDatabaseType
Get the attribute class for a given DatabaseType. -
addSimpleXMLFormat
-
noOutArguments
-
escapePunctuation
-
isNullStream
-
getGeneratedJavaClassName
Returns a Java class name based on a given name and project. The returned string will be in the format 'projectname.Name'. For example, given the name 'EMPLOYEE' and projectName 'TEST', the method would return the string 'test.Employee'. -
getGeneratedAlias
Returns an alias (typically used as a descriptor alias) based on a given table or type name. The returned string will contain an upper case first char, with the remaining chars in lower case format. -
getGeneratedWrapperClassName
Returns a Java class name based on a given name and project. The returned string will be in the format 'projectname.Name_CollectionWrapper'. For example, given the name 'EMPLOYEE' and projectName 'TEST', the method would return the string 'test.Employee_CollectionWrapper'. -
buildORDescriptor
public static RelationalDescriptor buildORDescriptor(String tableName, String projectName, List<String> requireCRUDOperations, NamingConventionTransformer nct) Build a RelationalDescriptor for a given table. -
buildOXDescriptor
public static XMLDescriptor buildOXDescriptor(String tableName, String projectName, String targetNamespace, NamingConventionTransformer nct) Build an XMLDescriptor for a given table. -
buildOXDescriptor
public static XMLDescriptor buildOXDescriptor(String tableAlias, String schemaAlias, String generatedJavaClassName, String targetNamespace) Build an XMLDescriptor for a given table. -
buildCustomQName
-
requiresSimpleXMLFormat
-
sqlMatch
-
isTypeComplex
Indicates if a given DatabaseType is considered 'complex', i.e. is one of PLSQLRecordType, PLSQLCollectionType, VArrayType, ObjectType, or NestedTableType -
isArgComplex
Indicates if a given ArgumentType is considered 'complex', i.e. it has a data type that is one of PLSQLRecordType, PLSQLCollectionType, VArrayType, ObjectType, or NestedTableType -
isArgPLSQL
Indicates if a given ArgumentType is considered a PL/SQL argument, i.e. it has a data type that is one of PLSQLRecordType, PLSQLCollectionType, BOOLEAN_TYPE, BINARY_INTEGER_TYPE, PLS_INTEGER_TYPE, etc. -
isArgPLSQLScalar
Indicates if a given ArgumentType is considered a PL/SQL scalar argument, i.e. it has a data type that is one of BOOLEAN_TYPE, BINARY_INTEGER_TYPE, PLS_INTEGER_TYPE, etc. -
isArgPLSQLScalar
Indicates if a given argument type name is considered a PL/SQL scalar argument, i.e. is one of BOOLEAN, BINARY_INTEGER, PLS_INTEGER, etc. -
getOraclePLSQLTypeForName
Return the Oracle PL/SQL name for a given PL/SQL scalar type. -
hasComplexArgs
Indicates if a given ProcedureType contains one or more arguments that are considered 'complex', i.e. PLSQLRecordType, PLSQLCollectionType, VArrayType, ObjectType, or NestedTableType. Note that for FunctionType the return argument is tested as well. -
hasPLSQLArgs
Indicates if a given ProcedureType contains one or more PL/SQL arguments, i.e. PLSQLRecordType, PLSQLCollectionType, or scalars BOOLEAN_TYPE, BINARY_INTEGER_TYPE, PLS_INTEGER_TYPE, etc. Note that for FunctionType the return argument is tested as well. -
hasPLSQLArgs
Indicates if a given list of ArgumentTypes contains one or more PL/SQL arguments, i.e. PLSQLRecordType, PLSQLCollectionType, or scalars BOOLEAN_TYPE, BINARY_INTEGER_TYPE, PLS_INTEGER_TYPE, etc. In addition, an optional argument must be treated as PL/SQL as default/optional parameter handling is done via PLSQLStoredProcedureCall -
hasComplexArgs
Indicates if a given List<ArgumentType> contains one or more arguments that are considered 'complex', i.e. PLSQLRecordType, PLSQLCollectionType, VArrayType, ObjectType, or NestedTableType -
hasPLSQLScalarArgs
Indicates if a given List<ArgumentType> contains one or more arguments that are considered PL/SQL scalars, i.e. PLSQLBoolean, PLSQLInteger, BinaryInteger, etc. -
hasPLSQLCursorArg
Indicates if a given List<ArgumentType> contains a PL/SQL Cursor type. -
shouldSetJavaType
Convenience method used to determine if the java class and/or java type name should be set on a given procedure argument. This will typically be used when calling addNamedInOutputArgument on a stored procedure call.
-