public abstract class EJBTools
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EMPTY_PK_COLLECTION_STRING |
static java.lang.String |
ITEMCOLLECTION_TYPE_MARKER |
| Constructor and Description |
|---|
EJBTools() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
addPKToPKCollectionString(java.lang.String pkCollectionString,
PK pk) |
static java.lang.Object |
convertEntityFinderResult(java.lang.Object finderResult,
SystemEJB sys)
converts the result of a EJBHome finder method (findXY) from
|
static java.lang.String |
convertFromDatabase(java.lang.String databaseString)
utility function to cope with behaviour of Oracle, with cannot distinguish between null and empty strings
|
static java.lang.String |
convertToDatabase(java.lang.String realString)
utility function to cope with behaviour of Oracle, with cannot distinguish between null and empty strings
|
static ItemPropertyValue |
createItemPropertyValue(ItemRemote item) |
static ItemPropertyValueCollection |
getCollectionFromString(java.lang.String value) |
static PK |
getPK(ItemRemote remote) |
static java.util.List<java.lang.String> |
getPKCollection(java.lang.String pks) |
static java.lang.String |
getPKCollectionString(java.util.Collection items)
Converts a collection of Items to a String with comma-seperated PKs.
|
static java.lang.String |
getPKInLIKEFragment(ItemRemote remote)
Returns a SQL LIKE fragment which should be used to find a single remote object within a pk collection string (@see
#getPKCollectionString(Collection)}.
|
static java.util.List |
instantiateCommaSeparatedPKString(java.lang.String pks)
Creates a Collection of EJBObject from a given String with comma seperated PKs.
Use this method from inside a bean if you want to get a List of existing EJBObjects from a comma seperated PK String. If the String was null, a null is returned
If the String was en empty string, an empty collection is returned
if one of the EJBObjects could not be found, a warning is printed to the System.err stream and the resulting
collection will not contain this EJBObject. |
static java.util.List |
instantiateCommaSeparatedPKString(java.lang.String pks,
boolean ignoreNull)
Creates a Collection of EJBObject from a given String with comma seperated PKs.
Use this method from inside a bean if you want to get a List of existing EJBObjects from a comma seperated PK String. If the String was null, a null is returned or an empty collection if
ignoreNull was set to true . |
static ItemRemote |
instantiateItemPropertyValue(ItemPropertyValue ipv) |
static java.util.Collection |
instantiateItemPropertyValueCollection(java.util.Collection ipvs) |
static ItemRemote |
instantiatePK(PK pk) |
static java.util.List |
instantiatePKCollection(java.util.Collection<PK> pks)
Creates a Collection of EJBObject from a given Collection of EJB PK String.
Use this method from inside a bean if you want to get a List of existing EJBObjects from a given Collection of PK. If the PK-Collection was null, a null is returned
if one of the EJBObjects could not be found, a warning is printed to the System.err stream and the resulting
collection will not contain this EJBObject. |
static void |
performInitialize(java.util.Collection managers,
int todo,
java.util.Map props) |
static void |
performInitialize(ManagerEJB manager,
int todo,
java.util.Map props) |
static void |
removeAllRowsFromTable(java.lang.String tablename) |
static void |
removeBeanCollection(java.util.Collection<? extends ItemRemote> c)
Removes a collection of ItemRemotes.
|
static java.util.List<PK> |
toPKList(java.util.Collection items)
Converts a collection of Items, ItemRemotes or ItemPropertyValues to a Collection of PKs.
|
public static final java.lang.String ITEMCOLLECTION_TYPE_MARKER
public static final java.lang.String EMPTY_PK_COLLECTION_STRING
public static void removeBeanCollection(java.util.Collection<? extends ItemRemote> c)
public static void removeAllRowsFromTable(java.lang.String tablename)
public static final ItemRemote instantiatePK(PK pk)
public static ItemRemote instantiateItemPropertyValue(ItemPropertyValue ipv)
ipv - may be null, will return nullpublic static java.util.Collection instantiateItemPropertyValueCollection(java.util.Collection ipvs)
public static ItemPropertyValue createItemPropertyValue(ItemRemote item)
item - may be null, will return nullpublic static java.util.List instantiatePKCollection(java.util.Collection<PK> pks)
null, a null is returned
public static java.util.List instantiateCommaSeparatedPKString(java.lang.String pks)
null, a null is returned
public static java.util.List instantiateCommaSeparatedPKString(java.lang.String pks,
boolean ignoreNull)
null, a null is returned or an empty collection if
ignoreNull was set to true .
public static final PK getPK(ItemRemote remote)
public static final java.lang.String getPKInLIKEFragment(ItemRemote remote)
public static java.util.List<PK> toPKList(java.util.Collection items)
getPrimaryKey() a EJBSystemException is
thrown.
public static java.lang.String getPKCollectionString(java.util.Collection items)
getPrimaryKey() a EJBSystemException is
thrown.
public static java.lang.String addPKToPKCollectionString(java.lang.String pkCollectionString,
PK pk)
public static java.util.List<java.lang.String> getPKCollection(java.lang.String pks)
public static ItemPropertyValueCollection getCollectionFromString(java.lang.String value)
public static java.lang.String convertToDatabase(java.lang.String realString)
convertFromDatabase(java.lang.String)public static java.lang.String convertFromDatabase(java.lang.String databaseString)
convertToDatabase(java.lang.String)public static final void performInitialize(java.util.Collection managers,
int todo,
java.util.Map props)
public static final void performInitialize(ManagerEJB manager, int todo, java.util.Map props)
public static java.lang.Object convertEntityFinderResult(java.lang.Object finderResult,
SystemEJB sys)
throws YFinderException
finderResult - the finder resultYFinderExceptionCopyright © 2018 SAP SE. All Rights Reserved.