public final class SessionWrapper extends Object implements Session
| Modifier | Constructor and Description |
|---|---|
protected |
SessionWrapper(Pipeline pipeline,
APipelineFactory<?> factory,
PipelineLogger pipelineLogger,
SessionInfo info) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
delete(Object entity)
Deletes the provided Object.
|
void |
deleteAll(Collection<? extends Object> entities)
Deletes all provided values of Collection entities.
|
protected void |
finalize() |
QueryBuilder |
getQueryBuilder()
Provides the configured
QueryBuilder for the use in custom queries |
boolean |
isConnected()
Provides information of the connection-status.
|
<T,ID extends Serializable> |
load(Class<T> type,
ID id)
Loads the Object of Class matching the provided id.
|
<T,ID extends Serializable> |
load(Class<T> type,
ID id,
Integer depth)
Loads the Object of Class matching the provided id.
|
<T> T |
load(IFilter filter)
Loads the first Object defined through the
IFilter Object. |
<T> Collection<T> |
loadAll(Class<T> type)
Loads all Objects of Class.
|
<T,ID extends Serializable> |
loadAll(Class<T> type,
ID id)
Loads all Objects of Class matching the provided id.
|
<T,ID extends Serializable> |
loadAll(Class<T> type,
ID id,
Integer depth)
Loads all Objects of Class matching the provided id.
|
<T> Collection<T> |
loadAll(Class<T> type,
Integer depth)
Loads all Objects of Class.
|
<T> Collection<T> |
loadAll(IFilter filter)
Loads all Objects defined through the
IFilter Object. |
<T> Collection<T> |
loadAllLazy(Class<T> type)
Lazy-Loads all Objects of Class.
|
<T,ID extends Serializable> |
loadAllLazy(Class<T> type,
ID id)
Lazy-Loads all Objects of Class matching the provided id.
|
<T,ID extends Serializable> |
loadLazy(Class<T> type,
ID id)
Lazy-Loads the Object of Class matching the provided id.
|
void |
reload(Object entity)
Reloads the Values and Relations of entity.
|
void |
reload(Object entity,
Integer depth)
Reloads the Values and Relations of entity.
|
void |
reloadAll(Collection<? extends Object> entities)
Reloads the Values and Relations of Collection entities.
|
void |
reloadAll(Collection<? extends Object> entities,
Integer depth)
Reloads the Values and Relations of Collection entities.
|
void |
resolveAllLazyLoaded(Collection<? extends Object> entities)
Loads all Relations provided by values of Collection entities.
|
void |
resolveAllLazyLoaded(Collection<? extends Object> entities,
Integer depth)
Loads all Relations provided by values of Collection entities.
|
void |
resolveLazyLoaded(Object entity)
Loads all Relations provided by entity.
|
void |
resolveLazyLoaded(Object entity,
Integer depth)
Loads all Relations provided by entity.
|
void |
save(Object entity)
Saves the provided Object.
|
void |
save(Object entity,
Integer depth)
Saves the provided Object.
|
void |
saveAll(Collection<? extends Object> entities)
Saves all provided values of Collection entities.
|
void |
saveAll(Collection<? extends Object> entities,
Integer depth)
Saves the provided values of Collection entities.
|
void |
saveAllLazy(Collection<? extends Object> entities)
Saves the provided values of Collection entities without saving any
Relations.
|
void |
saveLazy(Object entity)
Saves the provided Object without any Relations.
|
void |
unload(Object entity)
Unloades the provided Object.
|
void |
unloadAll(Collection<? extends Object> entities)
Unloades all provided values of Collection entities.
|
protected SessionWrapper(Pipeline pipeline, APipelineFactory<?> factory, PipelineLogger pipelineLogger, SessionInfo info)
protected void finalize()
throws Throwable
public void close()
throws Exception
close in interface AutoCloseableExceptionpublic boolean isConnected()
SessionisConnected in interface Sessionpublic <T,ID extends Serializable> T load(Class<T> type, ID id)
Sessionnull in
case no Object could be loaded.load in interface SessionT - Model-Class provided through the ConfigID - Serializable Objecttype - requested Typeid - requested entity-idpublic <T,ID extends Serializable> T load(Class<T> type, ID id, Integer depth)
Sessionnull in
case no Object could be loaded.
Depth defines how often the requested Objects Relations will be loaded
recursively. 0 will load the Object without any Relations
(LAZY).
load in interface SessionT - Model-Class provided through the ConfigID - Serializable Objecttype - requested Typeid - requested entity-iddepth - requested load depthpublic <T,ID extends Serializable> T loadLazy(Class<T> type, ID id)
Sessionnull in case no Object could be loaded.loadLazy in interface SessionT - Model-Class provided through the ConfigID - Serializable Objecttype - requested Typeid - requested entity-idSession.load(Class, Serializable, Integer)public <T> T load(IFilter filter)
SessionIFilter Object. Returns
null in case the Filter had no loadedable results.
In case of use it is recommended to build the Filter with the
QueryBuilder acquirable through Session.getQueryBuilder().
public <T,ID extends Serializable> Collection<T> loadAll(Class<T> type, ID id)
SessionloadAll in interface SessionT - Model-Class provided through the ConfigID - Serializable Objecttype - requested Typeid - requested entity-idpublic <T,ID extends Serializable> Collection<T> loadAll(Class<T> type, ID id, Integer depth)
Session
Depth defines how often the requested Objects Relations will be loaded
recursively. 0 will load the Object without any Relations
(LAZY).
loadAll in interface SessionT - Model-Class provided through the ConfigID - Serializable Objecttype - requested Typeid - requested entity-iddepth - requested load depthpublic <T,ID extends Serializable> Collection<T> loadAllLazy(Class<T> type, ID id)
SessionloadAllLazy in interface SessionT - Model-Class provided through the ConfigID - Serializable Objecttype - requested Typeid - requested entity-idSession.loadAll(Class, Serializable, Integer)public <T> Collection<T> loadAll(Class<T> type)
Sessionpublic <T> Collection<T> loadAll(Class<T> type, Integer depth)
Session
Depth defines how often the requested Objects Relations will be loaded
recursively. 0 will load the Object without any Relations
(LAZY).
public <T> Collection<T> loadAllLazy(Class<T> type)
SessionloadAllLazy in interface SessionT - Model-Class provided through the Configtype - requested TypeSession.loadAll(Class, Integer)public <T> Collection<T> loadAll(IFilter filter)
SessionIFilter Object. Returns an
empty Collection in case no Objects could be loaded.
In case of use it is recommended to build the Filter with the
QueryBuilder acquirable through Session.getQueryBuilder().
public void resolveLazyLoaded(Object entity)
SessionresolveLazyLoaded in interface Sessionentity - Object of Model-Class provided through the Configpublic void resolveLazyLoaded(Object entity, Integer depth)
Session
Depth defines how often the requested Objects Relations will be loaded
recursively. 0 will load the Object without any Relations
(LAZY).
resolveLazyLoaded in interface Sessionentity - Object of Model-Class provided through the Configdepth - requested load depthpublic void resolveAllLazyLoaded(Collection<? extends Object> entities)
SessionresolveAllLazyLoaded in interface Sessionentities - Collection with Objects of Model-Classes provided through the
Configpublic void resolveAllLazyLoaded(Collection<? extends Object> entities, Integer depth)
Session
Depth defines how often the requested Objects Relations will be loaded
recursively. 0 will load the Object without any Relations
(LAZY).
resolveAllLazyLoaded in interface Sessionentities - Collection with Objects of Model-Classes provided through the
Configdepth - requested load depthpublic void reload(Object entity)
Sessionpublic void reload(Object entity, Integer depth)
Session
Depth defines how often the requested Objects Relations will be loaded
recursively. 0 will only reload the Values and skip reloading
any Relations.
public void reloadAll(Collection<? extends Object> entities)
Sessionpublic void reloadAll(Collection<? extends Object> entities, Integer depth)
Session
Depth defines how often the requested Objects Relations will be loaded
recursively. 0 will only reload the Values and skip reloading
any Relations.
public void save(Object entity)
Sessionpublic void save(Object entity, Integer depth)
Session
Depth defines how many of the Object's Relations will be saved recursively.
0 will save the Object without saving any Relations.
public void saveLazy(Object entity)
SessionsaveLazy in interface Sessionentity - Object of Model-Class provided through the ConfigSession.save(Object, Integer)public void saveAll(Collection<? extends Object> entities)
Sessionpublic void saveAll(Collection<? extends Object> entities, Integer depth)
Session
Depth defines how many of the Object's Relations will be saved recursively.
0 will save the Object without saving any Relations.
public void saveAllLazy(Collection<? extends Object> entities)
SessionsaveAllLazy in interface Sessionentities - Collection of Objects of Model-Classes provided through the
ConfigSession.saveAll(Collection, Integer)public void delete(Object entity)
Sessionpublic void deleteAll(Collection<? extends Object> entities)
Sessionpublic void unload(Object entity)
Session(Removes the provided Object and all Relations from the Buffer)
public void unloadAll(Collection<? extends Object> entities)
Session(Removes all provided values of Collection entities and all fo their Relations from the Buffer)
public QueryBuilder getQueryBuilder()
SessionQueryBuilder for the use in custom queriesgetQueryBuilder in interface SessionQueryBuilder instanceCopyright © 2020–2022 RunedUniverse. All rights reserved.