public class Char extends oracle.sql.CHAR implements NativeTypeDomainInterface, KeyAttributeInterface, oracle.sql.ORAData, oracle.jdbc.OracleData, java.io.Serializable, MarshalledDomain
The intent of many of the methods in this class is to wrap the corresponding method in the oracle.sql class such that it returns an instance of an oracle.jbo.domain.* object.
The oracle.jbo.domain.CHAR class is the Java representation of the underlying database type that you must use if you want to exploit the domain feature of Business Components for Java.
| Constructor and Description | 
|---|
Char()
Creates a  
Char Domain object representing the null string. | 
Char(byte[] val,
    oracle.sql.CharacterSet charset)
Creates a  
Char Domain object from a byte array representing
 a string of a given character set. | 
Char(byte[] val,
    int p1,
    int p2,
    oracle.sql.CharacterSet charset)
Internal: Applications should not invoke this method. 
 | 
Char(Char val)
Creates a  
Char identical to an
 existing Char. | 
Char(oracle.sql.CHAR val)
Creates a  
Char Domain object from a SQL
 CHAR. | 
Char(java.lang.Object val)
Creates a  
Char Domain object from an Object. | 
Char(java.lang.Object val,
    oracle.sql.CharacterSet charset)
Creates a  
Char Domain object from an Object
 interpreted as a string of a given character set. | 
Char(ResponseValues respVals)  | 
Char(java.lang.String val)
Creates a  
Char Domain object from a String. | 
Char(java.lang.String val,
    oracle.sql.CharacterSet charset)
Creates a  
Char Domain object from a String
 interpreted as a string of a given character set. | 
| Modifier and Type | Method and Description | 
|---|---|
java.math.BigDecimal | 
bigDecimalValue()
Calls CHAR.bigDecimalValue() to convert this object into a Java
 BigDecimal. 
 | 
java.math.BigInteger | 
bigIntegerValue()
Converts this data object into a BigInteger. 
 | 
boolean | 
booleanValue()
Converts this data object into a boolean. 
 | 
double | 
doubleValue()
Converts this data object into a double. 
 | 
boolean | 
equals(java.lang.Object other)
Tests  
this for equality with another object. | 
float | 
floatValue()
Converts this data object into a float. 
 | 
java.lang.Object | 
getData()
Internal: Applications should not use this method. 
 | 
static java.lang.Class | 
getNativeClass()  | 
java.lang.Object | 
getNativeObject()  | 
static oracle.sql.ORADataFactory | 
getORADataFactory()
Internal: Applications should not invoke this method. 
 | 
java.lang.String | 
getValue()
Return a java.lang.String object with this domain's value. 
 | 
int | 
hashCode()
Computes a hash code for  
this CharDomain object. | 
int | 
intValue()
Convert this data object into a int. 
 | 
boolean | 
isConvertibleTo(java.lang.Class jClass)
Tests whether this data object can be converted to the specified
 Java data type. 
 | 
long | 
longValue()
Converts this data object into a long. 
 | 
static void | 
main(java.lang.String[] argv)
Internal: Applications should not invoke this method. 
 | 
ResponseValues | 
marshal()  | 
void | 
setContext(DomainOwnerInterface owner,
          Transaction trans,
          java.lang.Object ctx)
Internal: Applications should not use this method. 
 | 
oracle.sql.Datum | 
toDatum(java.sql.Connection conn)
Internal: Applications should not invoke this method. 
 | 
java.lang.Object | 
toJDBCObject(java.sql.Connection connection)  | 
asciiStreamValue, binaryStreamValue, byteValue, characterStreamValue, dateValue, getCharacterSet, getConnectionDuringExceptionHandling, getString, getStringWithReplacement, isVariableLength, makeJdbcArray, oracleId, setVariableLength, stringValue, timestampValue, timeValue, toJdbc, toStringbytesEqual, bytesHashCode, compareBytes, getBytes, getLength, getStream, isNull, setBytes, setShareBytes, shareBytes, stringValue, timestampValue, timeValue, toClassclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBytes, setBytespublic Char()
     throws java.sql.SQLException
Char Domain object representing the null string.
 This constructor does not create a null object:
 use one of the NullValue objects to indicate null.
SQLException - if the empty string is not defined as a
 character in DEFAULT_CHARSET.java.sql.SQLExceptionpublic Char(Char val) throws java.sql.SQLException
Char identical to an
 existing Char.val - a Char Domain object.java.sql.SQLException - never.public Char(oracle.sql.CHAR val)
     throws java.sql.SQLException
Char Domain object from a SQL
 CHAR.val - a CHAR SQL object.java.sql.SQLException - never.public Char(java.lang.String val)
     throws java.sql.SQLException
Char Domain object from a String.val - A unicode string interpreted as a
 DEFAULT_CHARSET string.SQLException - if val does not
 represent a character.java.sql.SQLExceptionpublic Char(java.lang.Object val)
     throws java.sql.SQLException
Char Domain object from an Object.val - An object that will be converted using toString()
 into a DEFAULT_CHARSET string.SQLException - if the string does not represent a
 character.java.sql.SQLExceptionpublic Char(byte[] val,
            oracle.sql.CharacterSet charset)
Creates a Char Domain object from a byte array representing
 a string of a given character set.
 
No validation is performed.
val - A byte array representing a charset string.charset - An Oracle character set.public Char(byte[] val,
            int p1,
            int p2,
            oracle.sql.CharacterSet charset)
Creates a Char Domain object from a range of a byte array
 representing a string of a given character set.
 
No validation is performed.
val - A byte array representing a charset string.p1 - The index of the first byte in the range.p2 - The number of bytes in the range.charset - An Oracle character set.public Char(java.lang.String val,
            oracle.sql.CharacterSet charset)
     throws java.sql.SQLException
Char Domain object from a String
 interpreted as a string of a given character set.val - A unicode string interpreted as a
 charset string.charset - An Oracle character set.SQLException - if val does not
 represent a character.java.sql.SQLExceptionpublic Char(java.lang.Object val,
            oracle.sql.CharacterSet charset)
     throws java.sql.SQLException
Char Domain object from an Object
 interpreted as a string of a given character set.val - An object that will be converted using toString()
 into a charset string.charset - An Oracle character set.SQLException - if the string does not represent a
 character.java.sql.SQLExceptionpublic Char(ResponseValues respVals) throws java.sql.SQLException
java.sql.SQLExceptionpublic static oracle.sql.ORADataFactory getORADataFactory()
Initializes the Char Domain.
 
This method is invoked when Business Components for Java is initialized. Applications should not call this method directly.
ORADataFactory for the
 Char Domain.public oracle.sql.Datum toDatum(java.sql.Connection conn)
                         throws java.sql.SQLException
Converts this Char Domain object back into an
 SQL CHAR object.
toDatum in interface oracle.sql.ORADataconn - OracleConnection Not used.Datum containing CHAR object.SQLException.java.sql.SQLExceptionpublic java.lang.Object getNativeObject()
getNativeObject in interface NativeTypeDomainInterfacepublic static java.lang.Class getNativeClass()
getNativeClass in interface NativeTypeDomainInterfacepublic java.lang.String getValue()
public java.lang.Object getData()
getData in interface DomainInterfacepublic void setContext(DomainOwnerInterface owner, Transaction trans, java.lang.Object ctx)
setContext in interface DomainInterfacepublic int hashCode()
this CharDomain object.
 The Domain type is ignored.hashCode in class java.lang.Objectthis CharDomain object.public boolean equals(java.lang.Object other)
this for equality with another object. 
 Since JDeveloper 9.0.2, this method will also compare Char objects of different
 CharacterSets by converting the two CharacterSets into a common characterset if 
 required, so as to compare and return the actual string differences. 
 Note that oracle.sql.CHAR does not perform such conversion before comparision. In Oracle9i database charset may be different from the charset of a client machine and that leads to different charsets in the CHAR object.
equals in class oracle.sql.CHARother - An arbitrary Object.true if conversion was successful and the converted
 argument is identical to this.public static void main(java.lang.String[] argv)
                 throws java.sql.SQLException
For testing purposes only.
java.sql.SQLExceptionpublic ResponseValues marshal()
marshal in interface MarshalledDomainpublic boolean isConvertibleTo(java.lang.Class jClass)
isConvertibleTo in class oracle.sql.CHARjClass - specifies the Java data type to test against.public int intValue()
intValue in class oracle.sql.CHARpublic long longValue()
longValue in class oracle.sql.CHARpublic float floatValue()
floatValue in class oracle.sql.CHARpublic double doubleValue()
doubleValue in class oracle.sql.CHARpublic java.math.BigInteger bigIntegerValue()
public boolean booleanValue()
booleanValue in class oracle.sql.CHARpublic java.math.BigDecimal bigDecimalValue()
bigDecimalValue in class oracle.sql.CHARpublic java.lang.Object toJDBCObject(java.sql.Connection connection)
                              throws java.sql.SQLException
toJDBCObject in interface oracle.jdbc.OracleDatajava.sql.SQLException