alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

HSQLDB example source code file (org_hsqldb_Library.properties)

This example HSQLDB source code file (org_hsqldb_Library.properties) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - HSQLDB tags/keywords

ascii, code, code, if, if, in, li, li, string, the, this, this, ul, unicode

The HSQLDB org_hsqldb_Library.properties source code

rand(java.lang.Integer)=Returns the next pseudorandom, uniformly distributed <CODE>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.
rand(java.lang.Integer)@0=the next pseudorandom, uniformly distributed <CODE>double value between 0.0 and 1.0
rand(java.lang.Integer)@1=seed - an optional parameter with which to reseed the underlying pseudorandom number generator
abs(double)=Returns the absolute value of the given <code>double value.
abs(double)@0=the absolute value of <code>d, as a double
abs(double)@1=d - the number for which to determine the absolute value
log10(double)=Returns the base 10 logarithm of the given <code>double value.
log10(double)@0=the base 10 logarithm of <code>x, as a double
log10(double)@1=x - the value for which to calculate the base 10 logarithm
roundMagic(double)=Retrieves a <em>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
roundMagic(double)@0=the <em>magically rounded value produced roundMagic(double)@1=d - the double value for which to retrieve the <em>magically rounded value cot(double)=Returns the cotangent of the given <code>double value expressed in radians. cot(double)@0=the cotangent cot(double)@1=d - the angle, expressed in radians mod(int,int)=Returns the remainder (modulus) of the first given integer divided by the second. <p> mod(int,int)@0=<code>i1 % i2, as an int mod(int,int)@1=i1 - the numerator mod(int,int)@2=i2 - the divisor pi()=Returns the constant value, pi. pi()@0=pi as a <code>double value round(double,int)=Returns the given <code>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). round(double,int)@0=<code>d rounded round(double,int)@1=d - the value to be rounded round(double,int)@2=p - the rounding place value sign(double)=Returns an indicator of the sign of the given <code>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. sign(double)@0=the sign of <code>d sign(double)@1=d - the value truncate(double,int)=Returns the given <code>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. truncate(double,int)@0=<code>d, truncated truncate(double,int)@1=d - the value to truncate truncate(double,int)@2=p - the places left or right of the decimal point at which to truncate bitand(int,int)=Returns the bit-wise logical <em>and of the given integer values. bitand(int,int)@0=the bit-wise logical <em>and of i and j bitand(int,int)@1=i - the first value bitand(int,int)@2=j - the second value bitor(int,int)=Returns the bit-wise logical <em>or of the given integer values. bitor(int,int)@0=he bit-wise logical <em>or of i and j bitor(int,int)@1=i - the first value bitor(int,int)@2=j - the second value bitor(int,int)=Returns the bit-wise logical <em>xor of the given integer values. bitor(int,int)@0=he bit-wise logical <em>and of i and j bitor(int,int)@1=i - the first value bitor(int,int)@2=j - the second value ascii(java.lang.String)=Returns the Unicode code value of the leftmost character of <code>s as an int. This is the same as the ASCII value if the string contains only ASCII characters. ascii(java.lang.String)@0=the integer Unicode value of the leftmost character ascii(java.lang.String)@1=s - the <CODE>String to evaluate character(int)=Returns the character string corresponding to the given ASCII (or Unicode) value. <b>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. character(int)@0=the String representation of the character character(int)@1=code - the character code for which to return a String representation concat(java.lang.String,java.lang.String)=Returns a <CODE>String object that is the result of an SQL-style concatenation of the given String objects.

Note: by SQL-style, it is meant:

  • 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
concat(java.lang.String,java.lang.String)@0=<code>s1 concatentated with s2 concat(java.lang.String,java.lang.String)@1=s1 - the first <CODE>String concat(java.lang.String,java.lang.String)@2=s2 - the second <CODE>String difference(java.lang.String,java.lang.String)=Returns a count of the characters that do not match when comparing the 4 digit numeric SOUNDEX character sequences for the given <code>String objects. If either String object is null, zero is returned. difference(java.lang.String,java.lang.String)@0=the number of differences between the <code>SOUNDEX of s1 and the SOUNDEX of s2 difference(java.lang.String,java.lang.String)@1=s1 - the first <code>String difference(java.lang.String,java.lang.String)@2=s2 - the second <code>String hexToRaw(java.lang.String)=Converts a <code>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 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. hexToRaw(java.lang.String)@0=an equivalent raw binary value, represented as a <code>String hexToRaw(java.lang.String)@1=s - a <code>String of hexidecimal digit characters insert(java.lang.String,int,int,java.lang.String)=Returns a character sequence which is the result of writing the first <code>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
insert(java.lang.String,int,int,java.lang.String)@0=<code>s2 inserted into s1, as indicated by start and length and adjusted for boundry conditions insert(java.lang.String,int,int,java.lang.String)@1=s1 - the <code>String into which to insert s2 insert(java.lang.String,int,int,java.lang.String)@2=start - the position, with origin one, at which to start the insertion insert(java.lang.String,int,int,java.lang.String)@3=length - the number of characters in <code>s1 to replace insert(java.lang.String,int,int,java.lang.String)@4=s2 - the <code>String to insert into s1 lcase(java.lang.String)=Returns a copy of the given <code>String, with all upper case characters converted to lower case. This uses the default Java String conversion. lcase(java.lang.String)@0=a lower case version of <code>s lcase(java.lang.String)@1=s - the <code>String from which to produce a lower case version left(java.lang.String,int)=Returns the leftmost <code>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
left(java.lang.String,int)@0=the leftmost <code>count characters of s left(java.lang.String,int)@1=s - the <code>String from which to retrieve the leftmost characters left(java.lang.String,int)@2=count - the count of leftmost characters to retrieve length(java.lang.String)=Returns the number of characters in the given <code>String. This includes trailing blanks. length(java.lang.String)@0=the length of <code>s, including trailing blanks length(java.lang.String)@1=s - the <code>String for which to determine length locate(java.lang.String,java.lang.String,java.lang.Integer)=Returns the starting position of the first occurrence of the given <code>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. locate(java.lang.String,java.lang.String,java.lang.Integer)@0=the one-based starting position of the first occurrence of <code>search within s, or 0 if not found locate(java.lang.String,java.lang.String,java.lang.Integer)@1=search - the <code>String occurence to find in s locate(java.lang.String,java.lang.String,java.lang.Integer)@2=s - the <code>String within which to find the first occurence of search locate(java.lang.String,java.lang.String,java.lang.Integer)@3=start - the optional character position from which to start looking in <code>s ltrim(java.lang.String)=Returns the characters of the given <code>String, with the leading spaces removed. Characters such as TAB are not removed. ltrim(java.lang.String)@0=the characters of the given <code>String, with the leading spaces removed ltrim(java.lang.String)@1=s - the <code>String from which to remove the leading blanks rawToHex(java.lang.String)=Converts a raw binary value, as represented by the given <code>String, to the equivalent String of hexidecimal digit characters.

This conversion has the effect of expanding the character count 1:4. rawToHex(java.lang.String)@0=an equivalent <code>String of hexidecimal digit characters rawToHex(java.lang.String)@1=s - the raw binary value, as a <code>String repeat(java.lang.String,java.lang.Integer)=Returns a <code>String composed of the given String, repeated count times. repeat(java.lang.String,java.lang.Integer)@0=the given <code>String, repeated count times repeat(java.lang.String,java.lang.Integer)@1=s - the <code>String to repeat repeat(java.lang.String,java.lang.Integer)@2=count - the number of repetitions replace(java.lang.String,java.lang.String,java.lang.String)=Replaces all occurrences of <code>replace in s with the String object: with replace(java.lang.String,java.lang.String,java.lang.String)@0=<code>s, with all occurences of replace replaced by with replace(java.lang.String,java.lang.String,java.lang.String)@1=s - the target for replacement replace(java.lang.String,java.lang.String,java.lang.String)@2=replace - the substring(s), if any, in <code>s to replace replace(java.lang.String,java.lang.String,java.lang.String)@3=with - the value to substitute for <code>replace right(java.lang.String,int)=Returns the rightmost <code>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
right(java.lang.String,int)@0=the rightmost <code>count characters of s right(java.lang.String,int)@1=s - the <code>String from which to retrieve the rightmost count characters right(java.lang.String,int)@2=count - the number of rightmost characters to retrieve rtrim(java.lang.String)=Returns the characters of the given <code>String, with trailing spaces removed. rtrim(java.lang.String)@0=the characters of the given <CODE>String, with the trailing spaces removed rtrim(java.lang.String)@1=s - the <code>String from which to remove the trailing blanks soundex(java.lang.String)=Returns a four character code representing the sound of the given <code>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.

soundex(java.lang.String)@0=the 4 character <code>SOUNDEX value for the given String soundex(java.lang.String)@1=s - the <code>String for which to calculate the 4 character SOUNDEX value space(int)=Returns a <code>String consisting of count spaces, or null if count is less than zero.

space(int)@0=a <code>String of count spaces space(int)@1=count - the number of spaces to produce substring(java.lang.String,int,java.lang.Integer)=Returns the characters from the given <code>String, staring 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. substring(java.lang.String,int,java.lang.Integer)@0=the indicted substring of <code>s. substring(java.lang.String,int,java.lang.Integer)@1=s - the <code>String from which to produce the indicated substring substring(java.lang.String,int,java.lang.Integer)@2=start - the starting position of the desired substring substring(java.lang.String,int,java.lang.Integer)@3=length - the length of the desired substring ucase(java.lang.String)=Returns a copy of the given <code>String, with all lower case characters converted to upper case using the default Java method. ucase(java.lang.String)@0=an upper case version of <code>s ucase(java.lang.String)@1=s - the <code>String from which to produce an upper case version curdate()=Returns the current date as a date value. curdate()@0=a date value representing the current date curtime()=Returns the current local time as a time value. curtime()@0=a time value representing the current local time dayname(java.sql.Date)=Returns a character string containing the name of the day (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday ) for the day portion of the given <code>java.sql.Date. dayname(java.sql.Date)@0=the name of the day corresponding to the given <code>java.sql.Date dayname(java.sql.Date)@1=d - the date value from which to extract the day name dayofmonth(java.sql.Date)=Returns the day of the month from the given date value, as an integer value in the range of 1-31. dayofmonth(java.sql.Date)@0=the day of the month from the given date value dayofmonth(java.sql.Date)@1=d - the date value from which to extract the day of month dayofweek(java.sql.Date)=Returns the day of the week from the given date value, as an integer value in the range 1-7, where 1 represents Sunday. dayofweek(java.sql.Date)@0=the day of the week from the given date value dayofweek(java.sql.Date)@1=d - the date value from which to extract the day of week dayofyear(java.sql.Date)=Returns the day of the year from the given date value, as an integer value in the range 1-366. dayofyear(java.sql.Date)@0=the day of the year from the given date value dayofyear(java.sql.Date)@1=d - the date value from which to extract the day of year hour(java.sql.Time)=Returns the hour from the given time value, as an integer value in the range of 0-23. hour(java.sql.Time)@0=the hour of day from the given time value hour(java.sql.Time)@1=t - the time value from which to extract the hour of day minute(java.sql.Time)=Returns the minute from the given time value, as integer value in the range of 0-59. minute(java.sql.Time)@0=the minute value from the given time value minute(java.sql.Time)@1=t - the time value from which to extract the minute value month(java.sql.Date)=Returns the month from the given date value, as an integer value in the range of 1-12 or 0-11. <p> If the sql_month database property is set true, then the range is 1-12, else 0-11 month(java.sql.Date)@0=the month value from the given date value month(java.sql.Date)@1=d - the date value from which to extract the month value monthname(java.sql.Date)=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. monthname(java.sql.Date)@0=a String representing the month name from the given date value monthname(java.sql.Date)@1=d - the date value from which to extract the month name now()=Returns the current date and time as a timestamp value. now()@0=a timestamp value representing the current date and time quarter(java.sql.Date)=Returns the quarter of the year in the given date value, as an integer value in the range of 1-4. quarter(java.sql.Date)@0=an integer representing the quater of the year from the given date value quarter(java.sql.Date)@1=d - the date value from which to extract the quarter of the year second(java.sql.Time)=Returns the second of the given time value, as an integer value in the range of 0-59. second(java.sql.Time)@0=an integer representing the second of the hour from the given time value second(java.sql.Time)@1=d - the date value from which to extract the second of the hour week(java.sql.Date)=Returns the week of the year from the given date value, as an integer value in the range of 1-53. week(java.sql.Date)@0=an integer representing the week of the year from the given date value week(java.sql.Date)@1=d - the date value from which to extract the week of the year year(java.sql.Date)=Returns the year from the given date value, as an integer value in the range of 1-9999. year(java.sql.Date)@0=an integer value representing the year from the given date value year(java.sql.Date)@1=d - the date value from which to extract the year database(java.sql.Connection)=Returns the name of the database corresponding to this connection. database(java.sql.Connection)@0=the name of the database for the given connection database(java.sql.Connection)@1=conn - the connection for which to retrieve the database name user(java.sql.Connection)=Returns the user's authorization name (the user's name as known to this database). user(java.sql.Connection)@0=the user's name as known to the database user(java.sql.Connection)@1=conn - the connection for which to retrieve the user name identity()=Retrieves the last auto-generated integer indentity value used by this connection. As of 1.7.1 this is a dummy function. The return value is supplied directly by Function.java identity()@0=the connection's the last generated integer identity value getAutoCommit(java.sql.Connection)=Retrieves the autocommit status of this connection. <p> getAutoCommit(java.sql.Connection)@0=a boolean value representing the connection's autocommit status getAutoCommit(java.sql.Connection)@1=conn - the <code>Connection object for which to retrieve the current autocommit status getDatabaseProductName()=Retrieves the name of this database product. <p> getDatabaseProductName()@0=database product name as a <code>String object getDatabaseProductVersion()=Retrieves the version number of this database product. <p> getDatabaseProductVersion()@0=database version number as a <code>String object getDatabaseMajorVersion()=Retrieves the major version number of this database. <p> getDatabaseMajorVersion()@0=the database's major version as an <code>int value getDatabaseMinorVersion()=Retrieves the major version number of this database. <p> getDatabaseMinorVersion()@0=the database's major version as an <code>int value isReadOnlyConnection(java.sql.Connection)=Retrieves whether this connection is in read-only mode. <p> isReadOnlyConnection(java.sql.Connection)@0=<code>true if connection is read-only and false otherwise isReadOnlyConnection(java.sql.Connection)@1=conn - the <code>Connection object for which to retrieve the current read-only status isReadOnlyDatabase(java.sql.Connection)=Retrieves whether this database is in read-only mode. <p> isReadOnlyDatabase(java.sql.Connection)@0=<code>true if so; false otherwise isReadOnlyDatabase(java.sql.Connection)@1=c the <code>Connection object for which to retrieve the current database read-only status #Since 1.7.2 bitLength(java.lang.String)=Returns the number of bits in the given <code>String. This includes trailing blanks. bitLength(java.lang.String)@0=the bit length of <code>s, including trailing blanks bitLength(java.lang.String)@1=The <code>String for which to retrieve the bit length datediff(java.lang.String,java.sql.Timestamp,java.sql.Timestamp)=Returns the number of date and time boundaries crossed between two specified datetime values. datediff(java.lang.String,java.sql.Timestamp,java.sql.Timestamp)@0=the number of date and time boundaries crossed between two specified dates, as a Long value datediff(java.lang.String,java.sql.Timestamp,java.sql.Timestamp)@1=datepart - Specifies the unit in which the interval is to be measured datediff(java.lang.String,java.sql.Timestamp,java.sql.Timestamp)@2=startdate - The starting datetime value for the interval. This value is subtracted from enddate to return the number of date-parts between the two arguments. datediff(java.lang.String,java.sql.Timestamp,java.sql.Timestamp)@3=enddate - The ending datetime for the interval. startdate is subtracted from this value to return the number of date-parts between the two arguments isReadOnlyDatabaseFiles(java.sql.Connection)=Retrieves whether the files of this database are in read-only mode. isReadOnlyDatabaseFiles(java.sql.Connection)@0=<code>true if so; false otherwise isReadOnlyDatabaseFiles(java.sql.Connection)@1=c the <code>Connection object for which to retrieve the current database files read-only status octetLength(java.lang.String)=Returns the number of bytes in the given <code>String. This includes trailing blanks. octetLength(java.lang.String)@0=the octent length of <code>s, including trailing blanks octetLength(java.lang.String)@1=The <code>String for which to retrieve the octent length position(java.lang.String,java.lang.String)=Returns the starting position of the first occurrence of the given <code>search String object within the given String object, s. position(java.lang.String,java.lang.String)@0=the one-based starting position of the first occurrence of <code>search within s, or 0 if not found position(java.lang.String,java.lang.String)@1=search - the <code>String occurence to find in s position(java.lang.String,java.lang.String)@2=s - the <code>String within which to find the first occurence of search trim(java.lang.String,java.lang.String,boolean,boolean)=Retrieves a character sequence derived from <code>s with the leading, trailing or both leading and trailing occurances of trimstr removed trim(java.lang.String,java.lang.String,boolean,boolean)@0=The character sequence <code>s, with either the leading or trailing occurrences of trimstr removed trim(java.lang.String,java.lang.String,boolean,boolean)@1=s - the character sequence from which to remove occurrences of <code>trimstr trim(java.lang.String,java.lang.String,boolean,boolean)@2=trimstr - the character sequence whose occurances are to be removed from <code>s trim(java.lang.String,java.lang.String,boolean,boolean)@3=leading - if true, then leading occurences are removed trim(java.lang.String,java.lang.String,boolean,boolean)@4=trailing - if true, then trailing occurences are removed

Other HSQLDB examples (source code examples)

Here is a short list of links related to this HSQLDB org_hsqldb_Library.properties source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.