1 /* 2 3 Derby - Class org.apache.derby.iapi.store.access.ConglomPropertyQueryable 4 5 Licensed to the Apache Software Foundation (ASF) under one or more 6 contributor license agreements. See the NOTICE file distributed with 7 this work for additional information regarding copyright ownership. 8 The ASF licenses this file to you under the Apache License, Version 2.0 9 (the "License"); you may not use this file except in compliance with 10 the License. You may obtain a copy of the License at 11 12 http://www.apache.org/licenses/LICENSE-2.0 13 14 Unless required by applicable law or agreed to in writing, software 15 distributed under the License is distributed on an "AS IS" BASIS, 16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 See the License for the specific language governing permissions and 18 limitations under the License. 19 20 */ 21 22 package org.apache.derby.iapi.store.access; 23 24 import org.apache.derby.iapi.error.StandardException; 25 26 import java.util.Properties; 27 28 /** 29 30 ConglomPropertyable provides the interfaces to read properties from a 31 conglomerate. 32 <p> 33 RESOLVE - If language ever wants these interfaces on a ScanController it 34 should not be too difficult to add them. 35 36 @see ConglomerateController 37 38 **/ 39 40 public interface ConglomPropertyQueryable 41 { 42 /** 43 * Request the system properties associated with a table. 44 * <p> 45 * Request the value of properties that are associated with a table. The 46 * following properties can be requested: 47 * derby.storage.pageSize 48 * derby.storage.pageReservedSpace 49 * derby.storage.minimumRecordSize 50 * derby.storage.initialPages 51 * <p> 52 * To get the value of a particular property add it to the property list, 53 * and on return the value of the property will be set to it's current 54 * value. For example: 55 * 56 * get_prop(ConglomerateController cc) 57 * { 58 * Properties prop = new Properties(); 59 * prop.put("derby.storage.pageSize", ""); 60 * cc.getTableProperties(prop); 61 * 62 * System.out.println( 63 * "table's page size = " + 64 * prop.getProperty("derby.storage.pageSize"); 65 * } 66 * 67 * @param prop Property list to fill in. 68 * 69 * @exception StandardException Standard exception policy. 70 **/ 71 void getTableProperties(Properties prop) 72 throws StandardException; 73 74 /** 75 * Request set of properties associated with a table. 76 * <p> 77 * Returns a property object containing all properties that the store 78 * knows about, which are stored persistently by the store. This set 79 * of properties may vary from implementation to implementation of the 80 * store. 81 * <p> 82 * This call is meant to be used only for internal query of the properties 83 * by jbms, for instance by language during bulk insert so that it can 84 * create a new conglomerate which exactly matches the properties that 85 * the original container was created with. This call should not be used 86 * by the user interface to present properties to users as it may contain 87 * properties that are meant to be internal to jbms. Some properties are 88 * meant only to be specified by jbms code and not by users on the command 89 * line. 90 * <p> 91 * Note that not all properties passed into createConglomerate() are stored 92 * persistently, and that set may vary by store implementation. 93 * 94 * @param prop Property list to add properties to. If null, routine will 95 * create a new Properties object, fill it in and return it. 96 * 97 * @exception StandardException Standard exception policy. 98 **/ 99 Properties getInternalTablePropertySet(Properties prop) 100 throws StandardException; 101 } 102