Java Doc for PropertyUtil.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » services » property » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.iapi.services.property 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.iapi.services.property.PropertyUtil

PropertyUtil
public class PropertyUtil (Code)
There are 5 property objects within a JBMS system. 1) JVM - JVM set - those in System.getProperties 2) APP - Application set - derby.properties file 3) SRV - Persistent Service set - Those stored in service.properties 4) TRAN - Persistent Transactional set - Those stored via the AccessManager interface 5) BOOT - Set by a boot method (rare) This class has a set of static methods to find a property using a consistent search order from the above set.
getSystem*() methods use the search order.
  1. JVM
  2. APP

getService* methods use the search order
  1. JVM
  2. TRAN
  3. SRV
  4. APP


Field Summary
final public static  intNOT_SET
     Property is not set.
final public static  intSET_IN_APPLICATION
    
final public static  intSET_IN_DATABASE
    
final public static  intSET_IN_JVM
    
final public static  String[]servicePropertyList
    


Method Summary
public static  booleanbooleanProperty(String p, Serializable v, boolean defaultValue)
     Parse and validate and return a boolean property value.
public static  StringgetDatabaseProperty(PersistentSet set, String key)
     Get a property only looking in the Persistent Transactional (database) set.
exception:
  StandardException - Standard Cloudscape error handling.
public static  StringgetPropertyFromSet(Properties set, String key)
     Get a property from the passed in set.
public static  SerializablegetPropertyFromSet(Dictionary set, String key)
    
public static  SerializablegetPropertyFromSet(boolean dbOnly, Dictionary set, String key)
    
public static  StringgetPropertyFromSet(boolean dbOnly, Properties set, String key)
    
public static  booleangetServiceBoolean(PersistentSet set, String key, boolean defValue)
     Get a service wide property as a boolean. true of the property is set to 'true, TRUE', false otherwise
exception:
  StandardException - Standard Cloudscape error handling.
public static  intgetServiceInt(PersistentSet set, String key, int min, int max, int defaultValue)
     Get a service wide property as a int. value of the property if set subject to min and max, defaultValue ifit is not set or set to a non-integer value.
exception:
  StandardException - Standard Cloudscape error handling.
public static  intgetServiceInt(PersistentSet set, Properties props, String key, int min, int max, int defaultValue)
     Get a service wide property as a int.
public static  StringgetServiceProperty(PersistentSet set, String key, String defaultValue)
     Find a service wide property with a default.
public static  StringgetServiceProperty(PersistentSet set, String key)
     Find a service wide property.
public static  booleangetSystemBoolean(String key)
     Get a system wide property as a boolean.
public static  intgetSystemInt(String key, int min, int max, int defaultValue)
     s Get a system wide property as a int.
public static  intgetSystemInt(String key, int defaultValue)
     Get a system wide property as a int.
public static  StringgetSystemProperty(String key)
     Find a system wide property.
public static  StringgetSystemProperty(String key, String defaultValue)
     Find a system wide property with a default.
public static  inthandleInt(String value, int min, int max, int defaultValue)
     Parse an string as an int based property value.
public static  intintPropertyValue(String p, Serializable v, int minValue, int maxValue, int defaultValue)
     Parse, validate and return an integer property value.
public static  booleanisDBOnly(Dictionary set)
    
public static  booleanisDBOnly(Properties set)
    
public static  booleanisServiceProperty(String key)
     Return true iff the key is the name of a database property that is stored in services.properties.
static  intwhereSet(String key, Dictionary set)
    

Field Detail
NOT_SET
final public static int NOT_SET(Code)
Property is not set.



SET_IN_APPLICATION
final public static int SET_IN_APPLICATION(Code)
Property is set in APPLICATION (derby.properties) set



SET_IN_DATABASE
final public static int SET_IN_DATABASE(Code)
Property is set in DATABASE set



SET_IN_JVM
final public static int SET_IN_JVM(Code)
Property is set in JVM set



servicePropertyList
final public static String[] servicePropertyList(Code)





Method Detail
booleanProperty
public static boolean booleanProperty(String p, Serializable v, boolean defaultValue) throws StandardException(Code)
Parse and validate and return a boolean property value. If the value is invalid raise an exception.

The following are valid property values.

  • null - returns defaultValue
  • "true" - returns true (in any case without the quotes)
  • "false" - return true (in any case without the quotes)

exception:
  StandardException - Oops



getDatabaseProperty
public static String getDatabaseProperty(PersistentSet set, String key) throws StandardException(Code)
Get a property only looking in the Persistent Transactional (database) set.
exception:
  StandardException - Standard Cloudscape error handling.



getPropertyFromSet
public static String getPropertyFromSet(Properties set, String key)(Code)
Get a property from the passed in set. The passed in set is either:
  • The properties object passed into ModuleControl.boot() after the database has been booted. This set will be a DoubleProperties object with the per-database transaction set as the read set and the service.properties as the write set.
  • The Dictionary set returned/passed in by a method of BasicService.Properties.

This method uses the same search order as the getService() calls.



getPropertyFromSet
public static Serializable getPropertyFromSet(Dictionary set, String key)(Code)



getPropertyFromSet
public static Serializable getPropertyFromSet(boolean dbOnly, Dictionary set, String key)(Code)



getPropertyFromSet
public static String getPropertyFromSet(boolean dbOnly, Properties set, String key)(Code)



getServiceBoolean
public static boolean getServiceBoolean(PersistentSet set, String key, boolean defValue) throws StandardException(Code)
Get a service wide property as a boolean. true of the property is set to 'true, TRUE', false otherwise
exception:
  StandardException - Standard Cloudscape error handling.



getServiceInt
public static int getServiceInt(PersistentSet set, String key, int min, int max, int defaultValue) throws StandardException(Code)
Get a service wide property as a int. value of the property if set subject to min and max, defaultValue ifit is not set or set to a non-integer value.
exception:
  StandardException - Standard Cloudscape error handling.



getServiceInt
public static int getServiceInt(PersistentSet set, Properties props, String key, int min, int max, int defaultValue) throws StandardException(Code)
Get a service wide property as a int. The passed in Properties set overrides any system, applcation or per-database properties. value of the property if set subject to min and max, defaultValue ifit is not set or set to a non-integer value.
exception:
  StandardException - Standard Cloudscape error handling.



getServiceProperty
public static String getServiceProperty(PersistentSet set, String key, String defaultValue) throws StandardException(Code)
Find a service wide property with a default. Search order is The service is the persistent service associated with the current context stack. the value of the property or defaultValue if it does not exist.
exception:
  StandardException - Standard Cloudscape error handling.



getServiceProperty
public static String getServiceProperty(PersistentSet set, String key) throws StandardException(Code)
Find a service wide property. The service is the persistent service associated with the current context stack. the value of the property or null if it does not exist.
exception:
  StandardException - Standard Cloudscape error handling.



getSystemBoolean
public static boolean getSystemBoolean(String key)(Code)
Get a system wide property as a boolean. true of the property is set to 'true, TRUE', false otherwise



getSystemInt
public static int getSystemInt(String key, int min, int max, int defaultValue)(Code)
s Get a system wide property as a int. value of the property if set subject to min and max, defaultValue ifit is not set or set to a non-integer value.



getSystemInt
public static int getSystemInt(String key, int defaultValue)(Code)
Get a system wide property as a int. value of the property if, defaultValue ifit is not set or set to a non-integer value.



getSystemProperty
public static String getSystemProperty(String key)(Code)
Find a system wide property. the value of the property or null if it does not exist.
See Also:   PropertyUtil.getSystemProperty(String,String)



getSystemProperty
public static String getSystemProperty(String key, String defaultValue)(Code)
Find a system wide property with a default. Search order is
  1. JVM property
  2. derby.properties

This method can be used by a system that is not running Cloudscape, just to maintain the same lookup logic and security manager concerns for finding derby.properties and reading system properties. the value of the property or defaultValue if it does not exist.




handleInt
public static int handleInt(String value, int min, int max, int defaultValue)(Code)
Parse an string as an int based property value.



intPropertyValue
public static int intPropertyValue(String p, Serializable v, int minValue, int maxValue, int defaultValue) throws StandardException(Code)
Parse, validate and return an integer property value. If the value is invalid raise an exception. If the value passed in is null return a default value.
exception:
  StandardException - Oops



isDBOnly
public static boolean isDBOnly(Dictionary set)(Code)



isDBOnly
public static boolean isDBOnly(Properties set)(Code)



isServiceProperty
public static boolean isServiceProperty(String key)(Code)
Return true iff the key is the name of a database property that is stored in services.properties.



whereSet
static int whereSet(String key, Dictionary set)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.