Class BaseDBWSBuilderHelper
java.lang.Object
org.eclipse.persistence.tools.dbws.BaseDBWSBuilderHelper
- Direct Known Subclasses:
JDBCHelper
,OracleHelper
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
protected List
<CompositeDatabaseType> protected Map
<String, ClassDescriptor> protected List
<ProcedureType> protected DBWSBuilder
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected NamingConventionTransformer
static final String
static final String
static final String
static final String
static final String
static final String
protected XMLSessionConfigProject_11_1_1
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected ObjectPersistenceWorkbenchXMLProject
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addToOROXProjectsForBuildSql
(ModelWithBuildSql modelWithBuildSql, Project orProject, Project oxProject, NamingConventionTransformer nct) protected abstract void
addToOROXProjectsForComplexTypes
(List<CompositeDatabaseType> types, Project orProject, Project oxProject) protected DatabaseType
Build a org.eclipse.persistence.internal.helper.DatabaseType instance from an org.eclipse.persistence.tools.oracleddl.metadata.DatabaseType instance.protected DatabaseType
buildDatabaseTypeFromMetadataType
(DatabaseType dType, String catalog) Build a org.eclipse.persistence.internal.helper.DatabaseType instance from an org.eclipse.persistence.tools.oracleddl.metadata.DatabaseType instance.void
Gather table and procedure information based on TableOperation and ProcedureOperation.buildDbColumns
(Connection connection, String secondarySql) void
buildDBWSModel
(NamingConventionTransformer nct, OutputStream dbwsServiceStream) Build the DBWS model, a.k.a.protected DirectToFieldMapping
buildORFieldMappingFromColumn
(FieldType dbColumn, RelationalDescriptor desc, DatabasePlatform databasePlatform, NamingConventionTransformer nct) void
Builds OR/OX projects, descriptors & mappings.void
Builds OR/OX projects, descriptors & mappings, based on a given list of types, as well as table(s) and secondary SQL.protected XMLDirectMapping
buildOXFieldMappingFromColumn
(FieldType dbColumn, DatabasePlatform databasePlatform, NamingConventionTransformer nct) protected abstract void
buildQueryForProcedureType
(ProcedureType procType, Project orProject, Project oxProject, ProcedureOperationModel opModel, boolean hasComplexArgs) void
Build the schemavoid
buildSessionsXML
(OutputStream dbwsSessionsStream) Build the sessions xml file.buildTypesList
(List<OperationModel> operations) Uses a custom visitor to traverse each procedure/function argument and build a list of required Types.void
buildWSDL
(OutputStream wsdlStream, NamingConventionTransformer nct) protected void
Perform any additional actions required for operation creation for both PL/SQL and non-PL/SQL operation models.protected void
finishUpProjects
(Project orProject, Project oxProject, List<CompositeDatabaseType> typeList) Complete project configuration.void
generateDBWSProvider
(OutputStream sourceProviderStream, OutputStream classProviderStream, OutputStream sourceProviderListenerStream, OutputStream classProviderListenerStream) protected List
<ArgumentType> Return a list of ArgumentTypes for a given Procedure Type.protected static ResultSetMetaData
getResultSetMetadataForSecondarySQL
(Connection connection, String secondarySql) Return a ResultSetMetaData instance for a given SQL statement.protected static String
getTypeNameForDatabaseType
(DatabaseType dataType) Return the type name to be used for a given database type.protected Class
getWrapperClass
(String wrapperClassName) Return the wrapper class for a wrapper class name.protected Class
getWrapperClass
(DatabaseType databaseType) Return the wrapper class for a given DatabaseType.protected void
handleSimpleXMLFormat
(boolean isSimpleXMLFormat, Result result, ProcedureOperationModel procedureOperationModel) Apply SimpleXMLFormat if 'isSimpleXMLFormat' is true.abstract boolean
protected abstract List
<ProcedureType> loadProcedures
(List<String> catalogPatterns, List<String> schemaPatterns, List<String> procedureNamePatterns) loadTables
(List<String> catalogPatterns, List<String> schemaPatterns, List<String> tableNamePatterns) protected void
logNotFoundWarnings
(String message, List<String> schemaPatterns, List<String> catalogPatterns, List<String> targetPatterns) Log a WARNING with the DBWSBuilder when a target (table, package, stored procedure/function, etc) cannot be found using the information given by the user.protected void
logPackageNotFoundWarnings
(String message, List<String> schemaPatterns, List<String> catalogPatterns) Log a WARNING with the DBWSBuilder when a package cannot be found using the information given by the user.protected NamingConventionTransformer
setUpCustomTransformer
(String tableName, NamingConventionTransformer nct) protected static DirectToFieldMapping
setUpDirectToFieldMapping
(RelationalDescriptor desc, String columnName, NamingConventionTransformer nct, Class<?> attributeClass, int jdbcType, boolean isPk) protected void
setUpFindQueries
(NamingConventionTransformer nct, String tableName, RelationalDescriptor desc) Generates 'findByPrimaryKey' and 'findAll' queries for a given table and descriptor.protected XMLDirectMapping
setUpXMLDirectMapping
(String columnName, QName qName, NamingConventionTransformer nct, Class<?> attributeClass, int jdbcType, boolean isPk) void
writeAttachmentSchema
(OutputStream swarefStream) void
writeDeploymentDescriptor
(OutputStream deploymentDescriptorStream) Write the (optional) deployment descriptor to the given OutputStream.void
writeOROXProjects
(OutputStream dbwsOrStream, OutputStream dbwsOxStream) void
writeSchema
(OutputStream dbwsSchemaStream) void
writeWebXML
(OutputStream webXmlStream)
-
Field Details
-
ITEM_MAPPING_NAME
- See Also:
-
ITEMS_MAPPING_ATTRIBUTE_NAME
- See Also:
-
ITEMS_MAPPING_FIELD_NAME
- See Also:
-
MTOM_STR
- See Also:
-
SWAREF_STR
- See Also:
-
NO_TABLE_MSG
- See Also:
-
NO_PROC_MSG
- See Also:
-
OXM_MARSHAL_EX_MSG
- See Also:
-
ORM_MARSHAL_EX_MSG
- See Also:
-
SELECT_FROM_STR
- See Also:
-
WHERE_STR
- See Also:
-
AND_STR
- See Also:
-
SET_STR
- See Also:
-
VALUES_STR
- See Also:
-
UPDATE_STR
- See Also:
-
INSERT_STR
- See Also:
-
DELETE_STR
- See Also:
-
COMMA_SPACE_STR
- See Also:
-
EQUALS_BINDING1_STR
- See Also:
-
EQUALS_BINDING_STR
- See Also:
-
TIMESTAMP_CLASS
- See Also:
-
USER_STR
- See Also:
-
PASSWORD_STR
- See Also:
-
SIMPLEXML_STR
- See Also:
-
dbTables
-
dbStoredProcedures
-
dbwsBuilder
-
sessionConfigProject
-
nct
-
workbenchXMLProject
-
createdORDescriptors
-
referencedORDescriptors
-
complextypes
-
crudOps
-
-
Constructor Details
-
BaseDBWSBuilderHelper
-
-
Method Details
-
getDbTables
-
getDbStoredProcedures
-
hasTables
public abstract boolean hasTables() -
loadTables
-
loadProcedures
-
addToOROXProjectsForComplexTypes
protected abstract void addToOROXProjectsForComplexTypes(List<CompositeDatabaseType> types, Project orProject, Project oxProject) -
buildQueryForProcedureType
protected abstract void buildQueryForProcedureType(ProcedureType procType, Project orProject, Project oxProject, ProcedureOperationModel opModel, boolean hasComplexArgs) -
addToOROXProjectsForBuildSql
protected void addToOROXProjectsForBuildSql(ModelWithBuildSql modelWithBuildSql, Project orProject, Project oxProject, NamingConventionTransformer nct) -
buildTypesList
Uses a custom visitor to traverse each procedure/function argument and build a list of required Types. Only on instance of a given type will exist in the list. -
buildOROXProjects
Builds OR/OX projects, descriptors & mappings. This method can be used when no complex types exist, and only table(s) and secondary SQL will be used when building. -
buildOROXProjects
Builds OR/OX projects, descriptors & mappings, based on a given list of types, as well as table(s) and secondary SQL. -
finishUpProjects
protected void finishUpProjects(Project orProject, Project oxProject, List<CompositeDatabaseType> typeList) Complete project configuration. Build descriptors for secondary SQL and complex arguments. Set the projects on the DBWSBuilder instance. -
buildORFieldMappingFromColumn
protected DirectToFieldMapping buildORFieldMappingFromColumn(FieldType dbColumn, RelationalDescriptor desc, DatabasePlatform databasePlatform, NamingConventionTransformer nct) -
buildOXFieldMappingFromColumn
protected XMLDirectMapping buildOXFieldMappingFromColumn(FieldType dbColumn, DatabasePlatform databasePlatform, NamingConventionTransformer nct) -
buildDbArtifacts
public void buildDbArtifacts()Gather table and procedure information based on TableOperation and ProcedureOperation. End result will be List<TableType> and List<ProcedureType>. -
buildSchema
Build the schema -
buildSessionsXML
Build the sessions xml file. -
buildDBWSModel
Build the DBWS model, a.k.a. service file. -
writeAttachmentSchema
-
buildWSDL
public void buildWSDL(OutputStream wsdlStream, NamingConventionTransformer nct) throws javax.wsdl.WSDLException - Throws:
javax.wsdl.WSDLException
-
writeWebXML
-
writeDeploymentDescriptor
Write the (optional) deployment descriptor to the given OutputStream. -
generateDBWSProvider
public void generateDBWSProvider(OutputStream sourceProviderStream, OutputStream classProviderStream, OutputStream sourceProviderListenerStream, OutputStream classProviderListenerStream) -
writeSchema
-
writeOROXProjects
-
getResultSetMetadataForSecondarySQL
protected static ResultSetMetaData getResultSetMetadataForSecondarySQL(Connection connection, String secondarySql) Return a ResultSetMetaData instance for a given SQL statement. -
setUpDirectToFieldMapping
protected static DirectToFieldMapping setUpDirectToFieldMapping(RelationalDescriptor desc, String columnName, NamingConventionTransformer nct, Class<?> attributeClass, int jdbcType, boolean isPk) -
setUpXMLDirectMapping
protected XMLDirectMapping setUpXMLDirectMapping(String columnName, QName qName, NamingConventionTransformer nct, Class<?> attributeClass, int jdbcType, boolean isPk) -
setUpCustomTransformer
protected NamingConventionTransformer setUpCustomTransformer(String tableName, NamingConventionTransformer nct) -
setUpFindQueries
protected void setUpFindQueries(NamingConventionTransformer nct, String tableName, RelationalDescriptor desc) Generates 'findByPrimaryKey' and 'findAll' queries for a given table and descriptor. The queries are set on the given descriptor. -
buildDbColumns
-
getTypeNameForDatabaseType
Return the type name to be used for a given database type. The given DatabaseType's typeName attribute is typically returned, however, in some cases special handling may be required. For example, in the case of a NumericType instance, "DECIMAL" should be used for the type name. -
buildDatabaseTypeFromMetadataType
Build a org.eclipse.persistence.internal.helper.DatabaseType instance from an org.eclipse.persistence.tools.oracleddl.metadata.DatabaseType instance. -
buildDatabaseTypeFromMetadataType
Build a org.eclipse.persistence.internal.helper.DatabaseType instance from an org.eclipse.persistence.tools.oracleddl.metadata.DatabaseType instance. In the the case of PLSQL Packages, the catalog (package) name can be passed in as well. -
handleSimpleXMLFormat
protected void handleSimpleXMLFormat(boolean isSimpleXMLFormat, Result result, ProcedureOperationModel procedureOperationModel) Apply SimpleXMLFormat if 'isSimpleXMLFormat' is true. The SimpleXMLFormat is configured based on the given ProcedureOperationModel's simpleXMLFormatTag and xmlTag (if set) and set on the given Result. A descriptor is also added to the OXProject if none exists. -
finishProcedureOperation
protected void finishProcedureOperation()Perform any additional actions required for operation creation for both PL/SQL and non-PL/SQL operation models. -
getArgumentListForProcedureType
Return a list of ArgumentTypes for a given Procedure Type. This will include a return argument if pType is a FunctionType. -
getWrapperClass
Return the wrapper class for a given DatabaseType. The class will be loaded by the XRDynamicClassloader, based on the DatabaseType's javaTypeName. If the class cannot be loaded, or the given DatabaseType is not a ComplexDatabaseType, null will be returned. -
getWrapperClass
Return the wrapper class for a wrapper class name. The wrapper class name would typically be an argument type name, descriptor java class name, or a DatabaseType's javaTypeName. The class will be loaded by the XRDynamicClassloader; if the class cannot be loaded, null will be returned. -
logNotFoundWarnings
protected void logNotFoundWarnings(String message, List<String> schemaPatterns, List<String> catalogPatterns, List<String> targetPatterns) Log a WARNING with the DBWSBuilder when a target (table, package, stored procedure/function, etc) cannot be found using the information given by the user. -
logPackageNotFoundWarnings
protected void logPackageNotFoundWarnings(String message, List<String> schemaPatterns, List<String> catalogPatterns) Log a WARNING with the DBWSBuilder when a package cannot be found using the information given by the user.
-