public class BOLoaderWrapper extends java.lang.Object implements BOLoaderI
BOQueryLoaderI.InternalHelper| Constructor and Description |
|---|
BOLoaderWrapper(BOLoaderI _realBOLoader) |
| Modifier and Type | Method and Description |
|---|---|
BO |
coerceBOLoader(BO bo) |
BO[] |
coerceBOLoader(BO[] bos) |
static BO |
coerceBOLoader(BO bo,
BOLoaderI loaderToSet)
Sets the BOLoader of the given Business Object (BO) to the specified BOLoader,
provided the BO does not already have the specified BOLoader or one of its
descendants set as the BOLoader.
|
static BO |
coerceBOLoader(BO bo,
BOLoaderI loaderToSet,
boolean cascade) |
java.util.List |
coerceBOLoader(java.util.List bos) |
void |
drain()
If this BOLoader has a cache, we request it to empty it.
|
void |
execute(BatchedBackendRequestI[] srs) |
boolean |
exists(java.lang.Long id)
wrapper for exists(id, null).
|
boolean |
exists(java.lang.Long id,
java.lang.Class<? extends BOI> classtip)
Returns true if a BO with the given id exists.
|
BO |
frapFromCache(BO bo)
Put a BO instance to further use in this BOLoader, cloning it in case it's unknown,
giving back a cached instance in case it's cached,
in any way returning an instance without making further reloads (which would make
the effort of caching it useless).
|
byte[] |
getBLOB(java.lang.Long id)
get the BLOB belonging to BO[id].
|
long |
getBLOB(java.lang.Long id,
java.io.DataOutput os)
Writes the BLOB belonging to BO[id] to the passed DataOutput.
|
long |
getBLOB(java.lang.Long id,
java.io.DataOutput os,
boolean closeOS)
Writes the BLOB belonging to BO[id] to the passed DataOutput.
|
long |
getBLOB(java.lang.Long id,
java.io.DataOutput os,
boolean closeOS,
java.lang.Long backuppingBPId)
Writes the BLOB belonging to BO[id] to the passed DataOutput.
|
byte[] |
getBLOB(java.lang.Long id,
java.lang.Long backuppingBPId)
get the BLOB belonging to BO[id].
|
long |
getBLOB(java.lang.Long id,
java.io.OutputStream os)
Writes the BLOB belonging to BO[id] to the passed OutputStream.
|
long |
getBLOB(java.lang.Long id,
java.io.OutputStream os,
boolean closeOS)
Writes the BLOB belonging to BO[id] to the passed OutputStream.
|
long |
getBLOB(java.lang.Long id,
java.io.OutputStream os,
boolean closeOS,
java.lang.Long backuppingBPId)
Writes the BLOB belonging to BO[id] to the passed OutputStream.
|
VFile |
getBLOBInfo(java.lang.Long id)
gathers information about the BLOB belonging to BO[i].
|
VFile |
getBLOBInfo(java.lang.Long id,
java.lang.Long backuppingBPId)
gathers information about the BLOB belonging to BO[i].
|
BO |
getBO(java.lang.Long id)
wrapper for getBO(id, null).
|
BO |
getBO(java.lang.Long id,
java.lang.Class<? extends BOI> classtip)
Returns the BO with the given id.
|
BO[] |
getBOs(long[] ids)
wrapper for getBOs(ids, null)
|
BO[] |
getBOs(java.lang.Long[] ids)
wrapper for getBOs(ids, null)
|
BO[] |
getBOs(long[] ids,
java.lang.Class<? extends BOI> classtip)
returns the BOs with the given ids.
|
BO[] |
getBOs(java.lang.Long[] ids,
java.lang.Class<? extends BOI> classtip)
returns the BOs with the given ids.
|
BOT |
getBOT(java.lang.Class<? extends BOI> clazz) |
BO |
getBOUncached(java.lang.Long id) |
BO |
getBOUncached(java.lang.Long id,
java.lang.Class<? extends BOI> classtip)
Loads and returns the BO with this Id with a non caching BOLoader.
|
CryptoHandlerI |
getCryptoHandler()
get a reference to the CryptoHandler used.
|
DBManEventProviderI |
getEventProvider()
Returns the DBManEventProviderI of this BOLoader, if any.
|
FeatureManagerI |
getFeatureManager() |
FileVaultI |
getFileVault() |
java.lang.Long |
getNextId()
get a unique Long id from the backend.
|
BOLoaderI |
getParentLoader()
returns the BOLoader which this BOLoader uses to load its objects.
|
BO[] |
getRelationBOs(java.lang.Long id,
java.lang.Class<? extends BOI> classtip,
java.lang.String attributeName)
this method is used by the lazy loading map/list implementation to load related
objects when needed.
|
BOLoaderI |
getRootLoader()
Returns the root BOLoader of this BOLoader or this if there is no more parent loader.
|
javax.swing.JRootPane |
getRootPaneToLockOnConnectionInterrupt() |
SchemaI |
getSchema()
gets a reference to the schema which is used by this BOLoader.
|
boolean |
hasBLOB(java.lang.Long id) |
boolean |
hasBLOB(java.lang.Long id,
java.lang.Long backuppingBPId) |
java.util.BitSet |
haveBLOB(long[] ids) |
boolean |
isCaching()
If true, then this BOLoaderI uses an internal cache, holding all BOs hat were loaded or frapped into it.
|
java.lang.Boolean |
isLoggedIn(Benutzer _ben)
Tells if the given Benutzer is currently logged in.
|
boolean |
isLoggedInNN(Benutzer _ben)
Tells if the given Benutzer is currently logged in.
|
boolean |
isRecording()
Returns true if this BOLoaderI records changes.
|
BatchedBackendRequestI |
prepareQuery(java.lang.String s) |
BatchedBackendRequestI |
prepareQuery(java.lang.String s,
java.lang.Object[] o) |
de.ipcon.db.core.QueryResultsI |
query(BOQuery _eq)
query objects in an iterative way to hide backend processing time.
|
de.ipcon.db.core.QueryResultsI |
query(java.lang.String t)
wrapper for query(t, Object[0])
|
de.ipcon.db.core.QueryResultsI |
query(java.lang.String t,
java.lang.Object[] pvals)
query objects in an iterative way to hide backend processing time.
|
java.util.List |
queryBO(BOQuery _eq)
query objects and block until all objects are transferred, returns Objects as a List.
|
java.util.List |
queryBO(java.lang.String t)
wrapper for queryBO(String, Object[0])
|
java.util.List |
queryBO(java.lang.String t,
java.lang.Object[] pvals)
query objects and block until all objects are transferred, returns Objects as a List.
|
de.ipcon.db.core.QueryResultsI |
queryRelation(long id,
java.lang.Class<? extends BOI> classtip,
java.lang.String attributeName)
does the same as @see #getRelationBOs, but returns a QueryResultsI like @see #query.
|
void |
setRootPaneToLockOnConnectionInterrupt(javax.swing.JRootPane $5) |
java.lang.Long |
testAuth(Anmeldung a)
Tests wether given credentials can be verified.
|
boolean |
testAuth(de.ipcon.db.core.PasswortUeberpruefung a)
Tests wether given credentials can be verified.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfrapBOArrayFromCache, frapBOIArrayFromCache, frapBOsFromCache, frapFromCache, isAncestorOf, isRootLoader, isServerSide, isTesting, prepareQueryhaveBLOB, haveBLOBgetBOByAttr, getBOByAttr, getBOByAttr, getBOByAttrs, getBOByAttrs, getBOByAttrs, getBOsByAttrs, getBOsByAttrs, getBOsByAttrs, getBOsByAttrs, getOneBOByAttr, getUniqueBOByAttrpublic BOLoaderWrapper(BOLoaderI _realBOLoader)
public static BO coerceBOLoader(BO bo, BOLoaderI loaderToSet)
bo - The Business Object whose BOLoader should be set.loaderToSet - The BOLoaderI to set.cascade - If true, uses BO.setBOLoader(BOLoaderI) to also set the
BOLoader for all possible n-1 relations of the BO. If false,
sets the BOLoader only for the given BO and none other.public java.util.List coerceBOLoader(java.util.List bos)
public SchemaI getSchema()
BOLoaderIgetSchema in interface BOLoaderIgetSchema in interface SchemaProviderIpublic CryptoHandlerI getCryptoHandler()
BOLoaderIgetCryptoHandler in interface BOLoaderIpublic FileVaultI getFileVault()
getFileVault in interface BOLoaderIpublic FeatureManagerI getFeatureManager()
getFeatureManager in interface BOLoaderIpublic boolean exists(java.lang.Long id)
BOLoaderIexists in interface BOLoaderIBOLoaderI.exists(Long, Class)public boolean exists(java.lang.Long id,
java.lang.Class<? extends BOI> classtip)
BOLoaderIpublic BO getBO(java.lang.Long id)
BOLoaderIgetBO in interface BOLoaderIBOLoaderI.getBO(Long, Class)public BO getBO(java.lang.Long id, java.lang.Class<? extends BOI> classtip)
BOLoaderIpublic BO getBOUncached(java.lang.Long id)
getBOUncached in interface BOLoaderIpublic BO getBOUncached(java.lang.Long id, java.lang.Class<? extends BOI> classtip)
BOLoaderIBOLoaderI.isCaching() BOLoaderI instances.getBOUncached in interface BOLoaderIpublic BO[] getBOs(java.lang.Long[] ids)
BOLoaderIgetBOs in interface BOLoaderIBOLoaderI.getBOs(Long[],Class)public BO[] getBOs(java.lang.Long[] ids, java.lang.Class<? extends BOI> classtip)
BOLoaderIgetBOs in interface BOLoaderIids - array of Longs with ids for the requested BOs.classtip - guess for classes which the BOs belong to, may be null.Transactionpublic BO[] getBOs(long[] ids)
BOLoaderIgetBOs in interface BOLoaderIBOLoaderI.getBOs(long[],Class)public BO[] getBOs(long[] ids, java.lang.Class<? extends BOI> classtip)
BOLoaderIgetBOs in interface BOLoaderIids - array of longs with ids for the requested BOs.classtip - guess for classes which the BOs belong to, may be null.Transactionpublic BO[] getRelationBOs(java.lang.Long id, java.lang.Class<? extends BOI> classtip, java.lang.String attributeName)
BOLoaderIgetRelationBOs in interface BOLoaderIid - id of the BO which the requested BOs has a relation toclasstip - common superclass of the requested bosattributeName - name of the relation from the BO to the requested onespublic de.ipcon.db.core.QueryResultsI query(java.lang.String t,
java.lang.Object[] pvals)
BOLoaderIThis sample shows how to query bla BOs though this method
do
it = bol.query("bla from pack.bo bla where not Ldel limit 2")
loop while it.hasNext()
bo = BO it.getCurrentObject() -- hopefully this IS a BO, depends on the query.
-- do whatever you have to do with the bo
finally
it.close()
end
The finally clause is very important to free up database and backend resources,
so please don't forget this step!query in interface BOLoaderIquery in interface BOQueryLoaderIquery in interface GrooqlBOLoaderIt - the query to fetch, written in OQLpvals - an object array corresponding with $n entries, $1 is pvals[0] and so forth. Must not be null.public de.ipcon.db.core.QueryResultsI queryRelation(long id,
java.lang.Class<? extends BOI> classtip,
java.lang.String attributeName)
BOLoaderIqueryRelation in interface BOLoaderIpublic de.ipcon.db.core.QueryResultsI query(java.lang.String t)
BOLoaderIquery in interface BOLoaderIquery in interface BOQueryLoaderIBOLoaderI.query(String, Object[])public de.ipcon.db.core.QueryResultsI query(BOQuery _eq)
BOLoaderIpublic java.util.List queryBO(java.lang.String t,
java.lang.Object[] pvals)
BOLoaderIqueryBO in interface BOLoaderIqueryBO in interface BOQueryLoaderIqueryBO in interface GrooqlBOLoaderIt - the query to fetch, written in OQLpvals - an object array corresponding with $n entries, $1 is pvals[0] and so forth. Must not be null.BOLoaderI.query(String, Object[])public java.util.List queryBO(java.lang.String t)
BOLoaderIqueryBO in interface BOLoaderIqueryBO in interface BOQueryLoaderIBOLoaderI.queryBO(String, Object[])public java.util.List queryBO(BOQuery _eq)
BOLoaderIpublic byte[] getBLOB(java.lang.Long id)
BLOBLoaderIgetBLOB in interface BLOBLoaderIid - the id of the BO the BLOB belongs to.public byte[] getBLOB(java.lang.Long id,
java.lang.Long backuppingBPId)
BLOBLoaderIgetBLOB in interface BLOBLoaderIid - the id of the BO the BLOB belongs to.backuppingBPId - instead of the current BLOB get and stream
the backup-BLOB that was stored because of this BP-Id from the backup-dirpublic long getBLOB(java.lang.Long id,
java.io.OutputStream os)
BLOBLoaderIgetBLOB in interface BLOBLoaderIid - the id of the BO the BLOB belongs toos - the OutputStream to write the BLOB-bytes topublic long getBLOB(java.lang.Long id,
java.io.OutputStream os,
boolean closeOS)
BLOBLoaderIgetBLOB in interface BLOBLoaderIid - the id of the BO the BLOB belongs toos - the OutputStream to write the BLOB-bytes tocloseOS - a boolean designating if the OutputStream shall be closed afterwards or not.public long getBLOB(java.lang.Long id,
java.io.OutputStream os,
boolean closeOS,
java.lang.Long backuppingBPId)
BLOBLoaderIgetBLOB in interface BLOBLoaderIid - the id of the BO the BLOB belongs toos - the OutputStream to write the BLOB-bytes tocloseOS - a boolean designating if the OutputStream shall be closed afterwards or not.backuppingBPId - instead of the current BLOB get and stream
the backup-BLOB that was stored because of this BP-Id from the backup-dirpublic long getBLOB(java.lang.Long id,
java.io.DataOutput os)
BLOBLoaderIgetBLOB in interface BLOBLoaderIid - the id of the BO the BLOB belongs toos - the DataOutput to write the BLOB-bytes topublic long getBLOB(java.lang.Long id,
java.io.DataOutput os,
boolean closeOS)
BLOBLoaderIgetBLOB in interface BLOBLoaderIid - the id of the BO the BLOB belongs toos - the DataOutput to write the BLOB-bytes tocloseOS - a boolean designating if the DataOutput shall be closed afterwards or not.public long getBLOB(java.lang.Long id,
java.io.DataOutput os,
boolean closeOS,
java.lang.Long backuppingBPId)
BLOBLoaderIgetBLOB in interface BLOBLoaderIid - the id of the BO the BLOB belongs toos - the DataOutput to write the BLOB-bytes tocloseOS - a boolean designating if the DataOutput shall be closed afterwards or not.backuppingBPId - instead of the current BLOB get and stream
the backup-BLOB that was stored because of this BP-Id from the backup-dirpublic VFile getBLOBInfo(java.lang.Long id)
BLOBLoaderIgetBLOBInfo in interface BLOBLoaderIid - the id of the BO the BLOB-info belongs to.public VFile getBLOBInfo(java.lang.Long id, java.lang.Long backuppingBPId)
BLOBLoaderIgetBLOBInfo in interface BLOBLoaderIid - the id of the BO the BLOB-info belongs to.backuppingBPId - instead of the current BLOB get the VFile for
the backup-BLOB that was stored because of this BP-Id from the backup-dirpublic boolean hasBLOB(java.lang.Long id)
hasBLOB in interface BLOBLoaderIid - the id of the BO the check for existence of a BLOB on the server.public boolean hasBLOB(java.lang.Long id,
java.lang.Long backuppingBPId)
hasBLOB in interface BLOBLoaderIid - the id of the BO the check for existence of a BLOB on the server.backuppingBPId - instead of the current BLOB get the VFile for
the backup-BLOB that was stored because of this BP-Id from
the backup-dirpublic java.util.BitSet haveBLOB(long[] ids)
haveBLOB in interface BLOBLoaderIids - an array of ids of BOs the check for existence of a BLOB on the server.public java.lang.Long getNextId()
BOLoaderIpublic java.lang.Long testAuth(Anmeldung a)
BOLoaderIpublic boolean testAuth(de.ipcon.db.core.PasswortUeberpruefung a)
BOLoaderIpublic BatchedBackendRequestI prepareQuery(java.lang.String s, java.lang.Object[] o)
prepareQuery in interface BOLoaderIpublic BatchedBackendRequestI prepareQuery(java.lang.String s)
prepareQuery in interface BOLoaderIpublic void execute(BatchedBackendRequestI[] srs)
public java.lang.Boolean isLoggedIn(Benutzer _ben)
BOLoaderIisLoggedIn in interface BOLoaderI_ben - the Benutzer for which the logged in state should be checkedpublic boolean isLoggedInNN(Benutzer _ben)
BOLoaderIisLoggedInNN in interface BOLoaderI_ben - the Benutzer for which the logged in state should be checkedpublic void drain()
BOLoaderIBOLoaderI.isCaching() returns false, this is a nop.public boolean isCaching()
BOLoaderIpublic boolean isRecording()
BOLoaderIisRecording in interface BOLoaderIpublic BO frapFromCache(BO bo)
BOLoaderIfrapFromCache in interface BOLoaderIpublic BOLoaderI getParentLoader()
BOLoaderIgetParentLoader in interface BOLoaderIpublic BOLoaderI getRootLoader()
BOLoaderIgetRootLoader in interface BOLoaderIpublic DBManEventProviderI getEventProvider()
BOLoaderIgetEventProvider in interface BOLoaderIpublic javax.swing.JRootPane getRootPaneToLockOnConnectionInterrupt()
public void setRootPaneToLockOnConnectionInterrupt(javax.swing.JRootPane $5)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.