public final class PropertyJDBC
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ITEMPK |
static java.lang.String |
ITEMTYPEPK |
static java.lang.String |
LANGPK |
static java.lang.String |
REAL_PK |
static java.lang.String |
REAL_TYPEPK |
| Constructor and Description |
|---|
PropertyJDBC() |
| Modifier and Type | Method and Description |
|---|---|
static EJBPropertyRowCache |
createProperties(TypeInfoMap infoMap,
PK itemPK,
PK typePK,
PK langPK,
long timestamp) |
static java.lang.String |
cutStringToByteLength(java.lang.String str,
int max)
truncates a string to a certain byte length.
|
static java.util.List<java.lang.Object>[] |
getChangeData(java.sql.Connection con,
TypeInfoMap infoMap,
EJBPropertyRowCache prc,
boolean localized)
for a modified property cache this puts together the list of columns, values and value classes.
|
static EJBPropertyRowCache |
getProperties(TypeInfoMap infoMap,
PK itemPK,
PK typePK,
PK langPK,
long timestamp)
reads all unlocalized or localized properties of one language for a specified item in a property cache object.
|
static void |
preloadLocalizedProperties(java.util.Set<PK> langPKs,
java.util.Collection<LocalizableItemRemote> _items) |
static EJBPropertyRowCache |
readPropertyRow(java.sql.ResultSet rs,
PK itemPK,
PK itemTypePK,
PK langPK,
long timestamp,
TypeInfoMap infoMap) |
static void |
removeAllPropertyData(PK itemPK,
PK typePK)
removes all property rows for a item.
|
static void |
updatePropertyTypePKs(TypeInfoMap infoMap,
PK itemPK,
PK newTypePK)
changes all property data rows of one item to the new type pk.
|
static void |
writeProperties(EJBPropertyRowCache prc,
PK itemPK,
PK typePK,
TypeInfoMap infoMap,
boolean localized)
saves all changed properties of one property cache.
|
public static final java.lang.String REAL_PK
public static final java.lang.String REAL_TYPEPK
public static final java.lang.String ITEMPK
public static final java.lang.String LANGPK
public static final java.lang.String ITEMTYPEPK
public static java.lang.String cutStringToByteLength(java.lang.String str,
int max)
max - the allowed max byte lengthpublic static void preloadLocalizedProperties(java.util.Set<PK> langPKs, java.util.Collection<LocalizableItemRemote> _items)
public static EJBPropertyRowCache createProperties(TypeInfoMap infoMap, PK itemPK, PK typePK, PK langPK, long timestamp)
public static EJBPropertyRowCache getProperties(TypeInfoMap infoMap, PK itemPK, PK typePK, PK langPK, long timestamp)
itemPK - the PK of the item these properties belong totypePK - the item type - this is needed to get the correct TypeInfoMaplangPK - the language PK of the properties, or null for unlocalized propertiestimestamp - the property timestamp of the item - the propert cache uses this to check later if it is uptodatepublic static void updatePropertyTypePKs(TypeInfoMap infoMap, PK itemPK, PK newTypePK)
public static void writeProperties(EJBPropertyRowCache prc, PK itemPK, PK typePK, TypeInfoMap infoMap, boolean localized)
prc - the (modified) property cacheinfoMap - provides the correct columns and value classes for these propertiespublic static java.util.List<java.lang.Object>[] getChangeData(java.sql.Connection con,
TypeInfoMap infoMap,
EJBPropertyRowCache prc,
boolean localized)
throws java.sql.SQLException
infoMap - provides column names and value classes for propertiesprc - the modified property cachelocalized - tells if localized or unlocalized properties should be written - used for checking correctness of datacon - the database connectionjava.sql.SQLExceptionpublic static void removeAllPropertyData(PK itemPK, PK typePK)
itemPK - the item to remove properties fortypePK - used for getting the correct TypeInfoMappublic static EJBPropertyRowCache readPropertyRow(java.sql.ResultSet rs, PK itemPK, PK itemTypePK, PK langPK, long timestamp, TypeInfoMap infoMap) throws java.sql.SQLException
java.sql.SQLExceptionCopyright © 2018 SAP SE. All Rights Reserved.