de.uplanet.lucy.server.usermanager.ds
Interface IDsDbManager<RECORDCLASS extends IDsRecord>

All Superinterfaces:
de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper

public interface IDsDbManager<RECORDCLASS extends IDsRecord>
extends de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper

Version:
$Revision: 86706 $

Method Summary
 void delete(int p_iPrimaryKeyValue)
          marks the class object given by the p_iPrimaryKey value as deleted if that record is marked as not deletable an Runtime exception will be thrown
 de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper getAttributeHelper()
           
 DsClass getClassDef()
           
 java.lang.String getClassName()
           
 de.uplanet.jdbc.JdbcConnection getConnection()
           
 de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper getCustomAttributeHelper()
           
 de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByGuid(java.lang.String p_strGUID)
          returns an DbColumn Object for the class attribute given by the parameter p_strGuid
 de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByGuid(java.lang.String p_strGUID, java.util.Map<java.lang.String,DsClass> p_tblAliasToClassMap)
          returns an DbColumn Object for the class attribute given by the parameter p_strGuid
 java.lang.String getLastSqlStmt()
           
 int insert(IDsRecord p_insertRecord)
          inserts an new record object.
 java.util.List<RECORDCLASS> select(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, int p_iFirstRow, int p_iRows, IDsSelectIterator p_iterator, boolean p_bDistinct, java.lang.String... p_selectfieldGuids)
           
 java.util.List<RECORDCLASS> select(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, int p_iFirstRow, int p_iRows, IDsSelectIterator p_iterator, java.lang.String... p_selectfieldGuids)
           
 java.util.List<RECORDCLASS> select(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, int p_iFirstRow, int p_iRows, java.lang.String... p_selectfieldGuids)
          select an list of records.
 java.util.List<RECORDCLASS> select(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, java.lang.String... p_selectfieldGuids)
          select an list of records.
 RECORDCLASS selectByGuid(java.lang.String p_strGuid, java.lang.String... p_selectFieldGuids)
          returns one record coresponding to the given guid.
 RECORDCLASS selectByPrimaryKey(int p_iPrimaryKeyValue, java.util.Collection<java.lang.String> p_selectFieldGuids)
          returns one record coresponding to the given primary key.
 RECORDCLASS selectByPrimaryKey(int p_iPrimaryKeyValue, java.lang.String... p_selectFieldGuids)
          returns one record coresponding to the given primary key.
 int selectCount(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_whereFilter)
          returns the count of records found in the class
 RECORDCLASS selectFullByGuid(java.lang.String p_strGuid)
          returns one record, that is full read. or null when no record found by the given guid.
 RECORDCLASS selectFullByPrimaryKey(int p_iPrimaryKeyValue)
          returns one record, that is full read. or null when no record found by the given primary key.
 java.util.List<RECORDCLASS> selectFullRecord(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_whereFilter, IDsOrder[] p_orderFields)
          returns a full list of records (all fields (Attributes) in the record will be set, like select * from)
 java.util.List<RECORDCLASS> selectFullRecord(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_whereFilter, IDsOrder[] p_orderFields, int p_iFirstRow, int p_iRows)
          returns a full list of records in the record all fields will be set
 RECORDCLASS selectIterate(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, IDsSelectIterator p_iterator, java.lang.String... p_selectfieldGuids)
           
 void setCustomAttributeHelper(de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper p_helper)
           
 int update(int p_pkValue, IDsRecord p_updateRecord)
          updates an user manager object.
 

Method Detail

getLastSqlStmt

java.lang.String getLastSqlStmt()
Returns:
the lastSqlStmt

getConnection

de.uplanet.jdbc.JdbcConnection getConnection()
Returns:
the jdbc conntection

getClassName

java.lang.String getClassName()
Returns:
the class name (the STRNAME column in DSCLASS)

getClassDef

DsClass getClassDef()
Returns:
the class definition, see DsClass

selectFullRecord

java.util.List<RECORDCLASS> selectFullRecord(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_whereFilter,
                                             IDsOrder[] p_orderFields)
                                                               throws java.sql.SQLException
returns a full list of records (all fields (Attributes) in the record will be set, like select * from)

Parameters:
p_whereFilter - can be null, used to set an filter for the select statement
p_orderFields - can be null, used to set an order to the select statement
Returns:
a list of records, or null when no record found
Throws:
java.sql.SQLException

selectFullRecord

java.util.List<RECORDCLASS> selectFullRecord(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_whereFilter,
                                             IDsOrder[] p_orderFields,
                                             int p_iFirstRow,
                                             int p_iRows)
                                                               throws java.sql.SQLException
returns a full list of records in the record all fields will be set

Parameters:
p_whereFilter - can be null, used to set an filter for the select statement
p_orderFields - can be null, used to set an order to the select statement
p_iFirstRow - used for pageing, the starting row
p_iRows - the maximal count of records or -1 for all
Returns:
a list of records, or empty list when no record found
Throws:
java.sql.SQLException

selectCount

int selectCount(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_whereFilter)
                throws java.sql.SQLException
returns the count of records found in the class

Parameters:
p_whereFilter -
Returns:
count of records found in class
Throws:
java.sql.SQLException

selectFullByPrimaryKey

RECORDCLASS selectFullByPrimaryKey(int p_iPrimaryKeyValue)
                                                     throws java.sql.SQLException
returns one record, that is full read. or null when no record found by the given primary key.

Parameters:
p_iPrimaryKeyValue -
Returns:
record with all fields, or null when no record found
Throws:
java.sql.SQLException

selectFullByGuid

RECORDCLASS selectFullByGuid(java.lang.String p_strGuid)
                                               throws java.sql.SQLException
returns one record, that is full read. or null when no record found by the given guid.

Parameters:
p_strGuid -
Returns:
record with all fields or null when not found
Throws:
java.sql.SQLException

selectByGuid

RECORDCLASS selectByGuid(java.lang.String p_strGuid,
                         java.lang.String... p_selectFieldGuids)
                                           throws java.sql.SQLException
returns one record coresponding to the given guid. (At least the primary key field is set in the record object)

Parameters:
p_strGuid - the guid
p_selectFieldGuids - The fields, which will read from the db and will be set in the record object
Returns:
null if no record found, or an record object filled with the fields (+ primary key) given by the l_selctFieldGuids
Throws:
java.sql.SQLException

selectByPrimaryKey

RECORDCLASS selectByPrimaryKey(int p_iPrimaryKeyValue,
                               java.lang.String... p_selectFieldGuids)
                                                 throws java.sql.SQLException
returns one record coresponding to the given primary key. (At least the primary key field is set in the record object)

Parameters:
p_iPrimaryKeyValue - the primary key
p_selectFieldGuids - The fields, which will read from the db and will be set in the record object
Returns:
null if no record found, or an record object filled with the fields (+ primary key) given by the l_selectFieldGuids or throws a DsRuntimeException if a record with a bad type is readed
Throws:
java.sql.SQLException

selectByPrimaryKey

RECORDCLASS selectByPrimaryKey(int p_iPrimaryKeyValue,
                               java.util.Collection<java.lang.String> p_selectFieldGuids)
                                                 throws java.sql.SQLException
returns one record coresponding to the given primary key. (At least the primary key field is set in the record object)

Parameters:
p_iPrimaryKeyValue - the primary key
p_selectFieldGuids - The fields, which will read from the db and will be set in the record object
Returns:
null if no record found, or an record object filled with the fields (+ primary key) given by the l_selectFieldGuids or throws a DsRuntimeException if a record with a bad type is readed
Throws:
java.sql.SQLException

select

java.util.List<RECORDCLASS> select(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where,
                                   IDsOrder[] p_orderFields,
                                   java.lang.String... p_selectfieldGuids)
                                                     throws java.sql.SQLException
select an list of records. At least the primary key fields is set in the record object. Other fields only set when given in p_selectFieldGuids paramter.

Parameters:
p_where - used for the where clause IDsFilter (can be null)
p_orderFields - used for the order by clause. (can be null)
p_selectfieldGuids - field guids depends on the STRGUID field in DSATTR (at least one element)
Returns:
list of records or an empty list if no records was found. or throws a DsRuntimeException if a record with a bad type is readed
Throws:
java.sql.SQLException

selectIterate

RECORDCLASS selectIterate(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where,
                          IDsOrder[] p_orderFields,
                          IDsSelectIterator p_iterator,
                          java.lang.String... p_selectfieldGuids)
                                            throws java.sql.SQLException
Parameters:
p_where - the where clause (can be null)
p_orderFields - the sort fields (can be null)
p_iterator - the iterator called, to select the records (must not be null)
p_selectfieldGuids - field guids depends on the STRGUID field in DSATTR (at least one element)
Returns:
null or a record or throws a DsRuntimeException if a record with a bad type is readed
Throws:
java.sql.SQLException

select

java.util.List<RECORDCLASS> select(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where,
                                   IDsOrder[] p_orderFields,
                                   int p_iFirstRow,
                                   int p_iRows,
                                   java.lang.String... p_selectfieldGuids)
                                                     throws java.sql.SQLException
select an list of records. At least the primary key fields is set in the record object. Other fields only set when given in p_selectFieldGuids parameter. (can used for pageing)

Parameters:
p_where - used for the where clause IDsFilter (can be null)
p_orderFields - used for the order by clause. (can be null)
p_iFirstRow - start row index or <= 0 for first row start
p_iRows - maximal count of rows return , or -1 for all rows shoudl returned
p_selectfieldGuids - field guids depends on the STRGUID field in DSATTR (at least one element)
Returns:
empty list, if no record was found otherwise a list of readed records or throws a DsRuntimeException if a record with a bad type is readed
Throws:
java.sql.SQLException

select

java.util.List<RECORDCLASS> select(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where,
                                   IDsOrder[] p_orderFields,
                                   int p_iFirstRow,
                                   int p_iRows,
                                   IDsSelectIterator p_iterator,
                                   java.lang.String... p_selectfieldGuids)
                                                     throws java.sql.SQLException
Parameters:
p_where - can be null
p_orderFields - can be null
p_iFirstRow - <= 0 starts at begin (used for pageing)
p_iRows - -1 for all, otherwise the maximal read count
p_iterator - can be null, can be used to check if an record should added to the return List or to end the reading
p_selectfieldGuids -
Returns:
empty list if no records was found otherwise a list of records or throws a DsRuntimeException if a record with a bad type is readed
Throws:
java.sql.SQLException

select

java.util.List<RECORDCLASS> select(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where,
                                   IDsOrder[] p_orderFields,
                                   int p_iFirstRow,
                                   int p_iRows,
                                   IDsSelectIterator p_iterator,
                                   boolean p_bDistinct,
                                   java.lang.String... p_selectfieldGuids)
                                                     throws java.sql.SQLException
Parameters:
p_where - can be null
p_orderFields - can be null
p_iFirstRow - <= 0 starts at begin (used for pageing)
p_iRows - -1 for all, otherwise the maximal read count
p_iterator - can be null, can be used to check if an record should added to the return List or to end the reading
p_bDistinct - Distinct select?
p_selectfieldGuids -
Returns:
empty list if no records was found otherwise a list of records or throws a DsRuntimeException if a record with a bad type is readed
Throws:
java.sql.SQLException

update

int update(int p_pkValue,
           IDsRecord p_updateRecord)
           throws java.sql.SQLException
updates an user manager object. (the PK field value is readonly)

Parameters:
p_pkValue - The primary key
p_updateRecord - The update record
Returns:
update count
Throws:
java.sql.SQLException

insert

int insert(IDsRecord p_insertRecord)
           throws java.sql.SQLException
inserts an new record object. If an record with the same name, classid, containerid and bdeleted = true exists this record will be updated with the given p_insertRecord otherwise the p_insertRecord is inserted if no primary key value is set in the p_insertRecord, a new primary key value will be generated

Parameters:
p_insertRecord - not nullable (on null an IllegalArgumentException will be thrown)
Returns:
the generated pk Key value or 0 if the insert fails
Throws:
java.sql.SQLException

delete

void delete(int p_iPrimaryKeyValue)
            throws java.sql.SQLException,
                   java.lang.RuntimeException
marks the class object given by the p_iPrimaryKey value as deleted if that record is marked as not deletable an Runtime exception will be thrown

Parameters:
p_iPrimaryKeyValue -
Throws:
java.sql.SQLException
java.lang.RuntimeException

getDbColumnByGuid

de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByGuid(java.lang.String p_strGUID)
returns an DbColumn Object for the class attribute given by the parameter p_strGuid

Specified by:
getDbColumnByGuid in interface de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
Parameters:
p_strGUID - may not be null
Returns:
DbColumn

getDbColumnByGuid

de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByGuid(java.lang.String p_strGUID,
                                                                 java.util.Map<java.lang.String,DsClass> p_tblAliasToClassMap)
returns an DbColumn Object for the class attribute given by the parameter p_strGuid

Specified by:
getDbColumnByGuid in interface de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
Parameters:
p_strGUID - The Column guid (must not be null)
p_tblAliasToClassMap - saves the table mapping (the table alias to the correspondig class definition)
Returns:
DbColumn

setCustomAttributeHelper

void setCustomAttributeHelper(de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper p_helper)
Parameters:
p_helper - Helper for custom fields.

getCustomAttributeHelper

de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper getCustomAttributeHelper()
Returns:
The custom attribute helper

getAttributeHelper

de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper getAttributeHelper()
Returns:
The attribute helper


Last updated: 2011-08-11 10-04
Copyright © 2000-2011 United Planet. All Rights Reserved.