|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.cbse.jeasy.JEObject
com.cbse.jeasy.JEStore
public class JEStore
An store is like a table where each row is an JEMessage.
You can read and write rows in stores by using a unique key, an index or none. The store and its rows are stored in a file defined by url. Write means save the message and its components in the store.
Read will fill the message from the store. Often a message is the serialisation of a form. Then it is very easy to store all datafields of this form in a store.
| Properties | ||
|---|---|---|
| name | values | comment |
| id | * | Id of the object. Let it begin with ST_ | url | * | The url or filename where the store is hold | message | * | The id of the JEMessage | key |   | This entry has to be unique for each message. So each write will overwrite a complete message with the same key. | JEObject |   | The key is an entry of a JEObject for example an JEDatafield. | mode | READONLY | When set to READONLY the entrys of this store can`t be changed. |
* = property you have to set; bold = default value
| Field Summary | |
|---|---|
static int |
INSIDE
Specifies that brackets should not be set. |
static int |
ONLY_FILLED
Specifies that empty elements should not be get. |
| Fields inherited from class com.cbse.jeasy.JEObject |
|---|
DEVELOPPING, INPUT_ERROR_DATE, INPUT_ERROR_LENGTH, INPUT_ERROR_MANDATORY, INPUT_ERROR_PARSE, INPUT_ERROR_RANGE, INPUT_ERROR_TIME, INPUT_ERRORS, NO_INPUT_ERROR, RUNNING |
| Constructor Summary | |
|---|---|
JEStore()
|
|
JEStore(java.lang.String s)
Reads the properties from a string. |
|
| Method Summary | |
|---|---|
void |
closeStore()
Close the file. |
int |
deleteStore()
Deletes the message in the store. |
int |
deleteStore(int number)
It will delete the entry of this number in the url. |
void |
disableKey()
Read and Write will not use the key definied in the store. |
void |
enableKey()
Read and Write will use the key definied in the store. |
int |
getLastRead()
Gets the number of the last read entry. |
int |
openStore()
Opens the file defined by url. |
java.lang.String |
readStore()
Reads the message in the store. |
java.lang.String |
readStore(int number)
Looks for the section in the file. |
java.lang.String |
readStoreLast()
Reads the last message in the store. |
java.lang.String |
readStoreNext()
Reads the next message in the store. |
java.lang.String |
readStorePrevious()
Reads the previous message in the store. |
java.lang.String |
searchStore()
It will fill the message defined in store and searches matching entrys in the url. |
java.lang.String |
searchStoreNext()
It will fill the message defined in store and searches matching entrys in the url. |
void |
setKey(java.lang.String k)
Sets the unique key. |
void |
setUrl(java.lang.String u)
Sets the url. |
int |
updateStore()
It will fill the message defined in store and updates it in the url. |
int |
writeStore()
It will fill the message defined in store and write it to the url. |
| Methods inherited from class com.cbse.jeasy.JEObject |
|---|
backupEntry, clear, deserializeValue, getApplet, getApplLocale, getCenter, getComponent, getEast, getElementAt, getElementSize, getId, getJCallBack, getJClass, getLabel, getMode, getName, getNorth, getObjLocale, getParentId, getPreview, getProjectDirectory, getProperty, getRegisterText, getSouth, getStarted, getTitle, getType, getWest, getXMLtag, isEditable, isEnabled, isEnterprise, isProfessional, isStandard, isVisible, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEaddTab, removeProperties, removeProperty, restoreEntry, serializeValue, setApplet, setApplLocale, setEditable, setEditable, setEnabled, setEnabled, setFocus, setJCallBack, setMarkable, setMarkable, setMode, setObjLocale, setParentId, setPreview, setProjectDirectory, setProperty, setStarted, setVisible, setVisible, start, wasEntryChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INSIDE
public static final int ONLY_FILLED
| Constructor Detail |
|---|
public JEStore(java.lang.String s)
s - contains properties and valuesJE#PropertyStringpublic JEStore()
| Method Detail |
|---|
public int getLastRead()
public void setKey(java.lang.String k)
public void enableKey()
public void disableKey()
public void setUrl(java.lang.String u)
public int openStore()
throws java.io.IOException
java.io.IOException - when opening is not possiblepublic void closeStore()
public java.lang.String readStore()
throws java.io.IOException
If a key is defined, it will use this key to find the exact entry
java.io.IOException
public java.lang.String readStoreNext()
throws java.io.IOException
java.io.IOException
public java.lang.String readStorePrevious()
throws java.io.IOException
java.io.IOException
public java.lang.String readStoreLast()
throws java.io.IOException
java.io.IOException
public java.lang.String readStore(int number)
throws java.io.IOException
java.io.IOException - when reading in file is not possible
public int writeStore()
throws java.io.IOException
java.io.IOException
public int updateStore()
throws java.io.IOException
java.io.IOException
public java.lang.String searchStore()
throws java.io.IOException
java.io.IOException
public java.lang.String searchStoreNext()
throws java.io.IOException
java.io.IOException
public int deleteStore()
throws java.io.IOException
If a key is defined, it will use this key to find the exact entry
java.io.IOException
public int deleteStore(int number)
throws java.io.IOException
java.io.IOException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||