1 /************************************************************************* 2 * 3 * The Contents of this file are made available subject to the terms of 4 * the BSD license. 5 * 6 * Copyright 2000, 2010 Oracle and/or its affiliates. 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: 12 * 1. Redistributions of source code must retain the above copyright 13 * notice, this list of conditions and the following disclaimer. 14 * 2. Redistributions in binary form must reproduce the above copyright 15 * notice, this list of conditions and the following disclaimer in the 16 * documentation and/or other materials provided with the distribution. 17 * 3. Neither the name of Sun Microsystems, Inc. nor the names of its 18 * contributors may be used to endorse or promote products derived 19 * from this software without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 28 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 29 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 30 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 31 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * 33 *************************************************************************/ 34 35 #include "SResultSetMetaData.hxx" 36 37 using namespace connectivity::skeleton; 38 using namespace com::sun::star::uno; 39 using namespace com::sun::star::lang; 40 using namespace com::sun::star::sdbc; 41 42 // ------------------------------------------------------------------------- 43 OResultSetMetaData::~OResultSetMetaData() 44 { 45 } 46 // ------------------------------------------------------------------------- 47 // ------------------------------------------------------------------------- 48 sal_Int32 SAL_CALL OResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException) 49 { 50 return 50; 51 } 52 // ------------------------------------------------------------------------- 53 54 sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column ) throw(SQLException, RuntimeException) 55 { 56 sal_Int32 nType = 0; 57 return nType; 58 } 59 // ------------------------------------------------------------------------- 60 61 sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount( ) throw(SQLException, RuntimeException) 62 { 63 // this make no sense here so you have to change this 64 return 0; 65 } 66 // ------------------------------------------------------------------------- 67 68 sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw(SQLException, RuntimeException) 69 { 70 return sal_True; 71 } 72 // ------------------------------------------------------------------------- 73 74 ::rtl::OUString SAL_CALL OResultSetMetaData::getSchemaName( sal_Int32 column ) throw(SQLException, RuntimeException) 75 { 76 return ::rtl::OUString(); 77 } 78 // ------------------------------------------------------------------------- 79 80 ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException) 81 { 82 return ::rtl::OUString::createFromAscii("Column") + ::rtl::OUString::valueOf(column); 83 } 84 // ------------------------------------------------------------------------- 85 ::rtl::OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException) 86 { 87 return ::rtl::OUString(); 88 } 89 // ------------------------------------------------------------------------- 90 ::rtl::OUString SAL_CALL OResultSetMetaData::getCatalogName( sal_Int32 column ) throw(SQLException, RuntimeException) 91 { 92 return ::rtl::OUString(); 93 } 94 // ------------------------------------------------------------------------- 95 ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException) 96 { 97 return ::rtl::OUString(); 98 } 99 // ------------------------------------------------------------------------- 100 ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException) 101 { 102 return ::rtl::OUString(); 103 } 104 // ------------------------------------------------------------------------- 105 ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw(SQLException, RuntimeException) 106 { 107 return ::rtl::OUString(); 108 } 109 // ------------------------------------------------------------------------- 110 111 sal_Bool SAL_CALL OResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException) 112 { 113 return sal_False; 114 } 115 // ------------------------------------------------------------------------- 116 117 sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(SQLException, RuntimeException) 118 { 119 return sal_False; 120 } 121 // ------------------------------------------------------------------------- 122 123 124 sal_Bool SAL_CALL OResultSetMetaData::isSigned( sal_Int32 column ) throw(SQLException, RuntimeException) 125 { 126 return sal_False; 127 } 128 // ------------------------------------------------------------------------- 129 sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException) 130 { 131 return 0; 132 } 133 // ----------------------------------------------------------------------------- 134 sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) 135 { 136 return 0; 137 } 138 // ------------------------------------------------------------------------- 139 140 sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException) 141 { 142 return 0; 143 } 144 // ------------------------------------------------------------------------- 145 146 sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQLException, RuntimeException) 147 { 148 return sal_True; 149 } 150 // ------------------------------------------------------------------------- 151 152 sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException) 153 { 154 return sal_True; 155 } 156 // ------------------------------------------------------------------------- 157 158 sal_Bool SAL_CALL OResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException) 159 { 160 return sal_False; 161 ; 162 } 163 // ------------------------------------------------------------------------- 164 sal_Bool SAL_CALL OResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException) 165 { 166 return sal_False; 167 } 168 // ------------------------------------------------------------------------- 169 170