|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectappl.data.LateLoadingProxy
public class LateLoadingProxy
Loads an object on demand with the help of an DataLoader
. The
unload() method unloads a serializable Object
into a temporary folder
on the hard disk. Unloading can be disabled via the
setUnloading(boolean)
method.
DataLoader
,
Serialized FormField Summary | |
---|---|
protected Object |
baseObject
|
protected DataLoader |
dataLoader
|
protected DataLoader |
intialDataLoader
The loader which constructs the object |
protected boolean |
loaded
Object loaded? |
protected Logger |
LOG
|
Constructor Summary | |
---|---|
LateLoadingProxy(DataLoader loader)
Creates a new instance with the specified data loader |
Method Summary | |
---|---|
Object |
getProxiedObject()
returns the baseObject |
protected File |
getUnloadFile()
returns the File, in which the object is/will be unloaded |
boolean |
isLateLoadable()
This class supports late loading, of course. |
boolean |
isLoaded()
returns true, if the baseObject is loaded |
boolean |
isUnloadingEnabled()
|
void |
loadData()
Loads the data into memory (if not already loaded). |
void |
setUnloadDir(String newUnloadDirectory)
|
void |
setUnloading(boolean unloadingEnabled)
Set to false, if you want to disable the unloading in a temporary file |
void |
unloadData()
If no Data is loaded or unloading is disabled this method does nothing, else it saves the Data into a temporary File. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final transient Logger LOG
protected boolean loaded
protected transient DataLoader dataLoader
protected transient DataLoader intialDataLoader
protected Object baseObject
Constructor Detail |
---|
public LateLoadingProxy(DataLoader loader)
loader
- the load method of the DataLoader
is called for
loadingMethod Detail |
---|
protected File getUnloadFile()
public void loadData() throws LoadingException
LoadingException
public void unloadData()
public boolean isLateLoadable()
appl.data.LateLoadable#unloadData()
,
appl.data.LateLoadable#isLateLoadable()
public Object getProxiedObject()
getProxiedObject
in interface DataProxy
DataProxy.getProxiedObject()
public boolean isLoaded()
public void setUnloadDir(String newUnloadDirectory)
public void setUnloading(boolean unloadingEnabled)
public boolean isUnloadingEnabled()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |