public abstract class EJBTools extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
EMPTY_PK_COLLECTION_STRING |
static String |
ITEMCOLLECTION_TYPE_MARKER |
| Constructor and Description |
|---|
EJBTools() |
| Modifier and Type | Method and Description |
|---|---|
static String |
addPKToPKCollectionString(String pkCollectionString,
PK pk) |
static Object |
convertEntityFinderResult(Object finderResult,
SystemEJB sys)
converts the result of a EJBHome finder method (findXY) from
|
static String |
convertFromDatabase(String databaseString)
utility function to cope with behaviour of Oracle, with cannot distinguish between null and empty strings
|
static String |
convertToDatabase(String realString)
utility function to cope with behaviour of Oracle, with cannot distinguish between null and empty strings
|
static ItemPropertyValue |
createItemPropertyValue(ItemRemote item) |
static PK |
getPK(ItemRemote remote) |
static List<String> |
getPKCollection(String pks) |
static String |
getPKCollectionString(Collection items)
Converts a collection of Items to a String with comma-seperated PKs.
|
static 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 List |
instantiateCommaSeparatedPKString(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 List |
instantiateCommaSeparatedPKString(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 Collection |
instantiateItemPropertyValueCollection(Collection ipvs) |
static ItemRemote |
instantiatePK(PK pk) |
static List |
instantiatePKCollection(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(Collection managers,
int todo,
Map props) |
static void |
performInitialize(ManagerEJB manager,
int todo,
Map props) |
static void |
removeAllRowsFromTable(String tablename) |
static void |
removeBeanCollection(Collection<? extends ItemRemote> c)
Removes a collection of ItemRemotes.
|
static List<PK> |
toPKList(Collection items)
Converts a collection of Items, ItemRemotes or ItemPropertyValues to a Collection of PKs.
|
public static final String ITEMCOLLECTION_TYPE_MARKER
public static final String EMPTY_PK_COLLECTION_STRING
public static void removeBeanCollection(Collection<? extends ItemRemote> c)
public static void removeAllRowsFromTable(String tablename)
public static final ItemRemote instantiatePK(PK pk)
public static ItemRemote instantiateItemPropertyValue(ItemPropertyValue ipv)
ipv - may be null, will return nullpublic static Collection instantiateItemPropertyValueCollection(Collection ipvs)
public static ItemPropertyValue createItemPropertyValue(ItemRemote item)
item - may be null, will return nullpublic static List instantiatePKCollection(Collection<PK> pks)
null, a null is returned
public static List instantiateCommaSeparatedPKString(String pks)
null, a null is returned
public static List instantiateCommaSeparatedPKString(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 String getPKInLIKEFragment(ItemRemote remote)
public static List<PK> toPKList(Collection items)
getPrimaryKey() a EJBSystemException is
thrown.
public static String getPKCollectionString(Collection items)
getPrimaryKey() a EJBSystemException is
thrown.
public static String addPKToPKCollectionString(String pkCollectionString, PK pk)
public static List<String> getPKCollection(String pks)
public static String convertToDatabase(String realString)
convertFromDatabase(java.lang.String)public static String convertFromDatabase(String databaseString)
convertToDatabase(java.lang.String)public static final void performInitialize(Collection managers, int todo, Map props)
public static final void performInitialize(ManagerEJB manager, int todo, Map props)
public static Object convertEntityFinderResult(Object finderResult, SystemEJB sys) throws YFinderException
finderResult - the finder resultYFinderExceptionCopyright © 2017 SAP SE. All Rights Reserved.