Class 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 Detail

      • DataSourceObjectBuilder

        public DataSourceObjectBuilder​(DataSourceSpec spec)
        Construct a DataSource Object from the spec.
        Parameters:
        spec - DataSourceSpec object.
    • 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 - DataSourceSpec object.
        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 - driverProperties
        escape - escape character
        delimiter - delimiter
        Returns:
        Hashtable
      • isJDBC40

        public static boolean isJDBC40()
      • isJDBC41

        public static boolean isJDBC41()