|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.as400.micro.JdbcMeOfflineData
An offline data repository that represents a a data store that is generic, regardless of J2ME profile and JVM details.
Note that the index of the first record in a JdbcMeOfflineData object is 0, not 1 as in the MIDP implementation of RecordStore.
For example.
MIDP - The 'name' is a unique string of up to 32 unique characters identifying a javax.microedition.rms.RecordStore object the offline data object returned, then encapsulates the RecordStore object. PALM - The 'name' is effectively just a visual key, while the offline data is uniquely identified by the 'dbCreator' and the 'dbType' parameters.
Constructor Summary | |
JdbcMeOfflineData()
|
Method Summary | |
abstract void |
addRecord(byte[] rec,
int offset,
int length)
Add a record to the offline data store from the specified bytes of the byte array. |
abstract void |
close()
Close the offline data store, releasing resources required by the platform specific data store. |
static JdbcMeOfflineData |
create(java.lang.String name,
int dbCreator,
int dbType)
Create an offline data repository, destroying the current one if it exists. |
abstract void |
deleteRecord(int index)
Delete the record specified from the offline data store. |
abstract byte[] |
getRecord(int index)
Get a record from the offline data store. |
static JdbcMeOfflineData |
open(java.lang.String name,
int dbCreator,
int dbType,
boolean createIfNecessary)
Open or create an offline data repository Various parameters in this method are used or ignored depending on which J2ME profile is currently being used by this implementation. |
abstract void |
setRecord(int index,
byte[] rec,
int offset,
int length)
Set the record content to the specified bytes from the byte array. |
abstract int |
size()
Get the current number of records in the offline data store. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JdbcMeOfflineData()
Method Detail |
public static JdbcMeOfflineData create(java.lang.String name, int dbCreator, int dbType) throws JdbcMeException
dbName
- The name of the offline database.dbCreator
- The unique offline database creator identifier.dbType
- The unique offline database type identifier.JdbcMeException
- If an error occurs.public static JdbcMeOfflineData open(java.lang.String name, int dbCreator, int dbType, boolean createIfNecessary) throws JdbcMeException
dbName
- The name of the offline database.dbCreator
- The unique offline database creator identifier.dbType
- The unique offline database type identifier.createIfNecessary
- Create the database if one has not already been created.JdbcMeException
- If an error occurs.public abstract byte[] getRecord(int index) throws JdbcMeException
index
- The record to return. The first record is record 0.
The last record is this.size()-1;JdbcMeException
- If an error occurs.public abstract int size() throws JdbcMeException
JdbcMeException
- If an error occurs.public abstract void addRecord(byte[] rec, int offset, int length) throws JdbcMeException
rec
- The byte data.offset
- The offset into the data.length
- The length of the data.JdbcMeException
- If an error occurs.public abstract void setRecord(int index, byte[] rec, int offset, int length) throws JdbcMeException
index
- The record to set. The first record is record 0. The last record is this.size()-1;rec
- The byte data.offset
- The offset into the data.length
- The length of the data.JdbcMeException
- If an error occurs.public abstract void deleteRecord(int index) throws JdbcMeException
index
- The record to delete. The first record is record 0. The last record is this.size()-1;JdbcMeException
- If an error occurs.public abstract void close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |