1  package com.orindasoft.demo.generated;
2  
3  
4  import com.orindasoft.pub.CSException; 
5  import com.orindasoft.pub.CSDBException; 
6  import com.orindasoft.pub.SqlUtils; 
7  import com.orindasoft.pub.OracleResourceUser; 
8  import com.orindasoft.pub.LogInterface; 
9  import com.orindasoft.demo.generated.plsql.*; 
10 // JSR-181 Support is enabled if your target JVM is 1.6 or higher...
11 import javax.jws.*; 
12 // If you need to change the behaviour of @WebService use the 'Extra Java' field of 
13 // 'Extra Options' tab - any @WebService specified there will replace the one below
14 @WebService(endpointInterface = "com.orindasoft.demo.generated.DAOFactoryServiceInterface")
15 /** 
16 * WSDL Compatible Web Services class used by classes generated by JDBCWizard./a>
17 * 
18 * <p>Generated by JDBCWizard./a> build 2776 at 2011/03/07 19:55:48.326 GMT
19 * <p>JDBCWizard./a> is made by Orinda Software Ltd, Dublin, Ireland
20 * <p>Target Database: Oracle 10.2.0
21 * <p> -------------------------------------------------------------------------
22 * <p> WARNING: This code will stop working around the time JDBCWizard./a> expires.
23 * <p> This restriction only exists in the demo version of JDBCWizard./a>.
24 * <p> -------------------------------------------------------------------------
25 * <p> JDBCWizard./a> Tips 15 of 19:
26 * <p> JDBCWizard./a> never needs to access a production system.
27 * <p> It writes human readable code and uses a library that you get the 
28 * <p> source code for if you buy JDBCWizard./a>. If you buy it you will end
29 * <p> up with all the source code you need.
30 * <p> -------------------------------------------------------------------------
31 * 
32 * <p>Copyright Orinda Software 2003-2009
33 * @author devteam60@orindabuild.com
34 * @version 1.1
35 */ 
36 public class DAOFactoryServiceImpl extends DAOFactory implements OracleResourceUser, DAOFactoryServiceInterface
37 { 
38  
39 /** 
40 * Flag that says whether we should release DB resources after 
41 * each service call. The default value for this is controlled by 
42 * the JDBCWizard./a> UI.
43 * @since JDBCWizard./a> 4.0.2139
44 */ 
45 protected boolean alwaysReleaseResources = false; 
46 
47 /** 
48 * Flag that says whether we should interpret Double.MIN_VALUE
49 * as database NULL when passed in as a parameter 
50 * @since JDBCWizard./a> 6.0.2707
51 */ 
52 protected boolean minValueIsNULL = false; 
53 
54 /** 
55 * Flag that says whether we should cast NULL 
56 * record parameters to new, empty parameters 
57 * @since JDBCWizard./a> 6.0.2707
58 */ 
59 protected boolean castNullToNewObject = false; 
60 
61 /** 
62 * Call parent constructor with no arguments
63 * @see com.orindasoft.demo.generated.DAOFactory
64 */                                   
65 public DAOFactoryServiceImpl() 
66   {                                                 
67   super();
68   }                                                 
69                                                  
70 /** 
71 * Call constructor of DAOFactory using a database connection and an instance of LogInterface 
72 * @param java.sql.Connection theConnection A database connection 
73 * @param LogInterface theLog An instance of a class that implements com.orindasoft.pub.LogInterface 
74 * @see com.orindasoft.demo.generated.DAOFactory
75 * @since JDBCWizard./a> V5.0.2239
76 */ 
77 public DAOFactoryServiceImpl(java.sql.Connection theConnection, LogInterface theLog) 
78   { 
79   super(theConnection,theLog); 
80   } 
81  
82 /** 
83 * Call constructor of DAOFactory using an instance of LogInterface  
84 * @param LogInterface theLog An instance of a class that implements com.orindasoft.pub.LogInterface  
85 * @see com.orindasoft.demo.generated.DAOFactory
86 * @since JDBCWizard./a> V5.0.2239
87 */                                   
88 public DAOFactoryServiceImpl(LogInterface theLog)      
89   {                                                 
90   super(theLog);
91   }                                                  
92    
93  
94 /** 
95 * Set flag the says whether we should release DB resources after 
96 * each service call.
97 * @since JDBCWizard./a> 4.0.2139
98 */ 
99 public void setAlwaysReleaseResourcesFlag(boolean alwaysReleaseResources)
100  {
101  this.alwaysReleaseResources = alwaysReleaseResources;
102  }
103 
104 
105/** 
106* Flag that says whether we should cast NULL 
107* record parameters to new, empty parameters 
108* @since JDBCWizard./a> 6.0.2707
109*/ 
110public void setMinValueIsNull(boolean minValueIsNULL)
111  {
112  this.minValueIsNULL = minValueIsNULL;
113  }
114 
115 
116/** 
117* Set flag that says whether we should interpret Double.MIN_VALUE
118* as database NULL when passed in as a parameter 
119* @since JDBCWizard./a> 6.0.2707
120*/ 
121public void setCastNullToNewObject(boolean castNullToNewObject)
122  {
123  this.castNullToNewObject = castNullToNewObject;
124  }
125 
126/** 
127* SequentialNumberGenerator - Access Sequence SEQUENTIAL_NUMBER_GENERATOR
128*/ 
129public long serviceSequenceSequentialNumberGenerator() throws DAOFactoryServiceException
130  {
131  try
132    {
133    com.orindasoft.demo.generated.sequence.SequentialNumberGenerator theService = getSequentialNumberGeneratorSequenceDAO();
134    
135    return (theService.getNext());
136    }
137  catch (com.orindasoft.pub.CSException e)
138    {
139    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
140    theLog.error(e.getMessage());
141    throw (e2);
142    }
143  }
144/** 
145* Call Class CursorExampleDirectFlightAvailable as a service
146* @param String paramPFromcity VARCHAR2
147* @param String paramPTocity VARCHAR2
148* @return boolean
149* @throws DAOFactoryServiceException
150*/
151// JSR-181 support - make this method part of a web service
152@WebMethod
153public boolean servicePlsqlCursorExampleDirectFlightAvailable
154    (@WebParam(name="paramPFromcity") String paramPFromcity
155    ,@WebParam(name="paramPTocity") String paramPTocity) throws DAOFactoryServiceException
156  {
157  try
158    {
159    theLog.debug("servicePlsqlCursorExampleDirectFlightAvailable Starting");
160    
161    // Declare variable to hold result of service
162    boolean serviceOutput;
163    
164    // Get instance of created class
165    theLog.debug("servicePlsqlCursorExampleDirectFlightAvailable: Get instance of created class");
166    com.orindasoft.demo.generated.plsql.CursorExampleDirectFlightAvailable theService = getCursorExampleDirectFlightAvailablePlSqlDAO();
167    
168    // Set parameters
169    theLog.debug("servicePlsqlCursorExampleDirectFlightAvailable: Set parameters");
170    theService.setParamPFromcity(paramPFromcity);
171    theService.setParamPTocity(paramPTocity);
172    
173    // Call procedure
174    theLog.debug("servicePlsqlCursorExampleDirectFlightAvailable: Call procedure");
175    theService.executeProc();
176    
177    // Unload results
178    theLog.debug("servicePlsqlCursorExampleDirectFlightAvailable: Unload results");
179    serviceOutput = theService.getFunctionResultBoolean();
180    
181    theLog.debug("servicePlsqlCursorExampleDirectFlightAvailable Returning Data");
182    return(serviceOutput);
183    }
184  catch (com.orindasoft.pub.CSException e)
185    {
186    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
187    theLog.error("servicePlsqlCursorExampleDirectFlightAvailable Failed:");
188    theLog.error(e.getMessage());
189    throw (e2);
190    }
191  finally
192    {
193    
194    if (alwaysReleaseResources)
195      {
196      // Hand back DB connection...
197      releaseResources();
198      }
199    
200    }
201  }
202/** 
203* Call Class CursorExampleFindDirectFlights as a service
204* @param String paramPFromcity VARCHAR2
205* @param String paramPTocity VARCHAR2
206* @param double paramPOrderby NUMBER
207* @return com.orindasoft.demo.generated.plsql.CursorExampleFlightsRefcursorTypeAttrs[]
208* @throws DAOFactoryServiceException
209*/
210// JSR-181 support - make this method part of a web service
211@WebMethod
212public com.orindasoft.demo.generated.plsql.CursorExampleFlightsRefcursorTypeAttrs[] servicePlsqlCursorExampleFindDirectFlights
213    (@WebParam(name="paramPFromcity") String paramPFromcity
214    ,@WebParam(name="paramPTocity") String paramPTocity
215    ,@WebParam(name="paramPOrderby") double paramPOrderby) throws DAOFactoryServiceException
216  {
217  try
218    {
219    theLog.debug("servicePlsqlCursorExampleFindDirectFlights Starting");
220    
221    // Declare variable to hold result of service
222    com.orindasoft.demo.generated.plsql.CursorExampleFlightsRefcursorTypeAttrs[] serviceOutput;
223    
224    // Get instance of created class
225    theLog.debug("servicePlsqlCursorExampleFindDirectFlights: Get instance of created class");
226    com.orindasoft.demo.generated.plsql.CursorExampleFindDirectFlights theService = getCursorExampleFindDirectFlightsPlSqlDAO();
227    
228    // Make sure we avoid temporary files
229    theService.setUseByteArraysForLongsAndLOBS(true);
230    
231    // Set parameters
232    theLog.debug("servicePlsqlCursorExampleFindDirectFlights: Set parameters");
233    theService.setParamPFromcity(paramPFromcity);
234    theService.setParamPTocity(paramPTocity);
235     
236    if (minValueIsNULL && paramPOrderby == Double.MIN_VALUE)
237      {
238      theService.setParamPOrderbyToNull();
239      }
240    else
241      {
242      theService.setParamPOrderby(paramPOrderby);
243      }
244       
245    
246    // Call procedure
247    theLog.debug("servicePlsqlCursorExampleFindDirectFlights: Call procedure");
248    theService.executeProc();
249    
250    // Unload results
251    theLog.debug("servicePlsqlCursorExampleFindDirectFlights: Unload results");
252    serviceOutput = (CursorExampleFlightsRefcursorTypeAttrs[])CursorExampleFlightsRefcursorType.createCursorExampleFlightsRefcursorTypeArrayFromRowSet(theService.getParamPFlightlist(),theLog);
253    
254    theLog.debug("servicePlsqlCursorExampleFindDirectFlights Returning Data");
255    return(serviceOutput);
256    }
257  catch (com.orindasoft.pub.CSException e)
258    {
259    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
260    theLog.error("servicePlsqlCursorExampleFindDirectFlights Failed:");
261    theLog.error(e.getMessage());
262    throw (e2);
263    }
264  finally
265    {
266    
267    if (alwaysReleaseResources)
268      {
269      // Hand back DB connection...
270      releaseResources();
271      }
272    
273    }
274  }
275/** 
276* Call Class CursorExampleGetlists as a service
277* @return com.orindasoft.demo.generated.plsql.CursorExampleGetlistsReturn
278* @throws DAOFactoryServiceException
279*/
280// JSR-181 support - make this method part of a web service
281@WebMethod
282public com.orindasoft.demo.generated.plsql.CursorExampleGetlistsReturn servicePlsqlCursorExampleGetlists() throws DAOFactoryServiceException
283  {
284  try
285    {
286    theLog.debug("servicePlsqlCursorExampleGetlists Starting");
287    
288    // Declare variable to hold result of service
289    com.orindasoft.demo.generated.plsql.CursorExampleGetlistsReturn serviceOutput = new com.orindasoft.demo.generated.plsql.CursorExampleGetlistsReturn();
290    
291    // Get instance of created class
292    theLog.debug("servicePlsqlCursorExampleGetlists: Get instance of created class");
293    com.orindasoft.demo.generated.plsql.CursorExampleGetlists theService = getCursorExampleGetlistsPlSqlDAO();
294    
295    // Make sure we avoid temporary files
296    theService.setUseByteArraysForLongsAndLOBS(true);
297    
298    // Set parameters
299    theLog.debug("servicePlsqlCursorExampleGetlists: Set parameters");
300    
301    // Call procedure
302    theLog.debug("servicePlsqlCursorExampleGetlists: Call procedure");
303    theService.executeProc();
304    
305    // Unload results
306    theLog.debug("servicePlsqlCursorExampleGetlists: Unload results");
307    serviceOutput.setParamPAirlineListing((CursorExampleAirlineRefcursorTypeAttrs[])CursorExampleAirlineRefcursorType.createCursorExampleAirlineRefcursorTypeArrayFromRowSet(theService.getParamPAirlineListing(),theLog));
308    serviceOutput.setParamPAirportListing((CursorExampleAirportRefcursorTypeAttrs[])CursorExampleAirportRefcursorType.createCursorExampleAirportRefcursorTypeArrayFromRowSet(theService.getParamPAirportListing(),theLog));
309    serviceOutput.setParamPAircraftListing((CursorExampleAircraftRefcursorTypeAttrs[])CursorExampleAircraftRefcursorType.createCursorExampleAircraftRefcursorTypeArrayFromRowSet(theService.getParamPAircraftListing(),theLog));
310    
311    theLog.debug("servicePlsqlCursorExampleGetlists Returning Data");
312    return(serviceOutput);
313    }
314  catch (com.orindasoft.pub.CSException e)
315    {
316    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
317    theLog.error("servicePlsqlCursorExampleGetlists Failed:");
318    theLog.error(e.getMessage());
319    throw (e2);
320    }
321  finally
322    {
323    
324    if (alwaysReleaseResources)
325      {
326      // Hand back DB connection...
327      releaseResources();
328      }
329    
330    }
331  }
332/** 
333* Call Class ObjectArrayExampleAddBookingsObjectArray as a service
334* @param CustomersAttrs paramPCustomer PL/SQL RECORD
335* @param BookingsTypeAttrs[] paramPBookingTable TABLE
336* @return String
337* @throws DAOFactoryServiceException
338*/
339// JSR-181 support - make this method part of a web service
340@WebMethod
341public String servicePlsqlObjectArrayExampleAddBookingsObjectArray
342    (@WebParam(name="paramPCustomer") CustomersAttrs paramPCustomer
343    ,@WebParam(name="paramPBookingTable") BookingsTypeAttrs[] paramPBookingTable) throws DAOFactoryServiceException
344  {
345  try
346    {
347    theLog.debug("servicePlsqlObjectArrayExampleAddBookingsObjectArray Starting");
348    
349    // Fill in null parameters with objects if requested
350    if (castNullToNewObject) 
351      {
352      if (paramPCustomer == null) paramPCustomer = new CustomersAttrs();
353      if (paramPBookingTable == null) paramPBookingTable = new BookingsTypeAttrs[0];
354      }
355     
356    // Declare variable to hold result of service
357    String serviceOutput;
358    
359    // Get instance of created class
360    theLog.debug("servicePlsqlObjectArrayExampleAddBookingsObjectArray: Get instance of created class");
361    com.orindasoft.demo.generated.plsql.ObjectArrayExampleAddBookingsObjectArray theService = getObjectArrayExampleAddBookingsObjectArrayPlSqlDAO();
362    
363    // Set parameters
364    theLog.debug("servicePlsqlObjectArrayExampleAddBookingsObjectArray: Set parameters");
365     
366    if (paramPCustomer != null)
367      {
368      theService.setParamPCustomer(Customers.createCustomersFromCustomersAttrs(paramPCustomer));
369      }
370    else
371      {
372      theService.setParamPCustomerToNull();
373      }
374     
375    if (paramPBookingTable != null)
376      {
377      theService.setParamPBookingTable(new BookingsTable(theLog, (BookingsType.createBookingsTypeArrayFromBookingsTypeAttrsArray(paramPBookingTable))));
378      }
379    else
380      {
381      theService.setParamPBookingTableToNull();
382      }
383    
384    // Call procedure
385    theLog.debug("servicePlsqlObjectArrayExampleAddBookingsObjectArray: Call procedure");
386    theService.executeProc();
387    
388    // Unload results
389    theLog.debug("servicePlsqlObjectArrayExampleAddBookingsObjectArray: Unload results");
390    serviceOutput = theService.getParamPStatusMessage();
391    
392    theLog.debug("servicePlsqlObjectArrayExampleAddBookingsObjectArray Returning Data");
393    return(serviceOutput);
394    }
395  catch (com.orindasoft.pub.CSException e)
396    {
397    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
398    theLog.error("servicePlsqlObjectArrayExampleAddBookingsObjectArray Failed:");
399    theLog.error(e.getMessage());
400    throw (e2);
401    }
402  finally
403    {
404    
405    if (alwaysReleaseResources)
406      {
407      // Hand back DB connection...
408      releaseResources();
409      }
410    
411    }
412  }
413/** 
414* Call Class ObjectArrayExampleGetObjectArrayOfFlights as a service
415* @param String paramPCity VARCHAR2
416* @return FlightsTypeAttrs[]
417* @throws DAOFactoryServiceException
418*/
419// JSR-181 support - make this method part of a web service
420@WebMethod
421public FlightsTypeAttrs[] servicePlsqlObjectArrayExampleGetObjectArrayOfFlights
422    (@WebParam(name="paramPCity") String paramPCity) throws DAOFactoryServiceException
423  {
424  try
425    {
426    theLog.debug("servicePlsqlObjectArrayExampleGetObjectArrayOfFlights Starting");
427    
428    // Declare variable to hold result of service
429    FlightsTypeAttrs[] serviceOutput;
430    
431    // Get instance of created class
432    theLog.debug("servicePlsqlObjectArrayExampleGetObjectArrayOfFlights: Get instance of created class");
433    com.orindasoft.demo.generated.plsql.ObjectArrayExampleGetObjectArrayOfFlights theService = getObjectArrayExampleGetObjectArrayOfFlightsPlSqlDAO();
434    
435    // Set parameters
436    theLog.debug("servicePlsqlObjectArrayExampleGetObjectArrayOfFlights: Set parameters");
437    theService.setParamPCity(paramPCity);
438    
439    // Call procedure
440    theLog.debug("servicePlsqlObjectArrayExampleGetObjectArrayOfFlights: Call procedure");
441    theService.executeProc();
442    
443    // Unload results
444    theLog.debug("servicePlsqlObjectArrayExampleGetObjectArrayOfFlights: Unload results");
445    serviceOutput = theService.getParamPFlightsFrom().getCurrentValues();
446    
447    theLog.debug("servicePlsqlObjectArrayExampleGetObjectArrayOfFlights Returning Data");
448    return(serviceOutput);
449    }
450  catch (com.orindasoft.pub.CSException e)
451    {
452    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
453    theLog.error("servicePlsqlObjectArrayExampleGetObjectArrayOfFlights Failed:");
454    theLog.error(e.getMessage());
455    throw (e2);
456    }
457  finally
458    {
459    
460    if (alwaysReleaseResources)
461      {
462      // Hand back DB connection...
463      releaseResources();
464      }
465    
466    }
467  }
468/** 
469* Call Class PackageArrayExampleAddBookingsPlsqlArray as a service
470* @param CustomersAttrs paramPCustomer PL/SQL RECORD
471* @param BookingsAttrs[] paramPBookingTable VARRAY
472* @return String
473* @throws DAOFactoryServiceException
474*/
475// JSR-181 support - make this method part of a web service
476@WebMethod
477public String servicePlsqlPackageArrayExampleAddBookingsPlsqlArray
478    (@WebParam(name="paramPCustomer") CustomersAttrs paramPCustomer
479    ,@WebParam(name="paramPBookingTable") BookingsAttrs[] paramPBookingTable) throws DAOFactoryServiceException
480  {
481  try
482    {
483    theLog.debug("servicePlsqlPackageArrayExampleAddBookingsPlsqlArray Starting");
484    
485    // Fill in null parameters with objects if requested
486    if (castNullToNewObject) 
487      {
488      if (paramPCustomer == null) paramPCustomer = new CustomersAttrs();
489      if (paramPBookingTable == null) paramPBookingTable = new BookingsAttrs[0];
490      }
491     
492    // Declare variable to hold result of service
493    String serviceOutput;
494    
495    // Get instance of created class
496    theLog.debug("servicePlsqlPackageArrayExampleAddBookingsPlsqlArray: Get instance of created class");
497    com.orindasoft.demo.generated.plsql.PackageArrayExampleAddBookingsPlsqlArray theService = getPackageArrayExampleAddBookingsPlsqlArrayPlSqlDAO();
498    
499    // Set parameters
500    theLog.debug("servicePlsqlPackageArrayExampleAddBookingsPlsqlArray: Set parameters");
501     
502    if (paramPCustomer != null)
503      {
504      theService.setParamPCustomer(Customers.createCustomersFromCustomersAttrs(paramPCustomer));
505      }
506    else
507      {
508      theService.setParamPCustomerToNull();
509      }
510     
511    if (paramPBookingTable != null)
512      {
513      theService.setParamPBookingTable(new PackageArrayExampleBookingsPlsqlArray(theLog, (Bookings.createBookingsArrayFromBookingsAttrsArray(paramPBookingTable))));
514      }
515    else
516      {
517      theService.setParamPBookingTableToNull();
518      }
519    
520    // Call procedure
521    theLog.debug("servicePlsqlPackageArrayExampleAddBookingsPlsqlArray: Call procedure");
522    theService.executeProc();
523    
524    // Unload results
525    theLog.debug("servicePlsqlPackageArrayExampleAddBookingsPlsqlArray: Unload results");
526    serviceOutput = theService.getParamPStatusMessage();
527    
528    theLog.debug("servicePlsqlPackageArrayExampleAddBookingsPlsqlArray Returning Data");
529    return(serviceOutput);
530    }
531  catch (com.orindasoft.pub.CSException e)
532    {
533    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
534    theLog.error("servicePlsqlPackageArrayExampleAddBookingsPlsqlArray Failed:");
535    theLog.error(e.getMessage());
536    throw (e2);
537    }
538  finally
539    {
540    
541    if (alwaysReleaseResources)
542      {
543      // Hand back DB connection...
544      releaseResources();
545      }
546    
547    }
548  }
549/** 
550* Call Class PackageArrayExampleGetPlsqlArrayOfFlights as a service
551* @param String paramPCity VARCHAR2
552* @return FlightsAttrs[]
553* @throws DAOFactoryServiceException
554*/
555// JSR-181 support - make this method part of a web service
556@WebMethod
557public FlightsAttrs[] servicePlsqlPackageArrayExampleGetPlsqlArrayOfFlights
558    (@WebParam(name="paramPCity") String paramPCity) throws DAOFactoryServiceException
559  {
560  try
561    {
562    theLog.debug("servicePlsqlPackageArrayExampleGetPlsqlArrayOfFlights Starting");
563    
564    // Declare variable to hold result of service
565    FlightsAttrs[] serviceOutput;
566    
567    // Get instance of created class
568    theLog.debug("servicePlsqlPackageArrayExampleGetPlsqlArrayOfFlights: Get instance of created class");
569    com.orindasoft.demo.generated.plsql.PackageArrayExampleGetPlsqlArrayOfFlights theService = getPackageArrayExampleGetPlsqlArrayOfFlightsPlSqlDAO();
570    
571    // Set parameters
572    theLog.debug("servicePlsqlPackageArrayExampleGetPlsqlArrayOfFlights: Set parameters");
573    theService.setParamPCity(paramPCity);
574    
575    // Call procedure
576    theLog.debug("servicePlsqlPackageArrayExampleGetPlsqlArrayOfFlights: Call procedure");
577    theService.executeProc();
578    
579    // Unload results
580    theLog.debug("servicePlsqlPackageArrayExampleGetPlsqlArrayOfFlights: Unload results");
581    serviceOutput = theService.getParamPFlightsFrom().getCurrentValues();
582    
583    theLog.debug("servicePlsqlPackageArrayExampleGetPlsqlArrayOfFlights Returning Data");
584    return(serviceOutput);
585    }
586  catch (com.orindasoft.pub.CSException e)
587    {
588    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
589    theLog.error("servicePlsqlPackageArrayExampleGetPlsqlArrayOfFlights Failed:");
590    theLog.error(e.getMessage());
591    throw (e2);
592    }
593  finally
594    {
595    
596    if (alwaysReleaseResources)
597      {
598      // Hand back DB connection...
599      releaseResources();
600      }
601    
602    }
603  }
604/** 
605* Call Class PackageIdxarrayExampleAddBookingsPlsqlArray as a service
606* @param CustomersAttrs paramPCustomer PL/SQL RECORD
607* @param BookingsAttrs[] paramPBookingTable PL/SQL TABLE
608* @return String
609* @throws DAOFactoryServiceException
610*/
611// JSR-181 support - make this method part of a web service
612@WebMethod
613public String servicePlsqlPackageIdxarrayExampleAddBookingsPlsqlArray
614    (@WebParam(name="paramPCustomer") CustomersAttrs paramPCustomer
615    ,@WebParam(name="paramPBookingTable") BookingsAttrs[] paramPBookingTable) throws DAOFactoryServiceException
616  {
617  try
618    {
619    theLog.debug("servicePlsqlPackageIdxarrayExampleAddBookingsPlsqlArray Starting");
620    
621    // Fill in null parameters with objects if requested
622    if (castNullToNewObject) 
623      {
624      if (paramPCustomer == null) paramPCustomer = new CustomersAttrs();
625      if (paramPBookingTable == null) paramPBookingTable = new BookingsAttrs[0];
626      }
627     
628    // Declare variable to hold result of service
629    String serviceOutput;
630    
631    // Get instance of created class
632    theLog.debug("servicePlsqlPackageIdxarrayExampleAddBookingsPlsqlArray: Get instance of created class");
633    com.orindasoft.demo.generated.plsql.PackageIdxarrayExampleAddBookingsPlsqlArray theService = getPackageIdxarrayExampleAddBookingsPlsqlArrayPlSqlDAO();
634    
635    // Set parameters
636    theLog.debug("servicePlsqlPackageIdxarrayExampleAddBookingsPlsqlArray: Set parameters");
637     
638    if (paramPCustomer != null)
639      {
640      theService.setParamPCustomer(Customers.createCustomersFromCustomersAttrs(paramPCustomer));
641      }
642    else
643      {
644      theService.setParamPCustomerToNull();
645      }
646     
647    if (paramPBookingTable != null)
648      {
649      theService.setParamPBookingTable(new PackageIdxarrayExampleBookingsPlsqlArray(theLog, (Bookings.createBookingsArrayFromBookingsAttrsArray(paramPBookingTable))));
650      }
651    else
652      {
653      theService.setParamPBookingTableToNull();
654      }
655    
656    // Call procedure
657    theLog.debug("servicePlsqlPackageIdxarrayExampleAddBookingsPlsqlArray: Call procedure");
658    theService.executeProc();
659    
660    // Unload results
661    theLog.debug("servicePlsqlPackageIdxarrayExampleAddBookingsPlsqlArray: Unload results");
662    serviceOutput = theService.getParamPStatusMessage();
663    
664    theLog.debug("servicePlsqlPackageIdxarrayExampleAddBookingsPlsqlArray Returning Data");
665    return(serviceOutput);
666    }
667  catch (com.orindasoft.pub.CSException e)
668    {
669    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
670    theLog.error("servicePlsqlPackageIdxarrayExampleAddBookingsPlsqlArray Failed:");
671    theLog.error(e.getMessage());
672    throw (e2);
673    }
674  finally
675    {
676    
677    if (alwaysReleaseResources)
678      {
679      // Hand back DB connection...
680      releaseResources();
681      }
682    
683    }
684  }
685/** 
686* Call Class PackageIdxarrayExampleGetPlsqlArrayOfFlights as a service
687* @param String paramPCity VARCHAR2
688* @return FlightsAttrs[]
689* @throws DAOFactoryServiceException
690*/
691// JSR-181 support - make this method part of a web service
692@WebMethod
693public FlightsAttrs[] servicePlsqlPackageIdxarrayExampleGetPlsqlArrayOfFlights
694    (@WebParam(name="paramPCity") String paramPCity) throws DAOFactoryServiceException
695  {
696  try
697    {
698    theLog.debug("servicePlsqlPackageIdxarrayExampleGetPlsqlArrayOfFlights Starting");
699    
700    // Declare variable to hold result of service
701    FlightsAttrs[] serviceOutput;
702    
703    // Get instance of created class
704    theLog.debug("servicePlsqlPackageIdxarrayExampleGetPlsqlArrayOfFlights: Get instance of created class");
705    com.orindasoft.demo.generated.plsql.PackageIdxarrayExampleGetPlsqlArrayOfFlights theService = getPackageIdxarrayExampleGetPlsqlArrayOfFlightsPlSqlDAO();
706    
707    // Set parameters
708    theLog.debug("servicePlsqlPackageIdxarrayExampleGetPlsqlArrayOfFlights: Set parameters");
709    theService.setParamPCity(paramPCity);
710    
711    // Call procedure
712    theLog.debug("servicePlsqlPackageIdxarrayExampleGetPlsqlArrayOfFlights: Call procedure");
713    theService.executeProc();
714    
715    // Unload results
716    theLog.debug("servicePlsqlPackageIdxarrayExampleGetPlsqlArrayOfFlights: Unload results");
717    serviceOutput = theService.getParamPFlightsFrom().getCurrentValues();
718    
719    theLog.debug("servicePlsqlPackageIdxarrayExampleGetPlsqlArrayOfFlights Returning Data");
720    return(serviceOutput);
721    }
722  catch (com.orindasoft.pub.CSException e)
723    {
724    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
725    theLog.error("servicePlsqlPackageIdxarrayExampleGetPlsqlArrayOfFlights Failed:");
726    theLog.error(e.getMessage());
727    throw (e2);
728    }
729  finally
730    {
731    
732    if (alwaysReleaseResources)
733      {
734      // Hand back DB connection...
735      releaseResources();
736      }
737    
738    }
739  }
740/** 
741* Call Class ChangeFlightDates as a service
742* @return void
743* @throws DAOFactoryServiceException
744*/
745// JSR-181 support - make this method part of a web service
746@WebMethod
747public void serviceSqlChangeFlightDates() throws DAOFactoryServiceException
748  {
749  try
750    {
751    theLog.debug("serviceSqlChangeFlightDates Starting");
752    
753    // Get instance of created class
754    theLog.debug("serviceSqlChangeFlightDates: Get instance of created class");
755    com.orindasoft.demo.generated.sql.ChangeFlightDates theService = getChangeFlightDatesSqlDAO();
756    
757    
758    // Call statement
759    theLog.debug("serviceSqlChangeFlightDates: Call statement");
760    theService.executeCall();
761    
762    }
763  catch (com.orindasoft.pub.CSException e)
764    {
765    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
766    theLog.error("serviceSqlChangeFlightDates Failed:");
767    theLog.error(e.getMessage());
768    throw (e2);
769    }
770  finally
771    {
772    
773    if (alwaysReleaseResources)
774      {
775      // Hand back DB connection...
776      releaseResources();
777      }
778    
779    }
780  }
781/** 
782* Call Class CustcomerAdd as a service
783* @param String Paramname STRING
784* @param String Paramaddress STRING
785* @param String Paramcity STRING
786* @param String Paramstate STRING
787* @param double Paramzip NUMBER
788* @param java.util.Date Parambdate DATE
789* @param String Paramphone STRING
790* @return void
791* @throws DAOFactoryServiceException
792*/
793// JSR-181 support - make this method part of a web service
794@WebMethod
795public void serviceSqlCustcomerAdd
796    (@WebParam(name="Paramname") String Paramname
797    ,@WebParam(name="Paramaddress") String Paramaddress
798    ,@WebParam(name="Paramcity") String Paramcity
799    ,@WebParam(name="Paramstate") String Paramstate
800    ,@WebParam(name="Paramzip") double Paramzip
801    ,@WebParam(name="Parambdate") java.util.Date Parambdate
802    ,@WebParam(name="Paramphone") String Paramphone) throws DAOFactoryServiceException
803  {
804  try
805    {
806    theLog.debug("serviceSqlCustcomerAdd Starting");
807    
808    // Get instance of created class
809    theLog.debug("serviceSqlCustcomerAdd: Get instance of created class");
810    com.orindasoft.demo.generated.sql.CustcomerAdd theService = getCustcomerAddSqlDAO();
811    
812    theService.setParamname(Paramname);
813    theService.setParamaddress(Paramaddress);
814    theService.setParamcity(Paramcity);
815    theService.setParamstate(Paramstate);
816     
817    if (minValueIsNULL && Paramzip == Double.MIN_VALUE)
818      {
819      theService.setParamzipToNull();
820      }
821    else
822      {
823      theService.setParamzip(Paramzip);
824      }
825       
826    theService.setParambdate(Parambdate);
827    theService.setParamphone(Paramphone);
828    
829    // Call statement
830    theLog.debug("serviceSqlCustcomerAdd: Call statement");
831    theService.executeCall();
832    
833    }
834  catch (com.orindasoft.pub.CSException e)
835    {
836    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
837    theLog.error("serviceSqlCustcomerAdd Failed:");
838    theLog.error(e.getMessage());
839    throw (e2);
840    }
841  finally
842    {
843    
844    if (alwaysReleaseResources)
845      {
846      // Hand back DB connection...
847      releaseResources();
848      }
849    
850    }
851  }
852/** 
853* Call Class CustomerDelete as a service
854* @param String ParamParam1 STRING
855* @return void
856* @throws DAOFactoryServiceException
857*/
858// JSR-181 support - make this method part of a web service
859@WebMethod
860public void serviceSqlCustomerDelete
861    (@WebParam(name="ParamParam1") String ParamParam1) throws DAOFactoryServiceException
862  {
863  try
864    {
865    theLog.debug("serviceSqlCustomerDelete Starting");
866    
867    // Get instance of created class
868    theLog.debug("serviceSqlCustomerDelete: Get instance of created class");
869    com.orindasoft.demo.generated.sql.CustomerDelete theService = getCustomerDeleteSqlDAO();
870    
871    theService.setParamParam1(ParamParam1);
872    
873    // Call statement
874    theLog.debug("serviceSqlCustomerDelete: Call statement");
875    theService.executeCall();
876    
877    }
878  catch (com.orindasoft.pub.CSException e)
879    {
880    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
881    theLog.error("serviceSqlCustomerDelete Failed:");
882    theLog.error(e.getMessage());
883    throw (e2);
884    }
885  finally
886    {
887    
888    if (alwaysReleaseResources)
889      {
890      // Hand back DB connection...
891      releaseResources();
892      }
893    
894    }
895  }
896/** 
897* Call Class CustomerUpdate as a service
898* @param String Paramaddress STRING
899* @param String Paramcity STRING
900* @param String Paramstate STRING
901* @param double Paramzip NUMBER
902* @param java.util.Date Parambdate DATE
903* @param String Paramphone STRING
904* @param String Paramname STRING
905* @return void
906* @throws DAOFactoryServiceException
907*/
908// JSR-181 support - make this method part of a web service
909@WebMethod
910public void serviceSqlCustomerUpdate
911    (@WebParam(name="Paramaddress") String Paramaddress
912    ,@WebParam(name="Paramcity") String Paramcity
913    ,@WebParam(name="Paramstate") String Paramstate
914    ,@WebParam(name="Paramzip") double Paramzip
915    ,@WebParam(name="Parambdate") java.util.Date Parambdate
916    ,@WebParam(name="Paramphone") String Paramphone
917    ,@WebParam(name="Paramname") String Paramname) throws DAOFactoryServiceException
918  {
919  try
920    {
921    theLog.debug("serviceSqlCustomerUpdate Starting");
922    
923    // Get instance of created class
924    theLog.debug("serviceSqlCustomerUpdate: Get instance of created class");
925    com.orindasoft.demo.generated.sql.CustomerUpdate theService = getCustomerUpdateSqlDAO();
926    
927    theService.setParamaddress(Paramaddress);
928    theService.setParamcity(Paramcity);
929    theService.setParamstate(Paramstate);
930     
931    if (minValueIsNULL && Paramzip == Double.MIN_VALUE)
932      {
933      theService.setParamzipToNull();
934      }
935    else
936      {
937      theService.setParamzip(Paramzip);
938      }
939       
940    theService.setParambdate(Parambdate);
941    theService.setParamphone(Paramphone);
942    theService.setParamname(Paramname);
943    
944    // Call statement
945    theLog.debug("serviceSqlCustomerUpdate: Call statement");
946    theService.executeCall();
947    
948    }
949  catch (com.orindasoft.pub.CSException e)
950    {
951    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
952    theLog.error("serviceSqlCustomerUpdate Failed:");
953    theLog.error(e.getMessage());
954    throw (e2);
955    }
956  finally
957    {
958    
959    if (alwaysReleaseResources)
960      {
961      // Hand back DB connection...
962      releaseResources();
963      }
964    
965    }
966  }
967/** 
968* Call Class GetFlights as a service
969* @param String Paramcity STRING
970* @return com.orindasoft.demo.generated.sql.GetFlightsCursorAttr[]
971* @throws DAOFactoryServiceException
972*/
973// JSR-181 support - make this method part of a web service
974@WebMethod
975public com.orindasoft.demo.generated.sql.GetFlightsCursorAttr[] serviceSqlGetFlights
976    (@WebParam(name="Paramcity") String Paramcity) throws DAOFactoryServiceException
977  {
978  try
979    {
980    theLog.debug("serviceSqlGetFlights Starting");
981    
982    // Declare variable to hold result of service
983    com.orindasoft.demo.generated.sql.GetFlightsCursorAttr[] serviceOutput;
984    
985    // Get instance of created class
986    theLog.debug("serviceSqlGetFlights: Get instance of created class");
987    com.orindasoft.demo.generated.sql.GetFlights theService = getGetFlightsSqlDAO();
988    
989    // Set parameters
990    theLog.debug("serviceSqlGetFlights: Set parameters");
991    theService.setParamcity(Paramcity);
992    theService.setParamcity(Paramcity);
993    
994    // Call Query
995    theLog.debug("serviceSqlGetFlights: Call Query");
996    serviceOutput = (com.orindasoft.demo.generated.sql.GetFlightsCursorAttr[])com.orindasoft.demo.generated.sql.GetFlights.getArrayFromReadOnlyRowSet(theService.executeQuery(), theLog, true );
997    
998    // Unload results
999    theLog.debug("serviceSqlGetFlights: Unload results");
000    
001    theLog.debug("serviceSqlGetFlights Returning Data");
002    return(serviceOutput);
003    }
004  catch (com.orindasoft.pub.CSException e)
005    {
006    DAOFactoryServiceException e2 = new DAOFactoryServiceException(e.getMessage());
007    theLog.error("serviceSqlGetFlights Failed:");
008    theLog.error(e.getMessage());
009    throw (e2);
010    }
011  finally
012    {
013    
014    if (alwaysReleaseResources)
015      {
016      // Hand back DB connection...
017      releaseResources();
018      }
019    
020    }
021  }
022/**
023 * Turns a file into a Byte array. The file is deleted.
024 * @param theFile A file we wish to load into a Byte Array
025 * @return A Byte array containing the contents of the file
026 * @throws CSException
027 */
028protected byte[] loadFileIntoByteArray(java.io.File theFile) throws CSException
029  {
030  byte[] newArray = null;
031  try
032    {
033    if (theFile != null && theFile.exists() && theFile.length() > 0)
034      {
035      if (theFile.length() > Integer.MAX_VALUE)
036        {
037        throw new CSException("loadFileIntoByteArray: File " 
038                             + theFile.getAbsolutePath()
039                             + " is too big to be turned into a Byte array");
040        }
041         
042      theLog.debug("loadFileIntoByteArray: Starting to load " 
043                       + theFile.length()
044                       + " from temp file " + theFile.getAbsolutePath() + " into byte array");
045
046      newArray = new byte[(int)theFile.length()];
047      java.io.BufferedInputStream theInputStream = new java.io.BufferedInputStream(new java.io.FileInputStream(theFile));
048      theInputStream.read(newArray);
049      theInputStream.close();
050      theLog.debug("loadFileIntoByteArray: Finished loading byte array");
051      }
052    else
053      {
054      theLog.debug("loadFileIntoByteArray: Turning empty/null file into byte array"); 
055      }
056     
057    }
058  catch (java.io.IOException e)
059    {
060    throw new CSException("loadFileIntoByteArray:" + e.getMessage());
061    }
062
063  return (newArray);
064  }
065
066
067/**
068 * Turns a file into a Byte array or uses an existing byte array. The file is deleted.
069 * @param theFile A file we wish to load into a Byte Array
070 * @param theArray An existing Byte Array that may or not have the data we want
071 * @return A Byte array containing the contents of the file or theArray
072 * @throws CSException
073 */
074protected byte[] loadFileIntoByteArray(java.io.File theFile, byte[] theArray) throws CSException
075  {
076  if (theArray != null)
077    {
078    return(theArray);
079    }
080  return (loadFileIntoByteArray(theFile));
081  }
082
083
084/**
085 * Turns a Byte array into a File. 
086 * @param theBytes A Byte array
087 * @return A File containing theBytes
088 * @throws CSException
089 */
090protected java.io.File loadByteArrayIntoFile(byte[] theBytes) throws CSException
091  {
092  return(com.orindasoft.pub.IOUtils.loadByteArrayIntoFile(theBytes, tempFilePrefix, tempFileSuffix, tempFileDir.getAbsolutePath(), theLog));
093  }
094    
095/**
096* Turns a ReadOnlyRowSet into a WsdlRowSet. 
097* @param com.orindasoft.pub.ReadOnlyRowSet theRowSet A query
098* @return WsdlRowSet A data structure that can be serialized
099* @throws CSException
100*/
101protected WsdlRowSet createWSDLRowset(com.orindasoft.pub.ReadOnlyRowSet theRowSet) throws CSException
102  {
103  WsdlRowSet newRowSet = new WsdlRowSet();
104  
105  if (theRowSet == null)
106    {
107    return(newRowSet);
108    }
109  
110  newRowSet.columnNames = theRowSet.getColumnNamesAsStringArray();
111  newRowSet.rows = new WsdlRow[theRowSet.size()];
112  
113  for (int i=0; i < theRowSet.size(); i++)
114    {
115    try
116      {
117      theRowSet.setCurrentRowNumber(i);
118      newRowSet.rows[i] = new WsdlRow();
119      Object[] currentRow  = theRowSet.getCurrentRow();
120      newRowSet.rows[i].rowColumns = new WsdlElement[currentRow.length];
121       
122      for (int j=0; j < currentRow.length; j++)
123        {
124        newRowSet.rows[i].rowColumns[j] = new WsdlElement();
125        newRowSet.rows[i].rowColumns[j].column = currentRow[j];
126         
127        // Turn Files into Byte arrays
128        if (newRowSet.rows[i].rowColumns[j].column instanceof java.io.File)
129          {
130          java.io.File tempFile = (java.io.File)newRowSet.rows[i].rowColumns[j].column;
131          if (tempFile.exists())
132            {
133            newRowSet.rows[i].rowColumns[j].column = loadFileIntoByteArray(tempFile);
134            tempFile.delete();
135            }
136          else
137            {
138            newRowSet.rows[i].rowColumns[j].column = new byte[0];
139            }
140          }
141        // Turn Oracle's Interval data types into Strings
142        // This code will not compile if you use a JDBC driver prior to Oracle 10g
143        else if (   newRowSet.rows[i].rowColumns[j].column instanceof oracle.sql.INTERVALDS 
144                 || newRowSet.rows[i].rowColumns[j].column instanceof oracle.sql.INTERVALYM)
145          {
146          newRowSet.rows[i].rowColumns[j].column = newRowSet.rows[i].rowColumns[j].column.toString().trim();
147          }
148        // Turn Oracle's Timestamp data types into Strings
149        // This code will not compile if you use a JDBC driver prior to Oracle 9i
150        else if (   newRowSet.rows[i].rowColumns[j].column instanceof oracle.sql.TIMESTAMP)
151          {
152          newRowSet.rows[i].rowColumns[j].column = oracle.sql.TIMESTAMP.toString(((oracle.sql.TIMESTAMP)newRowSet.rows[i].rowColumns[j].column).getBytes());
153          }
154        else if (   newRowSet.rows[i].rowColumns[j].column instanceof oracle.sql.TIMESTAMPTZ)
155          {
156          try 
157            {
158            newRowSet.rows[i].rowColumns[j].column = oracle.sql.TIMESTAMPTZ.toString(theConnection,((oracle.sql.TIMESTAMPTZ)newRowSet.rows[i].rowColumns[j].column).getBytes());
159            }
160          catch (java.sql.SQLException e)
161            {
162            theLog.error("Row " + i + " Column " + newRowSet.columnNames[j] +": SQLException thrown:"); 
163            theLog.error(e);   
164            throw new CSException(e.getMessage());
165            }
166          }
167        else if (   newRowSet.rows[i].rowColumns[j].column instanceof oracle.sql.TIMESTAMPLTZ)
168          {
169          try 
170            {
171            newRowSet.rows[i].rowColumns[j].column = oracle.sql.TIMESTAMPLTZ.toString(theConnection,((oracle.sql.TIMESTAMPLTZ)newRowSet.rows[i].rowColumns[j].column).getBytes());
172            }
173          catch (java.sql.SQLException e)
174            {
175            theLog.error("Row " + i + " Column " + newRowSet.columnNames[j] +": SQLException thrown:"); 
176            theLog.error(e);   
177            throw new CSException(e.getMessage());
178            }
179          }
180        // If a ReadOnlyRowSet contains a 'bad' BFILE there will be an Exception instead of a File object
181        else if (newRowSet.rows[i].rowColumns[j].column instanceof CSException)
182          {
183          theLog.error("Row " + i + " Column " + newRowSet.columnNames[j] +": CSException found instead of LOB.:"); 
184          theLog.error((CSException)newRowSet.rows[i].rowColumns[j].column);
185          throw((CSException)newRowSet.rows[i].rowColumns[j].column);
186          }
187         
188        }
189      }
190    catch (com.orindasoft.pub.CSNoDataInRowSetException e)
191      {
192      newRowSet.rows[i] = null;
193      }
194    }
195  return(newRowSet);
196  }
197 
198/** 
199* Executes a DDL statement
200* @since JDBCWizard./a> 5.1.2557 
201*/ 
202private void executeImmediate(String ddl, int allowableErrorCode) throws CSException
203  {                                                                   
204  java.sql.CallableStatement theStatement = null;                                      
205                                                                   
206  if (theConnection == null)
207    {                                  
208    throw (new CSException("Not Connected - Statement can not be issued"));  
209    }                      
210                                                                   
211  // Parse execute immediate request...                          
212  try                                                              
213    {                                                                
214    theLog.info(ddl);
215    theLog.debug("executeImmediate - Starting to parse statement");
216    theStatement = theConnection.prepareCall(ddl);    
217    theLog.debug("executeImmediate - Finished parsing statement");
218    }                                                                  
219  catch (java.sql.SQLException e)                                    
220    {                                                                   
221    theLog.error("executeImmediate: Prepare Statement failed with " + e.toString());
222    CSDBException e2 = new CSDBException(e.getErrorCode(),e.getMessage(),"executeImmediate","DAOFactory");
223    throw (e2);   
224    }       
225                                                                
226  try                                                              
227    {                                                                
228    theStatement.execute();
229    theStatement.close();
230    }
231  catch (java.sql.SQLException e)
232    {
233    if (e.getErrorCode() != allowableErrorCode)
234      {                                  
235      theLog.error("DAOFactory - Execute Immediate Failed:");
236      theLog.error(e);
237      CSDBException e2 = new CSDBException(e.getErrorCode(),e.getMessage(),"executeImmediate","DAOFactory");
238      throw(e2);
239      }
240    }
241  }                      
242 
243/** 
244* Creates generated Oracle TYPE objects that are needed to 
245* access PL/SQL Package Array Parameters.
246* @since JDBCWizard./a> 5.1.2557
247*/ 
248public void createExtraTypeObjects() throws CSException
249  {
250  confirmConnection("createExtraTypeObjects");
251   
252  executeImmediate("CREATE OR REPLACE TYPE OSOFT46ND2_T AS OBJECT" 
253   
254                 + " (COL_0 VARCHAR2(16)"
255   
256                 + " ,COL_1 VARCHAR2(64)"
257   
258                 + " ,COL_2 NUMBER"
259   
260                 + " ,COL_3 DATE"
261   
262                 + " ,COL_4 VARCHAR2(4))",SqlUtils.TYPE_HAS_DEPENDENTS);
263   
264  executeImmediate("CREATE OR REPLACE TYPE OSOFT46ND2_A  AS TABLE OF OSOFT46ND2_T;",SqlUtils.TYPE_HAS_DEPENDENTS); 
265  executeImmediate("CREATE OR REPLACE TYPE OSOFT446NDD6_T AS OBJECT" 
266   
267                 + " (COL_0 VARCHAR2(16)"
268   
269                 + " ,COL_1 VARCHAR2(16)"
270   
271                 + " ,COL_2 VARCHAR2(64)"
272   
273                 + " ,COL_3 NUMBER"
274   
275                 + " ,COL_4 DATE"
276   
277                 + " ,COL_5 DATE"
278   
279                 + " ,COL_6 VARCHAR2(64))",SqlUtils.TYPE_HAS_DEPENDENTS);
280   
281  executeImmediate("CREATE OR REPLACE TYPE OSOFT446NDD6_A  AS TABLE OF OSOFT446NDD6_T;",SqlUtils.TYPE_HAS_DEPENDENTS); 
282   
283  }
284 
285/** 
286* Removes generated Oracle TYPE objects that are needed to 
287* access PL/SQL Package Array Parameters.
288* @since JDBCWizard./a> 5.1.2557
289*/ 
290public void dropExtraTypeObjects() throws CSException
291  {
292  confirmConnection("dropExtraTypeObjects");
293   
294  executeImmediate("DROP TYPE OSOFT46ND2_A",SqlUtils.OBJECT_DOES_NOT_EXIST); 
295   
296  executeImmediate("DROP TYPE OSOFT46ND2_T",SqlUtils.OBJECT_DOES_NOT_EXIST); 
297   
298  executeImmediate("DROP TYPE OSOFT446NDD6_A",SqlUtils.OBJECT_DOES_NOT_EXIST); 
299   
300  executeImmediate("DROP TYPE OSOFT446NDD6_T",SqlUtils.OBJECT_DOES_NOT_EXIST); 
301   
302  }
303 
304/** 
305* Removes generated Oracle TYPE objects that appear to have 
306* been created by JDBCWizard./a>, even if they aren't used by this generated service.
307* @since JDBCWizard./a> 5.1.2557
308*/ 
309public void dropAllExtraTypeObjects() throws CSException
310  {
311   
312  final String DROP_ALL_TYPES_BLOCK = 
313      "DECLARE\n" 
314    + "--\n"  
315    + "CURSOR typecur IS\n" 
316    + "SELECT 'DROP TYPE '||type_name cmd\n" 
317    + "FROM user_types\n"
318    + "WHERE type_name LIKE '" + tempFilePrefix.toUpperCase()  + "%'\n" 
319    + "ORDER BY DECODE (typecode,'COLLECTION',1,2), type_name;\n"
320    + "--\n" 
321    + "BEGIN\n"  
322    + "--\n"
323    + "FOR typerec IN typecur LOOP\n" 
324    + "--\n" 
325    + "  EXECUTE IMMEDIATE typerec.cmd;\n" 
326    + "--\n" 
327    + "END LOOP;\n" 
328    + "--\n" 
329    + "END;\n"; 
330   
331  confirmConnection("dropAllExtraTypeObjects");
332  executeImmediate(DROP_ALL_TYPES_BLOCK,0); 
333   
334  }
335} // Generated by JDBCWizard./a> 6.0.2776                                                  
336