1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 package ifc.sdbc; 25 26 import lib.MultiPropertyTest; 27 28 import com.sun.star.uno.Any; 29 30 31 /** 32 * Testing <code>com.sun.star.sdbc.RowSet</code> 33 * service properties : 34 * <ul> 35 * <li><code> DataSourceName</code></li> 36 * <li><code> URL</code></li> 37 * <li><code> Command</code></li> 38 * <li><code> TransactionIsolation</code></li> 39 * <li><code> TypeMap</code></li> 40 * <li><code> EscapeProcessing</code></li> 41 * <li><code> QueryTimeOut</code></li> 42 * <li><code> MaxFieldSize</code></li> 43 * <li><code> MaxRows</code></li> 44 * <li><code> User</code></li> 45 * <li><code> Password</code></li> 46 * <li><code> ResultSetType</code></li> 47 * </ul> <p> 48 * Properties testing is automated by <code>lib.MultiPropertyTest</code>. 49 * @see com.sun.star.sdbc.RowSet 50 */ 51 public class _RowSet extends MultiPropertyTest { 52 53 /** 54 * Redefined method returns object, that contains changed property value. 55 */ _TypeMap()56 public void _TypeMap() { 57 boolean result = false; 58 try { 59 Any TypeMap = (Any) oObj.getPropertyValue("TypeMap"); 60 String TypeName = TypeMap.getType().getTypeName(); 61 String expected = "com.sun.star.container.XNameAccess"; 62 result = TypeName.equals(expected); 63 if (! result ) { 64 log.println("Expected Type is "+expected); 65 log.println("but the returned is "+TypeName); 66 } 67 } catch(com.sun.star.lang.WrappedTargetException e) { 68 log.println("Exception " + e.getMessage()); 69 } catch(com.sun.star.beans.UnknownPropertyException e) { 70 log.println("Exception " + e.getMessage()); 71 } 72 73 tRes.tested("TypeMap",result); 74 } 75 76 } // finish class _RowSet 77 78