Java Doc for Library.java in  » Database-DBMS » hsql » org » hsqldb » 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 » hsql » org.hsqldb 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.hsqldb.Library

Library
public class Library (Code)
Provides the HSQLDB implementation of standard Open Group SQL CLI Extended Scalar Functions and other public HSQLDB SQL functions.

All methods here that have a Connection parameter are dummies and should not be called from user supplied Java procedure or trigger code. Use real SQL functions should be called instead in these instances. Extensively rewritten and extended in successive versions of HSQLDB.
author:
   Thomas Mueller (Hypersonic SQL Group)
version:
   1.8.0
since:
   Hypersonic SQL



Field Summary
final static  intabs
    
final static  intascii
    
final static  intbitLength
    
final static  intbitand
    
final static  intbitor
    
final static  intbitxor
    
final static  intcharacter
    
final static  intconcat
    
final static  intcot
    
final static  intcurdate
    
final static  intcurtime
    
final static  intdatabase
    
final static  intdatediff
    
final static  intday
    
final static  FieldPositiondayPosition
    
final static  intdayname
    
final static  StringBufferdaynameBuffer
    
final static  SimpleDateFormatdaynameFormat
    
final static  intdayofmonth
    
final static  intdayofweek
    
final static  intdayofyear
    
final static  intdifference
    
final static  intgetAutoCommit
    
final static  intgetDatabaseFullProductVersion
    
final static  intgetDatabaseMajorVersion
    
final static  intgetDatabaseMinorVersion
    
final static  intgetDatabaseProductName
    
final static  intgetDatabaseProductVersion
    
final static  inthexToRaw
    
final static  inthour
    
final static  intidentity
    
final static  intinsert
    
final static  intisReadOnlyConnection
    
final static  intisReadOnlyDatabase
    
final static  intisReadOnlyDatabaseFiles
    
final static  intlcase
    
final static  intleft
    
final static  intlength
    
final static  intlocate
    
final static  intlog10
    
final static  intltrim
    
final static  intminute
    
final static  intmod
    
final static  intmonth
    
final static  FieldPositionmonthPosition
    
final static  intmonthname
    
final static  StringBuffermonthnameBuffer
    
final static  SimpleDateFormatmonthnameFormat
    
final static  intnow
    
final static  intoctetLength
    
final static  intpi
    
final static  DoublepiValue
    
final static  intposition
    
final static  Stringprefix
    
final static  intprefixLength
    
final static  intquarter
    
final static  intrand
    
final static  intrawToHex
    
final static  intrepeat
    
final static  intreplace
    
final static  intright
    
final static  intround
    
final static  introundMagic
    
final static  intrtrim
    
final public static  String[][]sNumeric
    
final public static  String[][]sString
    
final public static  String[][]sSystem
    
final public static  String[][]sTimeDate
    
final static  intsecond
    
final static  intsign
    
final static  intsoundex
    
final static  intspace
    
final static  intsubstring
    
final static  intto_char
    
final static  SimpleDateFormattocharFormat
    
final static  inttrim
    
final static  inttruncate
    
final static  intucase
    
final static  intuser
    
final static  intweek
    
final static  intyear
    


Method Summary
public static  doubleabs(double d)
     Returns the absolute value of the given double value.
public static  Integerascii(String s)
     Returns the Unicode code value of the leftmost character of s as an int.
public static  IntegerbitLength(String s)
     Returns the number of bits in the given String.
public static  intbitand(int i, int j)
     Returns the bit-wise logical and of the given integer values.
public static  intbitor(int i, int j)
     Returns the bit-wise logical or of the given integer values.
public static  intbitxor(int i, int j)
     Returns the bit-wise logical xor of the given integer values.
public static  Stringcharacter(int code)
     Returns the character string corresponding to the given ASCII (or Unicode) value.
public static  Stringconcat(String s1, String s2)
     Returns a String object that is the result of an concatenation of the given String objects.
public static  doublecot(double d)
     Returns the cotangent of the given double value expressed in radians.
public static  Datecurdate(Connection c)
     Returns the current date as a date value.
public static  Timecurtime(Connection c)
     Returns the current local time as a time value.
public static  Stringdatabase(Connection conn)
     Returns the name of the database corresponding to this connection.
public static  Longdatediff(String datepart, Timestamp d1, Timestamp d2)
     Returns the number of units elapsed between two dates.

The datapart parameter indicates the part to be used for computing the difference.

public static  Stringdayname(Date d)
     Returns a character string containing the name of the day (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday ) for the day portion of the given java.sql.Date.
public static  Integerdayofmonth(Date d)
     Returns the day of the month from the given date value, as an integer value in the range of 1-31.
public static  Integerdayofweek(Date d)
     Returns the day of the week from the given date value, as an integer value in the range 1-7, where 1 represents Sunday.
public static  Integerdayofyear(Date d)
     Returns the day of the year from the given date value, as an integer value in the range 1-366.
public static  intdifference(String s1, String s2)
     Returns a count of the characters that do not match when comparing the 4 digit numeric SOUNDEX character sequences for the given String objects.
static  intfunctionID(String fname)
    
static  HashMapgetAliasMap()
    
public static  booleangetAutoCommit(Connection conn)
     Retrieves the autocommit status of this connection.
public static  StringgetDatabaseFullProductVersion()
     Retrieves the full version number of this database product.
public static  intgetDatabaseMajorVersion()
     Retrieves the major version number of this database.
public static  intgetDatabaseMinorVersion()
     Retrieves the major version number of this database.
public static  StringgetDatabaseProductName()
     Retrieves the name of this database product.
public static  StringgetDatabaseProductVersion()
     Retrieves the version number of this database product.
public static  StringhexToRaw(String s)
     Converts a String of hexidecimal digit characters to a raw binary value, represented as a String.

The given String object must consist of a sequence of 4 digit hexidecimal character substrings.

If its length is not evenly divisible by 4, null is returned.

public static  Integerhour(Time t)
     Returns the hour from the given time value, as an integer value in the range of 0-23.
public static  intidentity()
     Retrieves the last auto-generated integer indentity value used by this connection.
public static  Stringinsert(String s1, int start, int length, String s2)
     Returns a character sequence which is the result of writing the first length number of characters from the second given String over the first string.
static  Objectinvoke(int fID, Object[] params)
    
public static  booleanisReadOnlyConnection(Connection conn)
     Retrieves whether this connection is in read-only mode.
public static  booleanisReadOnlyDatabase(Connection c)
     Dummy method.
public static  booleanisReadOnlyDatabaseFiles(Connection c)
     Retrieves whether the files of this database are in read-only mode.
public static  Stringlcase(String s)
     Returns a copy of the given String, with all upper case characters converted to lower case.
public static  Stringleft(String s, int count)
     Returns the leftmost count characters from the given String.
public static  Integerlength(String s)
     Returns the number of characters in the given String.
public static  intlocate(String search, String s, Integer start)
     Returns the starting position of the first occurrence of the given search String object within the given String object, s. The search for the first occurrence of search begins with the first character position in s, unless the optional argument, start, is specified (non-null).
public static  doublelog10(double x)
     Returns the base 10 logarithm of the given double value.
public static  Stringltrim(String s)
     Returns the characters of the given String, with the leading spaces removed.
public static  Integerminute(Time t)
     Returns the minute from the given time value, as integer value in the range of 0-59.
public static  intmod(int i1, int i2)
     Returns the remainder (modulus) of the first given integer divided by the second.
public static  Integermonth(Date d)
     Returns the month from the given date value, as an integer value in the range of 1-12.
public static  Stringmonthname(Date d)
     Returns a character string containing the name of month (January, February, March, April, May, June, July, August, September, October, November, December) for the month portion of the given date value.
public static  Timestampnow(Connection c)
     Returns the current date and time as a timestamp value.
public static  IntegeroctetLength(String s)
     Returns the number of bytes in the given String.
public static  doublepi()
     Returns the constant value, pi.
public static  intposition(String search, String s)
     As locate but from start position l.
public static  Integerquarter(Date d)
     Returns the quarter of the year in the given date value, as an integer value in the range of 1-4.
public static  doublerand(Integer seed)
     Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from a single, system-wide random number generator's sequence, optionally re-seeding (and thus resetting) the generator sequence.
public static  StringrawToHex(String s)
     Converts a raw binary value, as represented by the given String, to the equivalent String of hexidecimal digit characters.
public static  Stringrepeat(String s, Integer count)
     Returns a String composed of the given String, repeated count times.
public static  Stringreplace(String s, String replace, String with)
    
public static  Stringright(String s, int count)
     Returns the rightmost count characters of the given String, s.
public static  doubleround(double d, int p)
     Returns the given double value, rounded to the given int places right of the decimal point.
public static  doubleroundMagic(double d)
     Retrieves a magically rounded double value produced from the given double value.
public static  Stringrtrim(String s)
     Returns the characters of the given String, with trailing spaces removed.
public static  Integersecond(Time d)
     Returns the second of the given time value, as an integer value in the range of 0-59.
public static  intsign(double d)
     Returns an indicator of the sign of the given double value.
public static  Stringsoundex(String s)
     Returns a four character code representing the sound of the given String.
public static  Stringspace(int count)
     Returns a String consisting of count spaces, or null if count is less than zero.
public static  Stringsubstring(String s, int start, Integer length)
     Returns the characters from the given String, starting at the indicated one-based start position and extending the (optional) indicated length.
public static  Stringto_char(java.util.Date d, String format)
    
public static  Stringtrim(String s, String trimstr, boolean leading, boolean trailing)
     Returns the character sequence s, with the leading, trailing or both the leading and trailing occurences of the first character of the character sequence trimstr removed.
public static  doubletruncate(double d, int p)
     Returns the given double value, truncated to the given int places right of the decimal point.
public static  Stringucase(String s)
     Returns a copy of the given String, with all lower case characters converted to upper case using the default Java method.
public static  Stringuser(Connection conn)
     Returns the user's authorization name (the user's name as known to this database).
public static  Integerweek(Date d)
     Returns the week of the year from the given date value, as an integer value in the range of 1-53.
public static  Integeryear(Date d)
     Returns the year from the given date value, as an integer value in the range of 1-9999.

Field Detail
abs
final static int abs(Code)



ascii
final static int ascii(Code)



bitLength
final static int bitLength(Code)



bitand
final static int bitand(Code)



bitor
final static int bitor(Code)



bitxor
final static int bitxor(Code)



character
final static int character(Code)



concat
final static int concat(Code)



cot
final static int cot(Code)



curdate
final static int curdate(Code)



curtime
final static int curtime(Code)



database
final static int database(Code)



datediff
final static int datediff(Code)



day
final static int day(Code)



dayPosition
final static FieldPosition dayPosition(Code)



dayname
final static int dayname(Code)



daynameBuffer
final static StringBuffer daynameBuffer(Code)



daynameFormat
final static SimpleDateFormat daynameFormat(Code)



dayofmonth
final static int dayofmonth(Code)



dayofweek
final static int dayofweek(Code)



dayofyear
final static int dayofyear(Code)



difference
final static int difference(Code)



getAutoCommit
final static int getAutoCommit(Code)



getDatabaseFullProductVersion
final static int getDatabaseFullProductVersion(Code)



getDatabaseMajorVersion
final static int getDatabaseMajorVersion(Code)



getDatabaseMinorVersion
final static int getDatabaseMinorVersion(Code)



getDatabaseProductName
final static int getDatabaseProductName(Code)



getDatabaseProductVersion
final static int getDatabaseProductVersion(Code)



hexToRaw
final static int hexToRaw(Code)



hour
final static int hour(Code)



identity
final static int identity(Code)



insert
final static int insert(Code)



isReadOnlyConnection
final static int isReadOnlyConnection(Code)



isReadOnlyDatabase
final static int isReadOnlyDatabase(Code)



isReadOnlyDatabaseFiles
final static int isReadOnlyDatabaseFiles(Code)



lcase
final static int lcase(Code)



left
final static int left(Code)



length
final static int length(Code)



locate
final static int locate(Code)



log10
final static int log10(Code)



ltrim
final static int ltrim(Code)



minute
final static int minute(Code)



mod
final static int mod(Code)



month
final static int month(Code)



monthPosition
final static FieldPosition monthPosition(Code)



monthname
final static int monthname(Code)



monthnameBuffer
final static StringBuffer monthnameBuffer(Code)



monthnameFormat
final static SimpleDateFormat monthnameFormat(Code)



now
final static int now(Code)



octetLength
final static int octetLength(Code)



pi
final static int pi(Code)



piValue
final static Double piValue(Code)



position
final static int position(Code)



prefix
final static String prefix(Code)



prefixLength
final static int prefixLength(Code)



quarter
final static int quarter(Code)



rand
final static int rand(Code)



rawToHex
final static int rawToHex(Code)



repeat
final static int repeat(Code)



replace
final static int replace(Code)



right
final static int right(Code)



round
final static int round(Code)



roundMagic
final static int roundMagic(Code)



rtrim
final static int rtrim(Code)



sNumeric
final public static String[][] sNumeric(Code)



sString
final public static String[][] sString(Code)



sSystem
final public static String[][] sSystem(Code)



sTimeDate
final public static String[][] sTimeDate(Code)



second
final static int second(Code)



sign
final static int sign(Code)



soundex
final static int soundex(Code)



space
final static int space(Code)



substring
final static int substring(Code)



to_char
final static int to_char(Code)



tocharFormat
final static SimpleDateFormat tocharFormat(Code)



trim
final static int trim(Code)



truncate
final static int truncate(Code)



ucase
final static int ucase(Code)



user
final static int user(Code)



week
final static int week(Code)



year
final static int year(Code)





Method Detail
abs
public static double abs(double d)(Code)
Returns the absolute value of the given double value.
Parameters:
  d - the number for which to determine the absolute value the absolute value of d, as a double



ascii
public static Integer ascii(String s)(Code)
Returns the Unicode code value of the leftmost character of s as an int. This is the same as the ASCII value if the string contains only ASCII characters.
Parameters:
  s - the String to evaluate the integer Unicode value of theleftmost character



bitLength
public static Integer bitLength(String s)(Code)
Returns the number of bits in the given String. This includes trailing blanks.
Parameters:
  s - the String for which to determine the bit length the bit length of s, including trailing blanks
since:
   1.7.2



bitand
public static int bitand(int i, int j)(Code)
Returns the bit-wise logical and of the given integer values.
Parameters:
  i - the first value
Parameters:
  j - the second value the bit-wise logical and ofi and j



bitor
public static int bitor(int i, int j)(Code)
Returns the bit-wise logical or of the given integer values.
Parameters:
  i - the first value
Parameters:
  j - the second value the bit-wise logical or ofi and j



bitxor
public static int bitxor(int i, int j)(Code)
Returns the bit-wise logical xor of the given integer values.
Parameters:
  i - the first value
Parameters:
  j - the second value the bit-wise logical xor ofi and j
since:
   1.8.0



character
public static String character(int code)(Code)
Returns the character string corresponding to the given ASCII (or Unicode) value. Note:

In some SQL CLI implementations, a null is returned if the range is outside 0..255. In HSQLDB, the corresponding Unicode character is returned unchecked.
Parameters:
  code - the character code for which to return a Stringrepresentation the String representation of the character




concat
public static String concat(String s1, String s2)(Code)
Returns a String object that is the result of an concatenation of the given String objects.

When only one string is NULL, the result is different from that returned by an (string1 || string2) expression:

  • if both String objects are null, return null
  • if only one string is null, return the other
  • if both String objects are non-null, return as a String object the character sequence obtained by listing, in left to right order, the characters of the first string followed by the characters of the second

Parameters:
  s1 - the first String
Parameters:
  s2 - the second String s1 concatentated with s2



cot
public static double cot(double d)(Code)
Returns the cotangent of the given double value expressed in radians.
Parameters:
  d - the angle, expressed in radians the cotangent



curdate
public static Date curdate(Connection c)(Code)
Returns the current date as a date value.

Dummy mehtod.

a date value representing the current date




curtime
public static Time curtime(Connection c)(Code)
Returns the current local time as a time value.

Dummy mehtod.

a time value representing the current local time




database
public static String database(Connection conn) throws HsqlException(Code)
Returns the name of the database corresponding to this connection.
Parameters:
  conn - the connection for which to retrieve the database name the name of the database for the given connection
throws:
  HsqlException - if a database access error occurs



datediff
public static Long datediff(String datepart, Timestamp d1, Timestamp d2) throws HsqlException(Code)
Returns the number of units elapsed between two dates.

The datapart parameter indicates the part to be used for computing the difference. Supported types include: 'year', 'yy', 'month', 'mm' 'day', 'dd', 'hour', 'hh', 'minute', 'mi', 'second', 'ss', 'millisecond', 'ms'. Contributed by Michael Landon


Parameters:
  datepart - Specifies the unit in which the interval is to be measured.
Parameters:
  d1 - The starting datetime value for the interval. This value issubtracted from d2 to return the number ofdate-parts between the two arguments.
Parameters:
  d2 - The ending datetime for the interval. d1 is subtractedfrom this value to return the number of date-partsbetween the two arguments.since 1.7.3




dayname
public static String dayname(Date d)(Code)
Returns a character string containing the name of the day (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday ) for the day portion of the given java.sql.Date.
Parameters:
  d - the date value from which to extract the day name the name of the day corresponding to the givenjava.sql.Date



dayofmonth
public static Integer dayofmonth(Date d)(Code)
Returns the day of the month from the given date value, as an integer value in the range of 1-31.
Parameters:
  d - the date value from which to extract the day of month the day of the month from the given date value



dayofweek
public static Integer dayofweek(Date d)(Code)
Returns the day of the week from the given date value, as an integer value in the range 1-7, where 1 represents Sunday.
Parameters:
  d - the date value from which to extract the day of week the day of the week from the given date value



dayofyear
public static Integer dayofyear(Date d)(Code)
Returns the day of the year from the given date value, as an integer value in the range 1-366.
Parameters:
  d - the date value from which to extract the day of year the day of the year from the given date value



difference
public static int difference(String s1, String s2)(Code)
Returns a count of the characters that do not match when comparing the 4 digit numeric SOUNDEX character sequences for the given String objects. If either String object is null, zero is returned.
Parameters:
  s1 - the first String
Parameters:
  s2 - the second String the number of differences between the SOUNDEX ofs1 and the SOUNDEX of s2



functionID
static int functionID(String fname)(Code)



getAliasMap
static HashMap getAliasMap()(Code)



getAutoCommit
public static boolean getAutoCommit(Connection conn)(Code)
Retrieves the autocommit status of this connection.


Parameters:
  conn - the Connection object for which to retrievethe current autocommit status a boolean value representing the connection's autocommit status
since:
   1.7.0




getDatabaseFullProductVersion
public static String getDatabaseFullProductVersion()(Code)
Retrieves the full version number of this database product.

database version number as a String object
since:
   1.8.0.4




getDatabaseMajorVersion
public static int getDatabaseMajorVersion()(Code)
Retrieves the major version number of this database.

the database's major version as an int value
since:
   1.7.2




getDatabaseMinorVersion
public static int getDatabaseMinorVersion()(Code)
Retrieves the major version number of this database.

the database's major version as an int value
since:
   1.7.2




getDatabaseProductName
public static String getDatabaseProductName()(Code)
Retrieves the name of this database product.

database product name as a String object
since:
   1.7.2




getDatabaseProductVersion
public static String getDatabaseProductVersion()(Code)
Retrieves the version number of this database product.

database version number as a String object
since:
   1.7.2




hexToRaw
public static String hexToRaw(String s)(Code)
Converts a String of hexidecimal digit characters to a raw binary value, represented as a String.

The given String object must consist of a sequence of 4 digit hexidecimal character substrings.

If its length is not evenly divisible by 4, null is returned. If any of its 4 character subsequences cannot be parsed as a 4 digit, base 16 value, then a NumberFormatException is thrown. This conversion has the effect of reducing the character count 4:1.
Parameters:
  s - a String of hexidecimal digit characters an equivalent raw binary value, represented as aString




hour
public static Integer hour(Time t)(Code)
Returns the hour from the given time value, as an integer value in the range of 0-23.
Parameters:
  t - the time value from which to extract the hour of day the hour of day from the given time value



identity
public static int identity() throws HsqlException(Code)
Retrieves the last auto-generated integer indentity value used by this connection.

Dummy mehtod.

the connection's the last generated integer identity value
throws:
  HsqlException - if a database access error occurs




insert
public static String insert(String s1, int start, int length, String s2)(Code)
Returns a character sequence which is the result of writing the first length number of characters from the second given String over the first string. The start position in the first string where the characters are overwritten is given by start.

Note: In order of precedence, boundry conditions are handled as follows:

  • if either supplied String is null, then the other is returned; the check starts with the first given String.
  • if start is less than one, s1 is returned
  • if length is less than or equal to zero, s1 is returned
  • if the length of s2 is zero, s1 is returned
  • if start is greater than the length of s1, s1 is returned
  • if length is such that, taken together with start, the indicated interval extends beyond the end of s1, then the insertion is performed precisely as if upon a copy of s1 extended in length to just include the indicated interval

Parameters:
  s1 - the String into which to insert s2
Parameters:
  start - the position, with origin one, at which to start the insertion
Parameters:
  length - the number of characters in s1 to replace
Parameters:
  s2 - the String to insert into s1 s2 inserted into s1, as indicatedby start and length and adjusted forboundry conditions



invoke
static Object invoke(int fID, Object[] params) throws HsqlException(Code)



isReadOnlyConnection
public static boolean isReadOnlyConnection(Connection conn)(Code)
Retrieves whether this connection is in read-only mode.

Dummy mehtod.


Parameters:
  conn - the Connection object for which to retrievethe current read-only status true if connection is read-only andfalse otherwise
since:
   1.7.2




isReadOnlyDatabase
public static boolean isReadOnlyDatabase(Connection c)(Code)
Dummy method. Retrieves whether this database is in read-only mode.


Parameters:
  c - the Connection object for which to retrievethe current database read-only status true if so; false otherwise
since:
   1.7.2




isReadOnlyDatabaseFiles
public static boolean isReadOnlyDatabaseFiles(Connection c)(Code)
Retrieves whether the files of this database are in read-only mode.

Dummy mehtod.


Parameters:
  c - the Connection object for which to retrievethe current database files read-only status true if so; false otherwise
since:
   1.7.2




lcase
public static String lcase(String s)(Code)
Returns a copy of the given String, with all upper case characters converted to lower case. This uses the default Java String conversion.
Parameters:
  s - the String from which to produce a lower caseversion a lower case version of s



left
public static String left(String s, int count)(Code)
Returns the leftmost count characters from the given String.

Note: boundry conditions are handled in the following order of precedence:

  • if s is null, then null is returned
  • if count is less than 1, then a zero-length String is returned
  • if count is greater than the length of s, then a copy of s is returned

Parameters:
  s - the String from which to retrieve the leftmostcharacters
Parameters:
  count - the count of leftmost characters to retrieve the leftmost count characters of s



length
public static Integer length(String s)(Code)
Returns the number of characters in the given String. This includes trailing blanks.
Parameters:
  s - the String for which to determine length the length of s, including trailing blanks



locate
public static int locate(String search, String s, Integer start)(Code)
Returns the starting position of the first occurrence of the given search String object within the given String object, s. The search for the first occurrence of search begins with the first character position in s, unless the optional argument, start, is specified (non-null). If start is specified, the search begins with the character position indicated by the value of start, where the first character position in s is indicated by the value 1. If search is not found within s, the value 0 is returned.
Parameters:
  search - the String occurence to find in s
Parameters:
  s - the String within which to find the firstoccurence of search
Parameters:
  start - the optional character position from which to startlooking in s the one-based starting position of the first occurrence ofsearch within s, or 0 if not found



log10
public static double log10(double x)(Code)
Returns the base 10 logarithm of the given double value.
Parameters:
  x - the value for which to calculate the base 10 logarithm the base 10 logarithm of x, as a double



ltrim
public static String ltrim(String s)(Code)
Returns the characters of the given String, with the leading spaces removed. Characters such as TAB are not removed.
Parameters:
  s - the String from which to remove the leading blanks the characters of the given String, with the leadingspaces removed



minute
public static Integer minute(Time t)(Code)
Returns the minute from the given time value, as integer value in the range of 0-59.
Parameters:
  t - the time value from which to extract the minute value the minute value from the given time value



mod
public static int mod(int i1, int i2)(Code)
Returns the remainder (modulus) of the first given integer divided by the second.


Parameters:
  i1 - the numerator
Parameters:
  i2 - the divisor i1 % i2, as an int




month
public static Integer month(Date d)(Code)
Returns the month from the given date value, as an integer value in the range of 1-12.

The sql_month database property is now obsolete. The function always returns the SQL (1-12) value for month.
Parameters:
  d - the date value from which to extract the month value the month value from the given date value




monthname
public static String monthname(Date d)(Code)
Returns a character string containing the name of month (January, February, March, April, May, June, July, August, September, October, November, December) for the month portion of the given date value.
Parameters:
  d - the date value from which to extract the month name a String representing the month name from the given date value



now
public static Timestamp now(Connection c)(Code)
Returns the current date and time as a timestamp value.

Dummy mehtod.

a timestamp value representing the current date and time




octetLength
public static Integer octetLength(String s)(Code)
Returns the number of bytes in the given String. This includes trailing blanks.
Parameters:
  s - the String for which to determine the octet length the octet length of s, including trailing blanks
since:
   1.7.2



pi
public static double pi()(Code)
Returns the constant value, pi. pi as a double value



position
public static int position(String search, String s)(Code)
As locate but from start position l.


Parameters:
  search - the String occurence to find in s
Parameters:
  s - the String within which to find the firstoccurence of search the one-based starting position of the first occurrence ofsearch within s, or 0 if not found




quarter
public static Integer quarter(Date d)(Code)
Returns the quarter of the year in the given date value, as an integer value in the range of 1-4.


Parameters:
  d - the date value from which to extract the quarter of the year an integer representing the quater of the year from the givendate value




rand
public static double rand(Integer seed)(Code)
Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from a single, system-wide random number generator's sequence, optionally re-seeding (and thus resetting) the generator sequence. If the seed value is null, then the underlying random number generator retrieves the next value in its current sequence, else the seed alters the state of the generator object so as to be in exactly the same state as if it had just been created with the seed value.
Parameters:
  seed - an optional parameter with which to reseed the underlyingpseudorandom number generator the next pseudorandom, uniformly distributed double value between0.0 and 1.0



rawToHex
public static String rawToHex(String s)(Code)
Converts a raw binary value, as represented by the given String, to the equivalent String of hexidecimal digit characters.

This conversion has the effect of expanding the character count 1:4.
Parameters:
  s - the raw binary value, as a String an equivalent String of hexidecimal digit characters




repeat
public static String repeat(String s, Integer count)(Code)
Returns a String composed of the given String, repeated count times.
Parameters:
  s - the String to repeat
Parameters:
  count - the number of repetitions the given String, repeated count times



replace
public static String replace(String s, String replace, String with)(Code)
Replaces all occurrences of replace in s with the String object: with
Parameters:
  s - the target for replacement
Parameters:
  replace - the substring(s), if any, in s to replace
Parameters:
  with - the value to substitute for replace s, with all occurences of replacereplaced by with



right
public static String right(String s, int count)(Code)
Returns the rightmost count characters of the given String, s.

Note: boundry conditions are handled in the following order of precedence:

  • if s is null, null is returned
  • if count is less than one, a zero-length String is returned
  • if count is greater than the length of s, a copy of s is returned

Parameters:
  s - the String from which to retrieve the rightmostcount characters
Parameters:
  count - the number of rightmost characters to retrieve the rightmost count characters of s



round
public static double round(double d, int p)(Code)
Returns the given double value, rounded to the given int places right of the decimal point. If the supplied rounding place value is negative, rounding is performed to the left of the decimal point, using its magnitude (absolute value).
Parameters:
  d - the value to be rounded
Parameters:
  p - the rounding place value d rounded



roundMagic
public static double roundMagic(double d)(Code)
Retrieves a magically rounded double value produced from the given double value. This method provides special handling for numbers close to zero and performs rounding only for numbers within a specific range, returning precisely the given value if it does not lie in this range.

Special handling includes:

  • input in the interval -0.0000000000001..0.0000000000001 returns 0.0
  • input outside the interval -1000000000000..1000000000000 returns input unchanged
  • input is converted to String form
  • input with a String form length greater than 16 returns input unchaged
  • String form with last four characters of '...000x' where x != '.' is converted to '...0000'
  • String form with last four characters of '...9999' is converted to '...999999'
  • the java.lang.Double.doubleValue of the String form is returned

Parameters:
  d - the double value for which to retrieve the magicallyrounded value the magically rounded value produced



rtrim
public static String rtrim(String s)(Code)
Returns the characters of the given String, with trailing spaces removed.
Parameters:
  s - the String from which to remove the trailing blanks the characters of the given String, with thetrailing spaces removed



second
public static Integer second(Time d)(Code)
Returns the second of the given time value, as an integer value in the range of 0-59.
Parameters:
  d - the date value from which to extract the second of the hour an integer representing the second of the hour from thegiven time value



sign
public static int sign(double d)(Code)
Returns an indicator of the sign of the given double value. If the value is less than zero, -1 is returned. If the value equals zero, 0 is returned. If the value is greater than zero, 1 is returned.
Parameters:
  d - the value the sign of d



soundex
public static String soundex(String s)(Code)
Returns a four character code representing the sound of the given String. Non-ASCCI characters in the input String are ignored.

This method was rewritten for HSQLDB by fredt@users to comply with the description at http://www.nara.gov/genealogy/coding.html.


Parameters:
  s - the String for which to calculate the 4 characterSOUNDEX value the 4 character SOUNDEX value for the givenString




space
public static String space(int count)(Code)
Returns a String consisting of count spaces, or null if count is less than zero.


Parameters:
  count - the number of spaces to produce a String of count spaces




substring
public static String substring(String s, int start, Integer length)(Code)
Returns the characters from the given String, starting at the indicated one-based start position and extending the (optional) indicated length. If length is not specified (is null), the remainder of s is implied. The rules for boundary conditions on s, start and length are, in order of precedence:

1.) if s is null, return null 2.) If length is less than 1, return null. 3.) If start is 0, it is treated as 1. 4.) If start is positive, count from the beginning of s to find the first character postion. 5.) If start is negative, count backwards from the end of s to find the first character. 6.) If, after applying 2.) or 3.), the start position lies outside s, then return null 7.) if length is ommited or is greated than the number of characters from the start position to the end of s, return the remaineder of s, starting with the start position.
Parameters:
  s - the String from which to produce the indicatedsubstring
Parameters:
  start - the starting position of the desired substring
Parameters:
  length - the length of the desired substring the indicted substring of s.




to_char
public static String to_char(java.util.Date d, String format)(Code)

since:
   1.8.0



trim
public static String trim(String s, String trimstr, boolean leading, boolean trailing)(Code)
Returns the character sequence s, with the leading, trailing or both the leading and trailing occurences of the first character of the character sequence trimstr removed.

This method is in support of the standard SQL String function TRIM. Ordinarily, the functionality of this method is accessed from SQL using the following syntax:

 <trim function> ::= TRIM <left paren> <trim operands> <right paren>
 <trim operands> ::= [ [ <trim specification> ] [ <trim character> ] FROM ] <trim source>
 <trim source> ::= <character value expression>
 <trim specification> ::= LEADING | TRAILING | BOTH
 <trim character> ::= <character value expression>
 

Parameters:
  s - the string to trim
Parameters:
  trimstr - the character whose occurences will be removed
Parameters:
  leading - if true, remove leading occurences
Parameters:
  trailing - if true, remove trailing occurences s, with the leading, trailing or both the leading and trailingoccurences of the first character of trimstr removed
since:
   1.7.2



truncate
public static double truncate(double d, int p)(Code)
Returns the given double value, truncated to the given int places right of the decimal point. If the given place value is negative, the given double value is truncated to the left of the decimal point, using the magnitude (aboslute value) of the place value.
Parameters:
  d - the value to truncate
Parameters:
  p - the places left or right of the decimal point at which totruncate d, truncated



ucase
public static String ucase(String s)(Code)
Returns a copy of the given String, with all lower case characters converted to upper case using the default Java method.
Parameters:
  s - the String from which to produce an upper caseversion an upper case version of s



user
public static String user(Connection conn) throws HsqlException(Code)
Returns the user's authorization name (the user's name as known to this database).
Parameters:
  conn - the connection for which to retrieve the user name the user's name as known to the database
throws:
  HsqlException - if a database access error occurs



week
public static Integer week(Date d)(Code)
Returns the week of the year from the given date value, as an integer value in the range of 1-53.


Parameters:
  d - the date value from which to extract the week of the year an integer representing the week of the year from the givendate value




year
public static Integer year(Date d)(Code)
Returns the year from the given date value, as an integer value in the range of 1-9999.


Parameters:
  d - the date value from which to extract the year an integer value representing the year from the givendate value




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.