public final class PropertyJDBC extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ITEMPK |
static String |
ITEMTYPEPK |
static String |
LANGPK |
static String |
REAL_PK |
static 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 String |
cutStringToByteLength(String str,
int max)
truncates a string to a certain byte length.
|
static List<Object>[] |
getChangeData(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 List<Object>[] |
getChangeData(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.
|
protected static boolean |
isOracleLobColumn(Connection con,
String tableName,
String columnName,
JDBCValueMappings.ValueWriter writer) |
static void |
preloadLocalizedProperties(Set<PK> langPKs,
Collection<LocalizableItemRemote> _items) |
static EJBPropertyRowCache |
readPropertyRow(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 String REAL_PK
public static final String REAL_TYPEPK
public static final String ITEMPK
public static final String LANGPK
public static final String ITEMTYPEPK
public static String cutStringToByteLength(String str, int max)
max - the allowed max byte lengthpublic static void preloadLocalizedProperties(Set<PK> langPKs, 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 List<Object>[] getChangeData(Connection con, TypeInfoMap infoMap, EJBPropertyRowCache prc, boolean localized) throws 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 connectionSQLExceptionpublic static List<Object>[] getChangeData(TypeInfoMap infoMap, EJBPropertyRowCache prc, boolean localized)
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 dataprotected static boolean isOracleLobColumn(Connection con, String tableName, String columnName, JDBCValueMappings.ValueWriter writer) throws SQLException
SQLExceptionpublic static void removeAllPropertyData(PK itemPK, PK typePK)
itemPK - the item to remove properties fortypePK - used for getting the correct TypeInfoMappublic static EJBPropertyRowCache readPropertyRow(ResultSet rs, PK itemPK, PK itemTypePK, PK langPK, long timestamp, TypeInfoMap infoMap) throws SQLException
SQLExceptionCopyright © 2017 SAP SE. All Rights Reserved.