Package com.sun.gjc.common
Class DataSourceObjectBuilder
- java.lang.Object
-
- com.sun.gjc.common.DataSourceObjectBuilder
-
- All Implemented Interfaces:
Serializable
public class DataSourceObjectBuilder extends Object implements Serializable
Utility class, which would create necessary Datasource object according to the specification.- Version:
- 1.0, 02/07/23
- Author:
- Binod P.G
- See Also:
DataSourceSpec,com.sun.gjc.util.MethodExcecutor, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DataSourceObjectBuilder(DataSourceSpec spec)Construct a DataSource Object from the spec.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectconstructDataSourceObject()Construct the DataSource Object from the spec.static booleanisJDBC40()static booleanisJDBC41()HashtableparseDriverProperties(DataSourceSpec spec, boolean returnUpperCase)Get the extra driver properties from the DataSourceSpec object and parse them to a set of methodName and parameters.HashtableparseDriverProperties(String values, String escape, String delimiter, boolean returnUpperCase)parse the driver properties and re-generate name value pairs with unescaped values.
-
-
-
Constructor Detail
-
DataSourceObjectBuilder
public DataSourceObjectBuilder(DataSourceSpec spec)
Construct a DataSource Object from the spec.- Parameters:
spec-DataSourceSpecobject.
-
-
Method Detail
-
constructDataSourceObject
public Object constructDataSourceObject() throws jakarta.resource.ResourceException
Construct the DataSource Object from the spec.- Returns:
- Object constructed using the DataSourceSpec.
- Throws:
jakarta.resource.ResourceException- if the class is not found or some issue in executing some method.
-
parseDriverProperties
public Hashtable parseDriverProperties(DataSourceSpec spec, boolean returnUpperCase) throws jakarta.resource.ResourceException
Get the extra driver properties from the DataSourceSpec object and parse them to a set of methodName and parameters. Prepare a hashtable containing these details and return.- Parameters:
spec-DataSourceSpecobject.- Returns:
- Hashtable containing method names and parameters,
- Throws:
jakarta.resource.ResourceException- If delimiter is not provided and property string is not null.
-
parseDriverProperties
public Hashtable parseDriverProperties(String values, String escape, String delimiter, boolean returnUpperCase)
parse the driver properties and re-generate name value pairs with unescaped values.- Parameters:
values- driverPropertiesescape- escape characterdelimiter- delimiter- Returns:
- Hashtable
-
isJDBC40
public static boolean isJDBC40()
-
isJDBC41
public static boolean isJDBC41()
-
-