Interface RemoteStore

All Superinterfaces:
Remote
All Known Subinterfaces:
Store

@Deprecated(since="11.0", forRemoval=true) public interface RemoteStore extends Remote
Deprecated, for removal: This API element is subject to removal in a future version.
The store interface represents the interface to the database. It is used for inserting, updating, deleting and retrieving objects. You get an object implementing this interface by calling com.groiss.wf.Store.getInstance() or - in case of RMI - using the getStore() call of com.groiss.wf.Session.

Many methods contain a condition string. The syntax of them is as in an SQL where clause like "name='john' and salary > 1000", where name and salary are database fields of the given object class. In methods where the extra parameter bindVars appears, the condition can contain placeholders, for example "name=? and salary >?".

The condition parameter may always be null, as well as the order parameter. The bindVars may be null if no placeholders are used in the condition.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method throws an ApplicationException if a duplicate of the given object is in the database.
    void
    checkUnique(Persistent o, boolean caseInsensitive)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method throws an ApplicationException if a duplicate of the given object is in the database.
    int
    count(Class<?> c, String cond, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the number of members of a given class matching the given condition.
    int
    count(String classname, String cond, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the number of members of a given class matching the given condition.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deletes the object from the database.
    int
    delete(Class<?> c, String condition, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deletes some objects from the database.
    int
    delete(String classname, String condition, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deletes some objects from the database.
    int
    delete(Collection<?> collection)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deletes the objects of the collection from the database.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute a SQL statement.
    int
    executeStatement(String stmt, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute a SQL statement.
    <P extends Persistent>
    List<P>
    fill(List<P> l)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Fills the objects within list l.
    <P> P
    fill(P o)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Fill objects where only the oid is set.
    <P extends Persistent, R extends Persistent>
    Set<P>
    fillByField(Class<? extends P> c, Collection<R> collection, String fieldname)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Fill a heterogeneous set of Persistents referenced via a field of a collection of (persistent) objects.
    <P extends Persistent, R extends Persistent>
    Set<P>
    fillByField(Class<? extends P> c, Collection<R> collection, String fieldname, String cond, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Fill a heterogeneous set of Persistents referenced via a field of a collection of (persistent) objects.
    <P extends Persistent>
    void
    fillByFields(Collection<P> collection, String fieldNames)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Fetches dependent objects of a collection of Persistents reachable via the specified fields.
    <P> P
    get(Class<? extends P> c, long oid)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Method for getting objects from the database.
    <P> P
    get(Class<? extends P> c, String cond)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Method for getting objects from the database.
    <P> P
    get(Class<? extends P> c, String cond, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Method for getting objects from the database.
    <P extends Persistent>
    P
    get(String classname, long oid)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Method for getting objects from the database.
    <P extends Persistent>
    P
    get(String classname, String cond)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Method for getting objects from the database.
    <P extends Persistent>
    P
    get(String classname, String cond, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Method for getting objects from the database.
    <P> P
    getNoCache(Class<? extends P> c, long oid)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Method for getting objects directly from the database bypassing the object cache.
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return the next object id from the oid-factory in the database
    getTable(String q, Object... bindVars)
    Deprecated.
    since ep90 use getTable(String, Object[], int[]) with explicit type information instead
    getTable(String q, Object[] bindVars, int[] sqlTypes)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the results of the given query.
    getValue(int sqlType, String stmt, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute a SQL statement which returns one value.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute a SQL statement which returns one value.
    getValue(String stmt, int sqlType)
    Deprecated.
    getValue(String stmt, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute a SQL statement which returns one value.
    getValue(String stmt, Object[] bindVars, int sqlType)
    Deprecated.
    boolean
    hasRows(String stmt, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Check whether the statement returns results.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Check whether the object is in database
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Insert the object into the database.
    void
    insert(Collection<?> collection)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Insert the objects of the collection into the database.
    <P> List<P>
    limitedList(Class<? extends P> c, int maxRows, int offset, String cond, String order, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the members of the given class matching the given condition and limiting the returned entry count.
    <P> List<P>
    limitedList(Class<? extends P> c, int maxRows, String cond, String order, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the members of the given class matching the given condition and limiting the returned entry count.
    <P> List<P>
    list(Class<? extends P> c)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns all members of the given class.
    <P> List<P>
    list(Class<? extends P> c, String cond)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the members of the given class matching the given condition.
    <P> List<P>
    list(Class<? extends P> c, String cond, String order)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the members of the given class matching the given condition.
    <P> List<P>
    list(Class<? extends P> c, String cond, String order, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the members of the given class matching the given condition.
    <P> List<P>
    list(Class<? extends P> c, String cond, String order, Object[] bindVars, int maxRows)
    <P> List<P>
    list(Class<? extends P> c, String cond, String order, Object[] bindVars, int maxRows, int offset)
    <P extends Persistent>
    List<P>
    list(String classname)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns all members of the given class.
    <P extends Persistent>
    List<P>
    list(String classname, String cond)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the members of the given class matching the given condition.
    <P extends Persistent>
    List<P>
    list(String classname, String cond, String order)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the members of the given class matching the given condition.
    <P extends Persistent>
    List<P>
    list(String classname, String cond, String order, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the members of the given class matching the given condition.
    <P> List<P>
    list2(Class<? extends P> c, String q, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the members of the given class matching the given condition.
    <P extends Persistent>
    List<P>
    list2(String classname, String q, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the members of the given class matching the given condition.
    <P> Set<P>
    setOf(Class<? extends P> c, String cond, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the members of the given class matching the given condition as a Set.
    <P extends Persistent>
    Set<P>
    setOf(String classname, String cond, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the members of the given class matching the given condition as a Set.
    <P> Map<Long,P>
    table(Class<? extends P> c, String cond, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the members of the given class matching the given condition as a Map.
    <P extends Persistent>
    Map<Long,P>
    table(String classname, String cond, Object... bindVars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the members of the given class matching the given condition as a Map.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Update the database tuple corresponding to the given object.
    int
    update(Persistent o, String... fieldNames)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Update some fields of the database tuple corresponding to the given object.
    int
    update(Collection<?> collection)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Updates the objects of the collection in the database.
  • Method Details

    • list

      <P> List<P> list(Class<? extends P> c) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns all members of the given class.
      Parameters:
      c - the class of the objects
      Returns:
      a list of members of the given class
      Throws:
      RemoteException
    • list

      <P extends Persistent> List<P> list(String classname) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns all members of the given class.
      Parameters:
      classname - the name of the class of the object
      Returns:
      a List of members of the given class
      Throws:
      RemoteException
    • list

      <P> List<P> list(Class<? extends P> c, String cond) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the members of the given class matching the given condition.
      Parameters:
      c - the class of the objects
      cond - a SQL condition
      Returns:
      a List of members of the given class
      Throws:
      RemoteException
    • list

      <P extends Persistent> List<P> list(String classname, String cond) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the members of the given class matching the given condition.
      Parameters:
      classname - the name of the class of the object
      cond - a SQL condition
      Returns:
      a List of members of the given class
      Throws:
      RemoteException
    • list

      <P> List<P> list(Class<? extends P> c, String cond, String order) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the members of the given class matching the given condition.
      Parameters:
      c - the class of the objects
      cond - a SQL condition
      order - a comma separated list of attribute names of the given class.
      Returns:
      a List of members of the given class
      Throws:
      RemoteException
    • list

      <P extends Persistent> List<P> list(String classname, String cond, String order) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the members of the given class matching the given condition.
      Parameters:
      classname - the name of the class of the object
      cond - a SQL condition
      order - a comma separated list of attribute names of the given class.
      Returns:
      a List of members of the given class
      Throws:
      RemoteException
    • list

      <P> List<P> list(Class<? extends P> c, String cond, String order, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the members of the given class matching the given condition.
      Parameters:
      c - the class of the objects
      cond - a SQL condition
      order - a comma separated list of attribute names of the given class.
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      Returns:
      a List of members of the given class
      Throws:
      RemoteException
    • limitedList

      <P> List<P> limitedList(Class<? extends P> c, int maxRows, String cond, String order, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the members of the given class matching the given condition and limiting the returned entry count.

      Note that a unique order is not only strongly recommended; some DBMSs require an order by in this case. If an empty order is provided or when the order does not contain the oid column, OID is added as order column.

      Parameters:
      c - the class of the objects
      maxRows - the maximum number of entries to return
      cond - a SQL condition
      order - a comma separated list of attribute names of the given class.
      bindVars - if the condition contains place holders for binding variables, this should contain the values
      Returns:
      a List of members of the given class
      Throws:
      RemoteException
    • list

      @Deprecated <P> List<P> list(Class<? extends P> c, String cond, String order, Object[] bindVars, int maxRows) throws RemoteException
      This method returns the members of the given class matching the given condition and limiting the returned entry count.

      Note that a unique order is not only strongly recommended; some DBMSs require an order by in this case. If an empty order is provided or when the order does not contain the oid column, OID is added as order column.

      Parameters:
      c - the class of the objects
      cond - a SQL condition
      order - a comma separated list of attribute names of the given class.
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      maxRows - the maximum number of entries to return
      Returns:
      a List of members of the given class
      Throws:
      RemoteException
    • limitedList

      <P> List<P> limitedList(Class<? extends P> c, int maxRows, int offset, String cond, String order, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the members of the given class matching the given condition and limiting the returned entry count.

      Note that a unique order is not only strongly recommended; some DBMSs require an order by in this case. If an empty order is provided or when the order does not contain the oid column, OID is added as order column.

      Parameters:
      c - the class of the objects
      maxRows - the maximum number of entries to return
      offset - number of rows to skip from the beginning
      cond - a SQL condition
      order - a comma separated list of attribute names of the given class.
      bindVars - if the condition contains place holders for binding variables, this should contain the values
      Returns:
      a List of members of the given class
      Throws:
      RemoteException
    • list

      @Deprecated <P> List<P> list(Class<? extends P> c, String cond, String order, Object[] bindVars, int maxRows, int offset) throws RemoteException
      This method returns the members of the given class matching the given condition and limiting the returned entry count.

      Note that a unique order is not only strongly recommended; some DBMSs require an order by in this case. If an empty order is provided or when the order does not contain the oid column, OID is added as order column.

      Parameters:
      c - the class of the objects
      cond - a SQL condition
      order - a comma separated list of attribute names of the given class.
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      maxRows - the maximum number of entries to return
      offset - number of rows to skip from the beginning
      Returns:
      a List of members of the given class
      Throws:
      RemoteException
    • list

      <P extends Persistent> List<P> list(String classname, String cond, String order, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the members of the given class matching the given condition.
      Parameters:
      classname - the name of the class of the objects
      cond - a SQL condition
      order - a comma separated list of attribute names of the given class.
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      Returns:
      a List of members of the given class
      Throws:
      RemoteException
    • list2

      <P> List<P> list2(Class<? extends P> c, String q, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the members of the given class matching the given condition. the sql-query is a complete sql statement which must retrieve exactly the database attributes of the given class, for example: select u.* from avw_user u, avw_userrole ur where ... It is required to use the StoreUtil.dbAttrs(Persistent, String) dbAttrs(String) method to construct the attribute list, that is to formulate "select "+StoreUtil.dbAttrs(user,"u")+" from avw_user u, avw_userrole ur where..."
      Parameters:
      c - the class of the objects
      q - a SQL query
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      Returns:
      a List of members of the given class
      Throws:
      RemoteException
    • list2

      <P extends Persistent> List<P> list2(String classname, String q, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the members of the given class matching the given condition. the sql-query is a complete sql statement which must retrieve exactly the database attributes of the given class, for example: select u.* from avw_user u, avw_userrole ur where ... It is required to use the StoreUtil.dbAttrs(Persistent, String) dbAttrs(String) method to construct the attribute list, that is to formulate "select "+StoreUtil.dbAttrs(user,"u")+" from avw_user u, avw_userrole ur where..."
      Parameters:
      classname - the name of the class of the objects
      q - a SQL query
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      Returns:
      a List of members of the given class
      Throws:
      RemoteException
    • table

      <P> Map<Long,P> table(Class<? extends P> c, String cond, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the members of the given class matching the given condition as a Map. The keys of the map are the oids of the objects as Long objects, the values are the objects itself.
      Parameters:
      c - the class of the objects
      cond - a SQL condition
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      Returns:
      a Map of members of the given class
      Throws:
      RemoteException
    • table

      <P extends Persistent> Map<Long,P> table(String classname, String cond, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the members of the given class matching the given condition as a Map. The keys of the table are the oids of the objects as Long objects, the values are the objects itself.
      Parameters:
      classname - the name of the class of the objects
      cond - a SQL condition
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      Returns:
      a Map of members of the given class
      Throws:
      RemoteException
    • setOf

      <P> Set<P> setOf(Class<? extends P> c, String cond, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the members of the given class matching the given condition as a Set. The the values are the objects itself.
      Parameters:
      c - the class of the objects
      cond - a SQL condition
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      Returns:
      a Set of members of the given class
      Throws:
      RemoteException
    • setOf

      <P extends Persistent> Set<P> setOf(String classname, String cond, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the members of the given class matching the given condition as a Set. The keys of the table are the oids of the objects as Long objects, the values are the objects itself.
      Parameters:
      classname - the name of the class of the objects
      cond - a SQL condition
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      Returns:
      a Set of members of the given class
      Throws:
      RemoteException
    • count

      int count(Class<?> c, String cond, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the number of members of a given class matching the given condition.
      Parameters:
      c - the class
      cond - a SQL condition
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      Returns:
      the number of elements
      Throws:
      RemoteException
    • count

      int count(String classname, String cond, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the number of members of a given class matching the given condition.
      Parameters:
      classname - the name of the class
      cond - a SQL condition
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      Returns:
      the number of elements
      Throws:
      RemoteException
    • inDatabase

      boolean inDatabase(Persistent o) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Check whether the object is in database
      Returns:
      true if the object is in the database
      Throws:
      RemoteException
    • hasRows

      boolean hasRows(String stmt, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Check whether the statement returns results.
      Parameters:
      stmt - the SQL statement text.
      bindVars - if the stmt contains place holders for binding variables this parameter should contain the values
      Returns:
      true if the result set is not empty
      Throws:
      RemoteException
    • get

      <P> P get(Class<? extends P> c, long oid) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Method for getting objects from the database.
      Parameters:
      c - the class of the object
      oid - the oid of the object
      Returns:
      the object with a given oid
      Throws:
      RemoteException
    • get

      <P extends Persistent> P get(String classname, long oid) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Method for getting objects from the database.
      Parameters:
      classname - the name of the class of the object
      oid - the oid of the object
      Returns:
      the object with a given oid
      Throws:
      RemoteException
    • get

      <P> P get(Class<? extends P> c, String cond) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Method for getting objects from the database.
      Parameters:
      c - the class of the object
      cond - a SQL condition
      Returns:
      the object with a given oid
      Throws:
      RemoteException
    • get

      <P extends Persistent> P get(String classname, String cond) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Method for getting objects from the database.
      Parameters:
      classname - the name of the class of the object
      cond - a SQL condition
      Returns:
      an object matching the given condition
      Throws:
      RemoteException
    • get

      <P> P get(Class<? extends P> c, String cond, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Method for getting objects from the database.
      Parameters:
      c - the class of the object
      cond - a SQL condition
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      Returns:
      an object matching the given condition
      Throws:
      RemoteException
    • get

      <P extends Persistent> P get(String classname, String cond, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Method for getting objects from the database.
      Parameters:
      classname - the name of the class of the object
      cond - a SQL condition
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      Returns:
      an object matching the given condition
      Throws:
      RemoteException
    • fill

      <P> P fill(P o) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Fill objects where only the oid is set.
      • if o is null: return o
      • if o is filled: do nothing; return o
      • if o is not in the objectcache: fill it, put it into the OC
      • if there is an object oc in the objectcache which is equal to o, but oc != o, throw an 1107 exception
      Parameters:
      o - the object
      Returns:
      the same object with fields set from the database
      Throws:
      RemoteException
    • fill

      <P extends Persistent> List<P> fill(List<P> l) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Fills the objects within list l.
      Parameters:
      l - the list of objects to be filled
      Returns:
      a list of objects which are filled or remain unfilled if they could not be filled. The objects are in the same order as in l.
      Throws:
      RemoteException
    • checkUnique

      void checkUnique(Persistent o) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method throws an ApplicationException if a duplicate of the given object is in the database. It uses the key fields returned by method Persistent.getKeys() of object o for the comparison.
      Parameters:
      o - the object
      Throws:
      RemoteException
    • checkUnique

      void checkUnique(Persistent o, boolean caseInsensitive) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method throws an ApplicationException if a duplicate of the given object is in the database. It uses the key fields returned by method Persistent.getKeys() of object o for the comparison.
      Parameters:
      o - the object
      caseInsensitive - if true make string comparisons case insensitive
      Throws:
      RemoteException
    • fillByField

      <P extends Persistent, R extends Persistent> Set<P> fillByField(Class<? extends P> c, Collection<R> collection, String fieldname) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Fill a heterogeneous set of Persistents referenced via a field of a collection of (persistent) objects. BulkQueries are used for efficient access of the database.
      Parameters:
      c - (super)class of the referenced Objects
      collection - the Collection of referencing objects, must all be filled.
      fieldname - the name of the referencing field. Must be a Persistent.
      Returns:
      the set of referenced objects (filled)
      Throws:
      RemoteException
    • fillByField

      <P extends Persistent, R extends Persistent> Set<P> fillByField(Class<? extends P> c, Collection<R> collection, String fieldname, String cond, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Fill a heterogeneous set of Persistents referenced via a field of a collection of (persistent) objects. BulkQueries are used for efficient access of the database.
      Parameters:
      c - (super)class of the referenced Objects
      collection - the Collection of referencing objects, must all be filled.
      fieldname - the name of the referencing field. Must be a Persistent.
      cond - an optional SQL condition.
      bindVars - optional array of parameter bindings for the SQL statement.
      Returns:
      the set of referenced objects (filled)
      Throws:
      RemoteException
    • fillByFields

      <P extends Persistent> void fillByFields(Collection<P> collection, String fieldNames) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Fetches dependent objects of a collection of Persistents reachable via the specified fields. BulkQueries are used for efficient access of the database.
      Parameters:
      collection - the Collection of referencing objects, must all be filled.
      fieldNames - a comma separated string of field names. Every field name must denote a Persistent field.
      Throws:
      RemoteException
    • insert

      void insert(Persistent o) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Insert the object into the database. Does not write a LogEntry.
      Parameters:
      o - the object
      Throws:
      RemoteException
    • insert

      void insert(Collection<?> collection) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Insert the objects of the collection into the database. Does not write LogEntry objects.
      Parameters:
      collection - the objects to insert (all of the objects must implement Persistent)
      Throws:
      RemoteException
    • update

      int update(Persistent o) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Update the database tuple corresponding to the given object. Does not write a LogEntry.
      Parameters:
      o - the object
      Returns:
      the number of updated tuples (0 or 1)
      Throws:
      RemoteException
    • update

      int update(Collection<?> collection) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Updates the objects of the collection in the database. Does not write LogEntry objects.
      Parameters:
      collection - the objects to update (all of the objects must implement Persistent)
      Returns:
      the number of updated tuples
      Throws:
      RemoteException
    • update

      int update(Persistent o, String... fieldNames) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Update some fields of the database tuple corresponding to the given object. Does not write a LogEntry.
      Parameters:
      o - the object
      fieldNames - an array containing the names of the fields which should be updated
      Returns:
      the number of updated tuples (0 or 1)
      Throws:
      RemoteException
    • delete

      int delete(Persistent o) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deletes the object from the database. Does not write a LogEntry.
      Parameters:
      o - the object to delete
      Returns:
      the number of deleted tuples (0 or 1)
      Throws:
      RemoteException
    • delete

      int delete(Collection<?> collection) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deletes the objects of the collection from the database. Does not write LogEntry objects.
      Parameters:
      collection - the objects to delete (all of the objects must implement Persistent)
      Returns:
      the number of deleted tuples
      Throws:
      RemoteException
    • delete

      int delete(Class<?> c, String condition, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deletes some objects from the database. Does not write a LogEntry. Note that neither the Persistent.beforeDelete() nor PersistentEventHandler.beforeDelete(Persistent) methods are called for the individual deleted objects.
      Parameters:
      c - the class of the objects
      condition - a SQL condition
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      Returns:
      the number of deleted tuples
      Throws:
      RemoteException
    • delete

      int delete(String classname, String condition, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deletes some objects from the database. Does not write a LogEntry. Note that neither the Persistent.beforeDelete() nor PersistentEventHandler.beforeDelete(Persistent) methods are called for the individual deleted objects.
      Parameters:
      classname - the name of the class of the objects
      condition - a SQL condition
      bindVars - if the condition contains place holders for binding variables this parameter should contain the values
      Returns:
      the number of deleted tuples
      Throws:
      RemoteException
    • executeStatement

      int executeStatement(String stmt) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute a SQL statement.
      Parameters:
      stmt - the SQL statement text.
      Returns:
      the number of rows changed
      Throws:
      RemoteException
    • executeStatement

      int executeStatement(String stmt, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute a SQL statement.
      Parameters:
      stmt - the SQL statement text.
      bindVars - if the stmt contains place holders for binding variables this parameter should contain the values
      Returns:
      the number of rows changed
      Throws:
      RemoteException
    • getOID

      long getOID() throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the next object id from the oid-factory in the database
      Returns:
      an unique object id
      Throws:
      RemoteException
    • getValue

      Object getValue(String stmt) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute a SQL statement which returns one value. The statement is executed, the first row fetched and from the result set the first element is returned.
      Parameters:
      stmt - the SQL statement text.
      Returns:
      the value as object.
      Throws:
      RemoteException
    • getValue

      @Deprecated Object getValue(String stmt, int sqlType) throws RemoteException
      Deprecated.
      Execute a SQL statement which returns one value. The statement is executed, the first row fetched and from the result set the first element is returned.
      Parameters:
      stmt - the SQL statement text.
      sqlType - if a special mapping of the database type to java type is needed, the type (java.sql.Types) can be specified here.
      Returns:
      the value as object.
      Throws:
      RemoteException
    • getValue

      Object getValue(String stmt, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute a SQL statement which returns one value. The statement is executed, the first row fetched and from the result set the first element is returned.
      Parameters:
      stmt - the SQL statement text.
      bindVars - if the stmt contains place holders for binding variables this parameter should contain the values
      Returns:
      the value as object.
      Throws:
      RemoteException
    • getValue

      Object getValue(int sqlType, String stmt, Object... bindVars) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute a SQL statement which returns one value. The statement is executed, the first row fetched and from the result set the first element is returned.
      Parameters:
      sqlType - if a special mapping of the database type to java type is needed, the type (java.sql.Types) can be specified here.
      stmt - the SQL statement text.
      bindVars - if the stmt contains place holders for binding variables, this should contain the values
      Returns:
      the value as object.
      Throws:
      RemoteException
    • getValue

      @Deprecated Object getValue(String stmt, Object[] bindVars, int sqlType) throws RemoteException
      Deprecated.
      Execute a SQL statement which returns one value. The statement is executed, the first row fetched and from the result set the first element is returned.
      Parameters:
      stmt - the SQL statement text.
      bindVars - if the stmt contains place holders for binding variables this parameter should contain the values
      sqlType - if a special mapping of the database type to java type is needed, the type (java.sql.Types) can be specified here.
      Returns:
      the value as object.
      Throws:
      RemoteException
    • getTable

      @Deprecated TableModel getTable(String q, Object... bindVars) throws RemoteException
      Deprecated.
      since ep90 use getTable(String, Object[], int[]) with explicit type information instead
      Returns the results of the given query.
      Parameters:
      q - the sql-query
      bindVars - if the query contains place holders for binding variables this parameter should contain the values
      Returns:
      a list of list of values
      Throws:
      RemoteException
    • getTable

      TableModel getTable(String q, Object[] bindVars, int[] sqlTypes) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the results of the given query.
      Parameters:
      q - the sql-query
      bindVars - if the query contains place holders for binding variables this parameter should contain the values
      sqlTypes - if a special mapping of database types to java types is needed, the types (java.sql.Types) can be specified here. The length of the array must be equal to the number of columns in the result set.
      Returns:
      a list of list of values
      Throws:
      RemoteException
    • getNoCache

      <P> P getNoCache(Class<? extends P> c, long oid) throws RemoteException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Method for getting objects directly from the database bypassing the object cache.

      Should only be needed in special circumstances like comparing the current state of an object to an old state in the database.

      The result should be used with care, in particular, its unwise to change it in any way.

      Parameters:
      c - the class of the object
      oid - the oid of the object
      Returns:
      the object with a given oid
      Throws:
      RemoteException