|
|||||||||
Home >> All >> com >> RuntimeCollective >> webapps >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
com.RuntimeCollective.webapps.bean
Class SimpleDBFile

java.lang.Objectcom.RuntimeCollective.webapps.bean.SimpleDBFile
- All Implemented Interfaces:
- DBFile, EntityBean, java.io.Serializable
- public class SimpleDBFile
- extends java.lang.Object
- implements DBFile
- extends java.lang.Object
Database entry which manages and refers to an file in the database
- Version:
- $Id: SimpleDBFile.java,v 1.6 2003/09/30 15:13:09 joe Exp $
Field Summary | |
static java.lang.String |
BLOB_COLUMN
|
static java.lang.String |
DATABASE_TABLE
The name of the database table for this bean type. |
static java.lang.String |
DELETE
|
private byte[] |
fileData
image file data. |
static java.lang.String |
FROM_FILE
|
private int |
id
EntityBean id |
private java.lang.String |
mimeType
image mime type. |
private java.lang.String |
name
file name |
static java.lang.String |
SELECT_ALL
|
static java.lang.String |
SELECT_BLOB_WHERE_ID_EQUALS
|
static java.lang.String |
SELECT_ID
|
static java.lang.String |
WHERE_BLOB_ID_EQUALS
|
static java.lang.String |
WHERE_ID_EQUALS
|
Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean |
INTERFACE_BEAN, NULL_ID |
Constructor Summary | |
SimpleDBFile()
Construct a new blank SimpleDBFile, giving it a new unique ID. |
|
SimpleDBFile(int id)
Get an existing SimpleDBFile from the RuntimeDataSource, given an id. |
Method Summary | |
void |
delete()
Delete this bean from the database. |
protected void |
flushFileData()
|
byte[] |
getFileData()
get the file data. |
int |
getId()
get the unique id of this EntityBean. |
java.lang.String |
getMimeType()
get the mime type. |
java.lang.String |
getName()
get the file name. |
private void |
load()
Load the attributes of this File. |
private void |
loadFileData()
|
void |
save()
Save this bean to the database. |
protected void |
saveFile()
|
void |
setFileData(byte[] fileData)
set the file data. |
void |
setId(int id)
set the id of this EntityBean. |
void |
setMimeType(java.lang.String mimeType)
set the mime type. |
void |
setName(java.lang.String name)
set the file name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
DATABASE_TABLE
public static final java.lang.String DATABASE_TABLE
- The name of the database table for this bean type.
- See Also:
- Constant Field Values
id
private int id
- EntityBean id
name
private java.lang.String name
- file name
mimeType
private java.lang.String mimeType
- image mime type.
fileData
private byte[] fileData
- image file data.
SELECT_ALL
public static final java.lang.String SELECT_ALL
- See Also:
- Constant Field Values
SELECT_ID
public static final java.lang.String SELECT_ID
- See Also:
- Constant Field Values
FROM_FILE
public static final java.lang.String FROM_FILE
- See Also:
- Constant Field Values
WHERE_ID_EQUALS
public static final java.lang.String WHERE_ID_EQUALS
- See Also:
- Constant Field Values
DELETE
public static final java.lang.String DELETE
- See Also:
- Constant Field Values
WHERE_BLOB_ID_EQUALS
public static final java.lang.String WHERE_BLOB_ID_EQUALS
- See Also:
- Constant Field Values
BLOB_COLUMN
public static final java.lang.String BLOB_COLUMN
- See Also:
- Constant Field Values
SELECT_BLOB_WHERE_ID_EQUALS
public static final java.lang.String SELECT_BLOB_WHERE_ID_EQUALS
- See Also:
- Constant Field Values
Constructor Detail |
SimpleDBFile
public SimpleDBFile() throws java.sql.SQLException
- Construct a new blank SimpleDBFile, giving it a new unique ID.
SimpleDBFile
public SimpleDBFile(int id) throws java.sql.SQLException
- Get an existing SimpleDBFile from the RuntimeDataSource, given an
id.
Method Detail |
save
public void save() throws java.sql.SQLException
- Description copied from interface:
EntityBean
- Save this bean to the database.
- Specified by:
save
in interfaceEntityBean
delete
public void delete() throws java.sql.SQLException
- Delete this bean from the database.
- Specified by:
delete
in interfaceEntityBean
getId
public int getId()
- get the unique id of this EntityBean.
- Specified by:
getId
in interfaceEntityBean
setId
public void setId(int id)
- set the id of this EntityBean.
- Specified by:
setId
in interfaceEntityBean
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
getMimeType
public java.lang.String getMimeType()
- get the mime type.
- Specified by:
getMimeType
in interfaceDBFile
setMimeType
public void setMimeType(java.lang.String mimeType)
- set the mime type.
- Specified by:
setMimeType
in interfaceDBFile
getFileData
public byte[] getFileData()
- get the file data.
- Specified by:
getFileData
in interfaceDBFile
setFileData
public void setFileData(byte[] fileData)
- set the file data.
- Specified by:
setFileData
in interfaceDBFile
saveFile
protected void saveFile() throws java.io.IOException
flushFileData
protected void flushFileData()
load
private void load() throws java.sql.SQLException
- Load the attributes of this File.
loadFileData
private void loadFileData()
|
|||||||||
Home >> All >> com >> RuntimeCollective >> webapps >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |