com.basecmp.core.services
Class PersistenceMgr

java.lang.Object
  extended bycom.basecmp.core.services.PersistenceMgr

public class PersistenceMgr
extends java.lang.Object

Author:
Wolfgang Schröder

Field Summary
static java.lang.String READ_CONNECTION_BACKOFFICE
           
static java.lang.String READ_CONNECTION_LIVE
           
static java.lang.String WRITE_CONNECTION_BACKOFFICE
           
static java.lang.String WRITE_CONNECTION_LIVE
           
 
Method Summary
static int deleteAllReferences(IPersistentRow theRow, boolean child, boolean live)
          Löscht alle mit dem Row verknüpften Child-oder Parent-Einträge aus ASSET_REF.
static int deleteRow(IPersistentRow theRow, boolean live)
           
static java.util.ArrayList executeQuery(java.lang.String sql)
          Convienience-Method, calls executeQuery(sql, false, 0).
static java.util.ArrayList executeQuery(java.lang.String sql, boolean live)
          Convienience-Method, calls executeQuery(sql, live, 0).
static java.util.ArrayList executeQuery(java.lang.String sql, boolean live, int maxRows)
          Execute an sql-query using the configured jdbc-connections and delivery an the resultset using an arraylist of IPersistentRow-Objects.
static java.util.List executeQuery(java.lang.String sql, boolean live, int maxRows, int offset)
           
static IPersistentRow executeSingleRowQuery(IPersistentRow theRow, java.lang.String cid, boolean live)
           
static IPersistentRow executeSingleRowQuery(java.lang.String sql, boolean live)
          Convienience-Method, calls executeQuery(sql, live, 1) and return the first IPersistentRow directly or null.
static int executeUpdate(java.lang.String sql)
           
static int executeUpdate(java.lang.String sql, boolean live)
           
static boolean expireRow(IPersistentRow theRow, boolean deleteChildReferences, boolean deleteParentReferences)
          Expired den übergebenen Row mit allen Child-und/oder Parent-Referenzen.
static long insertRow(IPersistentRow theRow)
           
static long insertRow(IPersistentRow theRow, boolean live)
           
static boolean launchRow(IPersistentRow theRow)
           
static long writeRow(IPersistentRow theRow)
           
static long writeRow(IPersistentRow theRow, boolean live)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READ_CONNECTION_BACKOFFICE

public static final java.lang.String READ_CONNECTION_BACKOFFICE

READ_CONNECTION_LIVE

public static final java.lang.String READ_CONNECTION_LIVE

WRITE_CONNECTION_BACKOFFICE

public static final java.lang.String WRITE_CONNECTION_BACKOFFICE

WRITE_CONNECTION_LIVE

public static final java.lang.String WRITE_CONNECTION_LIVE
Method Detail

deleteAllReferences

public static int deleteAllReferences(IPersistentRow theRow,
                                      boolean child,
                                      boolean live)
                               throws java.sql.SQLException
Löscht alle mit dem Row verknüpften Child-oder Parent-Einträge aus ASSET_REF.

Parameters:
child - true, wenn Child-Referenzen gelöscht werden sollen.
live - true, um im Live-Tablespace zu löschen
Returns:
Anzahl der gelöschten Einträge
Throws:
java.sql.SQLException

deleteRow

public static int deleteRow(IPersistentRow theRow,
                            boolean live)
                     throws java.sql.SQLException
Throws:
java.sql.SQLException

executeQuery

public static java.util.ArrayList executeQuery(java.lang.String sql)
                                        throws java.sql.SQLException
Convienience-Method, calls executeQuery(sql, false, 0).

Throws:
java.sql.SQLException

executeQuery

public static java.util.ArrayList executeQuery(java.lang.String sql,
                                               boolean live)
                                        throws java.sql.SQLException
Convienience-Method, calls executeQuery(sql, live, 0).

Throws:
java.sql.SQLException

executeQuery

public static java.util.ArrayList executeQuery(java.lang.String sql,
                                               boolean live,
                                               int maxRows)
                                        throws java.sql.SQLException
Execute an sql-query using the configured jdbc-connections and delivery an the resultset using an arraylist of IPersistentRow-Objects.

Parameters:
sql - The query
maxRows - limits the resultset, set to zero or negative value for no limit.
Throws:
java.sql.SQLException

executeQuery

public static java.util.List executeQuery(java.lang.String sql,
                                          boolean live,
                                          int maxRows,
                                          int offset)
                                   throws java.sql.SQLException
Throws:
java.sql.SQLException

executeSingleRowQuery

public static IPersistentRow executeSingleRowQuery(IPersistentRow theRow,
                                                   java.lang.String cid,
                                                   boolean live)
                                            throws java.sql.SQLException
Throws:
java.sql.SQLException

executeSingleRowQuery

public static IPersistentRow executeSingleRowQuery(java.lang.String sql,
                                                   boolean live)
                                            throws java.sql.SQLException
Convienience-Method, calls executeQuery(sql, live, 1) and return the first IPersistentRow directly or null.

Throws:
java.sql.SQLException

executeUpdate

public static int executeUpdate(java.lang.String sql)
                         throws java.sql.SQLException
Throws:
java.sql.SQLException

executeUpdate

public static int executeUpdate(java.lang.String sql,
                                boolean live)
                         throws java.sql.SQLException
Throws:
java.sql.SQLException

expireRow

public static boolean expireRow(IPersistentRow theRow,
                                boolean deleteChildReferences,
                                boolean deleteParentReferences)
Expired den übergebenen Row mit allen Child-und/oder Parent-Referenzen.

Parameters:
theRow -
deleteChildReferences - true, wenn Child-Referenzen gelöscht werden sollen.
deleteParentReferences - true, wenn Parent-Referenzen gelöscht werden sollen.
Returns:

insertRow

public static long insertRow(IPersistentRow theRow)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException

insertRow

public static long insertRow(IPersistentRow theRow,
                             boolean live)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException

launchRow

public static boolean launchRow(IPersistentRow theRow)

writeRow

public static long writeRow(IPersistentRow theRow)
                     throws java.sql.SQLException
Throws:
java.sql.SQLException

writeRow

public static long writeRow(IPersistentRow theRow,
                            boolean live)
                     throws java.sql.SQLException
Throws:
java.sql.SQLException


Copyright © 2004 by basecmp® - Professional Web Solutions