public class DBAction extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DBAction.UnmodifiableStatusException |
Constructor and Description |
---|
DBAction() |
Modifier and Type | Method and Description |
---|---|
static void |
AdjustSequences() |
static XFTItem |
CheckMetaData(XFTItem item,
UserI user,
boolean quarantine) |
static void |
CleanDeleteItem(XFTItem item,
UserI user,
EventMetaI c) |
static Long |
CountInstancesOfFieldValues(String tableName,
String db,
CriteriaCollection al) |
static void |
DeleteItem(XFTItem item,
UserI user,
EventMetaI c) |
static void |
executeCache(DBItemCache cache,
UserI user,
String db,
String logFileName) |
static String |
getSequenceName(GenericWrapperElement e) |
static String |
getSequenceName(String table,
String key,
String dbName) |
static XFTItem |
InsertItem(XFTItem item,
String login,
DBItemCache cache,
boolean allowInvalidValues) |
static void |
InsertMetaDatas() |
static void |
InsertMetaDatas(String elementName) |
static boolean |
IsNewValue(String type,
String oldValue,
String newValue) |
static void |
PerformUpdateTriggers(DBItemCache cache,
String userName,
Integer xdat_user_id,
boolean asynchronous) |
static void |
RemoveItemReference(XFTItem item,
String xmlPath,
XFTItem toRemove,
UserI user,
EventMetaI c) |
static XFTItem |
SelectItemByID(String query,
String functionName,
GenericWrapperElement element,
UserI user,
boolean allowMultiples) |
static XFTItem |
SelectItemByIDs(GenericWrapperElement element,
Object[] ids,
UserI user,
boolean allowMultiples,
boolean preventLoop) |
static void |
StoreHistoryItem(XFTItem oldI,
UserI user,
DBItemCache cache,
Date previousChangeDate) |
static DBItemCache |
StoreItem(XFTItem item,
UserI user,
boolean checkForDuplicates,
boolean quarantine,
boolean overrideQuarantine,
boolean allowItemOverwrite,
SecurityManagerI securityManager,
DBItemCache cache)
This method is used to insert/update an item into the database.
|
static boolean |
StoreItem(XFTItem item,
UserI user,
boolean checkForDuplicates,
boolean quarantine,
boolean overrideQuarantine,
boolean allowItemOverwrite,
SecurityManagerI securityManager,
EventMetaI c)
This method is used to insert/update an item into the database.
|
static String |
ValueParser(Object o,
GenericWrapperField field,
boolean allowInvalidValues)
Formats the object to a string for SQL interaction based on the XMLType of the field.
|
static String |
ValueParser(Object o,
String type,
boolean allowInvalidValues)
Formats the object to a string for SQL interaction based on the submitted type.
|
public static boolean StoreItem(XFTItem item, UserI user, boolean checkForDuplicates, boolean quarantine, boolean overrideQuarantine, boolean allowItemOverwrite, SecurityManagerI securityManager, EventMetaI c) throws ElementNotFoundException, XFTInitException, FieldNotFoundException, SQLException, Exception
item
- ElementNotFoundException
XFTInitException
FieldNotFoundException
SQLException
Exception
public static void executeCache(DBItemCache cache, UserI user, String db, String logFileName) throws Exception
Exception
public static DBItemCache StoreItem(XFTItem item, UserI user, boolean checkForDuplicates, boolean quarantine, boolean overrideQuarantine, boolean allowItemOverwrite, SecurityManagerI securityManager, DBItemCache cache) throws ElementNotFoundException, XFTInitException, FieldNotFoundException, SQLException, Exception
item
- ElementNotFoundException
XFTInitException
FieldNotFoundException
SQLException
Exception
public static XFTItem InsertItem(XFTItem item, String login, DBItemCache cache, boolean allowInvalidValues) throws ElementNotFoundException, XFTInitException, FieldNotFoundException, Exception
item
- ElementNotFoundException
XFTInitException
FieldNotFoundException
Exception
public static String getSequenceName(GenericWrapperElement e)
public static void StoreHistoryItem(XFTItem oldI, UserI user, DBItemCache cache, Date previousChangeDate) throws ElementNotFoundException, Exception
ElementNotFoundException
Exception
public static String ValueParser(Object o, GenericWrapperField field, boolean allowInvalidValues) throws XFTInitException, InvalidValueException
o
- field
- XFTInitException
InvalidValueException
public static String ValueParser(Object o, String type, boolean allowInvalidValues) throws InvalidValueException
o
- type
- InvalidValueException
public static void RemoveItemReference(XFTItem item, String xmlPath, XFTItem toRemove, UserI user, EventMetaI c) throws SQLException, Exception
item
- toRemove
- user
- SQLException
Exception
public static void DeleteItem(XFTItem item, UserI user, EventMetaI c) throws SQLException, Exception
SQLException
Exception
public static void CleanDeleteItem(XFTItem item, UserI user, EventMetaI c) throws SQLException, Exception
SQLException
Exception
public static void InsertMetaDatas()
public static void InsertMetaDatas(String elementName)
public static void AdjustSequences()
public static Long CountInstancesOfFieldValues(String tableName, String db, CriteriaCollection al) throws Exception
Exception
public static XFTItem SelectItemByID(String query, String functionName, GenericWrapperElement element, UserI user, boolean allowMultiples) throws Exception
Exception
public static XFTItem SelectItemByIDs(GenericWrapperElement element, Object[] ids, UserI user, boolean allowMultiples, boolean preventLoop) throws Exception
Exception
public static void PerformUpdateTriggers(DBItemCache cache, String userName, Integer xdat_user_id, boolean asynchronous)
Copyright © 2015 Neuroinformatics Research Group. All rights reserved.