|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplanetj.database.Field
planetj.database.field.BlobField
Nested Class Summary |
Nested classes inherited from class planetj.database.Field |
Field.FieldLocation |
Field Summary |
Fields inherited from class planetj.database.Field |
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_UNKNOWN |
Fields inherited from interface planetj.dataengine.security.IGuarded |
TYPE_ID_UNKNOWN, TYPE_NAME_FIELD, TYPE_NAME_SQLOPERATION, TYPE_SECURED_BY_LEVEL, TYPE_SECURED_BY_OPERATION, TYPE_UNSECURED |
Constructor Summary | |
BlobField()
|
Method Summary | |
java.lang.Object |
createObject(java.lang.String pStringValue)
Create an object for this Field type using the given String. |
java.io.InputStream |
getBinaryStream()
Retrieves the BLOB designated by this Blob
instance as a stream. |
protected BlobObject |
getBlobObject()
Get the BlobObject for this BlobField |
byte[] |
getBytes()
|
byte[] |
getBytes(long pos,
int length)
Returns as an array of bytes part or all of the BLOB value
that this Blob object designates. |
java.lang.Object |
getCopiedValue()
Gets an independent copy of this field's value. |
java.lang.String |
getDefaultDatabaseValue()
Subclass must override this method and return a default value to be placed in the database when this field is Non-nullable and not required. |
java.lang.String |
getSQLValue(boolean pUseOriginalValue)
Returns the Field's value in SQL format. |
boolean |
getValueAsBoolean()
Subclasses must override this to determine what their boolean value is. |
boolean |
isValueEqual(java.lang.Object obj)
Return a boolean indicating if the passed in Object is equal to this Fields value. |
boolean |
isValueGreaterThan(java.lang.Object obj)
Returns a boolean indicating if this field is greater than the supplied object. |
boolean |
isValueLessThan(java.lang.Object obj)
Returns a boolean indicating if this field is less then the supplied object. |
long |
length()
Returns the number of bytes in the BLOB value designated
by this Blob object. |
long |
position(java.sql.Blob pattern,
long start)
Determines the byte position in the BLOB value designated
by this Blob object at which pattern
begins. |
long |
position(byte[] pattern,
long start)
Determines the byte position at which the specified byte pattern begins within the BLOB value that
this Blob object represents. |
java.io.OutputStream |
setBinaryStream(long pos)
|
int |
setBytes(long pos,
byte[] bytes)
|
int |
setBytes(long pos,
byte[] bytes,
int offset,
int len)
|
void |
setValue(java.lang.Object pValue)
Sets the current value of the Field to the specified value, and also sets the old value to the previous value. |
void |
truncate(long len)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BlobField()
Method Detail |
public java.io.OutputStream setBinaryStream(long pos) throws java.sql.SQLException
setBinaryStream
in interface java.sql.Blob
java.sql.SQLException
public int setBytes(long pos, byte[] bytes, int offset, int len) throws java.sql.SQLException
setBytes
in interface java.sql.Blob
java.sql.SQLException
public int setBytes(long pos, byte[] bytes) throws java.sql.SQLException
setBytes
in interface java.sql.Blob
java.sql.SQLException
public void truncate(long len) throws java.sql.SQLException
truncate
in interface java.sql.Blob
java.sql.SQLException
public java.lang.Object createObject(java.lang.String pStringValue) throws CMException
createObject
in class Field
pStringValue
- String
CMException
public java.io.InputStream getBinaryStream() throws java.sql.SQLException
BLOB
designated by this Blob
instance as a stream.
getBinaryStream
in interface java.sql.Blob
BLOB
data
java.sql.SQLException
- if there is an error accessing the
BLOB
protected BlobObject getBlobObject()
public byte[] getBytes()
public byte[] getBytes(long pos, int length) throws java.sql.SQLException
BLOB
value
that this Blob
object designates. The byte array contains
up to length
consecutive bytes starting at position
pos
.
getBytes
in interface java.sql.Blob
pos
- the ordinal position of the first byte in the
BLOB
value to be extracted; the first byte is
at position 1length
- is the number of consecutive bytes to be copied
length
consecutive
bytes from the BLOB
value designated by this
Blob
object, starting with the byte at position
pos
.
java.sql.SQLException
- if there is an error accessing the
BLOB
public java.lang.Object getCopiedValue()
getCopiedValue
in class Field
public java.lang.String getDefaultDatabaseValue() throws CMException
Example: A SS# is not required to be filled in by users, but the database does not allow nulls in that field. SocialSecurityField must override this method and return a default value like -1; Creation date: (5/29/2003 7:12:45 AM)
getDefaultDatabaseValue
in class Field
CMException
public java.lang.String getSQLValue(boolean pUseOriginalValue) throws CMException
getSQLValue
in class Field
pUseOriginalValue
- If this is true then the value used will be this field's original value as it
was read from the database. Otherwise its current value is used.
CMException
public boolean getValueAsBoolean()
getValueAsBoolean
in class Field
public boolean isValueEqual(java.lang.Object obj)
isValueEqual
in class Field
public boolean isValueGreaterThan(java.lang.Object obj)
isValueGreaterThan
in class Field
public boolean isValueLessThan(java.lang.Object obj)
isValueLessThan
in class Field
public long length() throws java.sql.SQLException
BLOB
value designated
by this Blob
object.
length
in interface java.sql.Blob
BLOB
in bytes
java.sql.SQLException
- if there is an error accessing the length of the
BLOB
public long position(byte[] pattern, long start) throws java.sql.SQLException
pattern
begins within the BLOB
value that
this Blob
object represents. The search for
patternstart
.
position
in interface java.sql.Blob
pattern
- the byte array for which to searchstart
- the position at which to begin searching; the
first position is 1
java.sql.SQLException
- if there is an error accessing the
BLOB
public long position(java.sql.Blob pattern, long start) throws java.sql.SQLException
BLOB
value designated
by this Blob
object at which pattern
begins. The search begins at position start
.
position
in interface java.sql.Blob
pattern
- the Blob
object designating the
BLOB
value for which to searchstart
- the position in the BLOB
value at which to
begin searching; the first position is 1
java.sql.SQLException
- if there is an error accessing the
BLOB
public void setValue(java.lang.Object pValue) throws CMException
setValue
in class Field
CMException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |